Re: How to add a filter?



On 3 May 2006 14:47:37 -0700, emetress wrote:

If I write this: CComPtr<IBaseFilter> pSobel;

The first error of my program is this one:
1>d:\documents and settings\alex\escritorio\prueba2\webcam.cpp(20) :
error C2065: 'CComPtr' : undeclared identifier

Did you try Google?

First match for "ccomptr site:microsoft.com":

http://msdn2.microsoft.com/en-us/library/ezzw7k98.aspx

Shows you need to #include <atlbase.h>

If you don't know how to fix such basic errors, IMO, you are tackling a
project that is beyond your abilities.

Also, the CComPtr suggestion is on my site (though I reference <atlcom.h>
instead of <atlbase.h>):

http://tmhare.mvps.org/faqs.htm#com

--
Please read this before replying:
1. Dshow & posting help: http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others: follow up if you are helped or you found a solution
.



Relevant Pages

  • RE: Making Video Capture library using Direct Show for windows mobile
    ... C2065: 'IImageSinkFilter': undeclared identifier ... C2955: 'CComPtr': use of class template requires template argument list ... C-style cast or function-style cast ... left of '.hDevice' must have class/struct/union type ...
    (microsoft.public.dotnet.framework.compactframework)
  • Making Video Capture library using Direct Show for windows mobile
    ... C2065: 'IImageSinkFilter': undeclared identifier ... C2955: 'CComPtr': use of class template requires template argument list ... C-style cast or function-style cast ... left of '.hDevice' must have class/struct/union type ...
    (microsoft.public.dotnet.framework.compactframework)
  • Making Video Capture library using Direct Show for windows mobile
    ... C2065: 'IImageSinkFilter': undeclared identifier ... C2955: 'CComPtr': use of class template requires template argument list ... C-style cast or function-style cast ... left of '.hDevice' must have class/struct/union type ...
    (microsoft.public.windowsce.app.development)
  • Making Video Capture library using Direct Show for windows mobile
    ... C2065: 'IImageSinkFilter': undeclared identifier ... C2955: 'CComPtr': use of class template requires template argument list ... C-style cast or function-style cast ... left of '.hDevice' must have class/struct/union type ...
    (microsoft.public.windowsce.embedded.vc)