// Get the required buffer size
DWORD cbType = 0;
pWMMediaProps->GetMediaType(NULL, &cbType);
// Get media type
WM_MEDIA_TYPE* pType = (WM_MEDIA_TYPE*)new BYTE[cbType];
if(SUCCEEDED(pWMMediaProps->GetMediaType(pType, &cbType)))
{
// Use media type here
// ...
}
// Free buffer
// Should not use "delete [] pType", we have to cast it to (BYTE*) before delete it.
delete [] (BYTE*)pType;
Android 專用版 Facebook 推出更新版 1.6.0
13 years ago