For complete code, refer to the CNVWM demo.
BOOL DisplaySystemProfiles()
{
// ATL Macro
USES_CONVERSION;
long count = 0;
long streamCount = 0;
long versionNum = 0;
long lVersion;
char data[10];
IltmmWMProfile *pProfile = NULL;
IltmmWMProfileManager *pProfileManager = NULL;
BSTR bstrString;
// Create a profile manager
HRESULT hr = CoCreateInstance(CLSID_ltmmWMProfileManager,
NULL,
CLSCTX_INPROC_SERVER,
IID_IltmmWMProfileManager,
(void**) &pProfileManager);
if(FAILED(hr))
return TRUE;
// show only system profiles for version ltmmWMT_VER_4_0
pProfileManager->get_SystemProfileVersion(&lVersion);
if (lVersion != ltmmWMT_VER_4_0)
{
pProfileManager->Release();
return TRUE;
}
hr = pProfileManager->get_SystemProfileCount(&count);
if (FAILED(hr))
{
pProfileManager->Release();
return TRUE;
}
for (int i = 0; i < count; i++)
{
hr = pProfileManager->LoadSystemProfile(i, &pProfile);
if(FAILED(hr))
{
pProfileManager->Release();
return TRUE;
}
// Display the name...
pProfile->get_Name(&bstrString);
wprintf(TEXT("%s\n"), bstrString);
SysFreeString(bstrString);
// Add the description, version and the stream count
pProfile->get_Description(&bstrString);
wprintf(TEXT("%s\n"), bstrString);
SysFreeString(bstrString);
pProfile->get_Version(&versionNum);
switch (versionNum)
{
case ltmmWMT_VER_4_0:
wprintf(TEXT("ltmmWMT_VER_4_0\n"));
break;
case ltmmWMT_VER_7_0:
wprintf(TEXT("ltmmWMT_VER_7_0\n"));
break;
case ltmmWMT_VER_8_0:
wprintf(TEXT("ltmmWMT_VER_8_0\n"));
break;
case ltmmWMT_VER_9_0:
wprintf(TEXT("ltmmWMT_VER_9_0\n"));
break;
default:
wprintf(TEXT("UNKNOWN\n"));
break;
};
// Display the number of streams
pProfile->get_StreamCount(&streamCount);
wprintf(TEXT("%s\n"), ltoa(streamCount, data, 10));
pProfile->Release();
pProfile = NULL;
}
pProfileManager->Release();
pProfileManager = NULL;
return TRUE;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.