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

IltmmConvert::get_WMProfile Example for C++

Show in webframe

// This function displays the currently associated WM
// Profile for the specified convert object
void DisplaySelectedProfileName(IltmmConvert *pConvert)
{
   USES_CONVERSION;
   IltmmWMProfile *pCurrentProfile = NULL;
   BSTR bstrStringName;
   HRESULT hr;

   // try to get the current profile
   hr = pConvert->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);
   }
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.