void IltmmCaptureSubTypes_get_Count_Example (IltmmCapture* pCapture)
{
IltmmCaptureSubTypes* pVideoCapSubTypes;
IltmmCaptureSubType* pCapSubType;
long lCount, lSel, i;
VARIANT_BOOL bVar;
BSTR bstrName = NULL, bstrFriendName = NULL;
IltmmCapture_get_VideoCaptureSubTypes(pCapture, (IltmmCaptureSubTypes**)&pVideoCapSubTypes);
IltmmCaptureSubTypes_get_Count(pVideoCapSubTypes, &lCount);
if (lCount > 0)
{
for (i = 0; i < lCount; i++)
{
IltmmCaptureSubTypes_Item(pVideoCapSubTypes, i, &pCapSubType);
if (i == 1)
{
IltmmCaptureSubType_get_Name(pCapSubType, &bstrName);
IltmmCaptureSubType_get_FriendlyName(pCapSubType, &bstrFriendName);
IltmmCaptureSubType_get_Selected(pCapSubType, &bVar);
if (bVar == VARIANT_TRUE)
IltmmCaptureSubType_put_Selected(pCapSubType, VARIANT_FALSE);
}
IltmmCaptureSubType_Release(pCapSubType);
}
IltmmCaptureSubTypes_get_Selection(pVideoCapSubTypes, &lSel);
if (lSel != 1)
{
IltmmCaptureSubTypes_Find(pVideoCapSubTypes, bstrName, &lSel);
IltmmCaptureSubTypes_put_Selection(pVideoCapSubTypes, lSel);
}
SysFreeString(bstrName);
SysFreeString(bstrFriendName);
}
IltmmCaptureSubTypes_Release(pVideoCapSubTypes);
}
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