IltmmFilterEnum Example for C++

void SetFilterMerit(IltmmConvert *pConvert) 
{ 
   HRESULT hr  = S_OK; 
   CComPtr<IltmmFilterEnum> pFilterEnum; 
 
   // try to get the filter enumeration object 
   hr = CoCreateInstance(CLSID_ltmmFilterEnum, NULL, CLSCTX_INPROC_SERVER, IID_IltmmFilterEnum, (void**)&pFilterEnum); 
   if(FAILED(hr)) 
   { 
      AfxMessageBox(_T("Can't instantiate IltmmFilterEnum library")); 
      return; 
   } 
 
   BSTR bstr = SysAllocString(L"LEAD Audio SPDIF Passthru"); 
   long value = 0; 
 
   // get the Merit of the LEAD Audio SPDIF Passthru filter 
   hr = pFilterEnum->get_Merit(bstr, &value);  
 
   // Increase the Merit  
   value = value + 100;  
 
   // Set the New Merit 
   hr = pFilterEnum->put_Merit(bstr, value);   
 
   VARIANT_BOOL isEnable; 
   // Determine whether the filter is Enabled  
   hr = pFilterEnum->get_Enable(bstr, &isEnable);  
 
   // Disable the filter 
   hr = pFilterEnum->put_Enable(bstr, VARIANT_FALSE);  
 
    // Free the string 
    SysFreeString(bstr);  
} 
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Multimedia C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.