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

IltmmFilterEnum Example for C++

Show in webframe

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