IltmmConvert::get_WMProfile Example for C++

// 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; 

   hr = pConvert->get_WMProfile(&pCurrentProfile); 
   if(FAILED(hr)) 
   {
      return; 
   }
   
   if(pCurrentProfile) 
   {
      hr = pCurrentProfile->get_Name(&bstrStringName); 
      if(FAILED(hr)) 
      {
         pCurrentProfile->Release();
         return; 
      }

      MessageBox(NULL, OLE2A(bstrStringName), 
         "Profile selected", 
         MB_ICONINFORMATION); 
      pCurrentProfile->Release();
   }
   else
   {
      MessageBox(NULL, "There is no profiles currently selected", 
         "Profile selected", 
         MB_ICONINFORMATION); 
   }
}