
Invalid Address specified to RtlFreeHeap (Debug in Win2000 Proffesional+SP3)
Invalid Address specified to RtlFreeHeap
(Debug in Win2000 Proffesional+SP3)
WMF SDK9
///////////////////////////////////////////////////////////
BOOL CWmaEncode::TestDeBug()
{
HRESULT hr=S_OK;
IWMProfileManager* pIWMProfileManager=NULL;
hr=WMCreateProfileManager(&pIWMProfileManager);
if(hr!=S_OK){
SAFE_RELEASE(pIWMProfileManager);
TRACE("WMCreateProfileManager() Error!\r\n");
return FALSE;
}
IWMProfileManager2* pIWMProfileManager2=NULL;
hr=pIWMProfileManager->QueryInterface(IID_IWMProfileManager2,
(void**)(&pIWMProfileManager2));
if(hr!=S_OK){
SAFE_RELEASE(pIWMProfileManager2);
TRACE("QueryInterface(IID_IWMProfileManager2... Error!\r\n");
return FALSE;
}
IWMCodecInfo3* pIWMCodeInfo3=NULL;
hr=pIWMProfileManager2->QueryInterface(IID_IWMCodecInfo3,
(void**)(&pIWMCodeInfo3));
if(hr!=S_OK){
SAFE_RELEASE(pIWMCodeInfo3);
TRACE("QueryInterface(IID_IWMCodecInfo3..) Error!\r\n");
return FALSE;
}
//
IWMStreamConfig *pIWMStreamConfig=NULL;
hr=pIWMCodeInfo3->GetCodecFormat(WMMEDIATYPE_Audio,0,2,&pIWMStreamConfig);//
Occurs Error!
if(hr!=S_OK){
TRACE("GetCodecFormat() Error!\r\n");
return FALSE;
}
//
SAFE_RELEASE(pIWMStreamConfig);
SAFE_RELEASE(pIWMCodeInfo3);
SAFE_RELEASE(pIWMProfileManager2);
SAFE_RELEASE(pIWMProfileManager);
return TRUE;
Quote:
}