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 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Multimedia C API Help