// This function displays the currently associated WM
// Profile for the specified capture object
void DisplaySelectedProfileName(IltmmCapture *pCapture)
{
USES_CONVERSION;
IltmmWMProfile *pCurrentProfile = NULL;
BSTR bstrStringName;
HRESULT hr;
// try to get the current profile
hr = pCapture->get_WMProfile(&pCurrentProfile);
if(FAILED(hr))
return;
if (pCurrentProfile)
{
// get the profile name
hr = pCurrentProfile->get_Name(&bstrStringName);
if (FAILED(hr))
{
pCurrentProfile->Release();
return;
}
// display it here
::MessageBox(NULL, OLE2W(bstrStringName), TEXT("Profile selected"), MB_ICONINFORMATION);
// free the bstr
SysFreeString(bstrStringName);
// release the profile object
pCurrentProfile->Release();
}
else
{
MessageBox(NULL, TEXT("There is no profile currently selected"), TEXT("Profile selected"), MB_ICONINFORMATION);
}
}
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