Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.24
LEADTOOLS Multimedia API Help

IltmmCaptureSubTypes::get_Count Example for C

Show in webframe

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);
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.