AnnaWillson
Programmer
Hi Guys,
I am writing some Machine Vision software in Visual C++ and am using a new SDK from Microsoft to do so. I would like to use some of the interfaces from Direct Show (in particular IMediaDet) so I can save a frame from an avi file. I am a newie to the dcom interface stuff!!!!!! I have got as far as Intialising com (whoopee) but am unsure how to get a reference to IMediaDet.
"CComPtr<IMediaDet> pDet;
hr = pDet.CoCreateInstance(__uuidof(MediaDet));"
returns error C2955: 'CComPtr' : use of class template requires template argument list (I am not an ATL programmer and am unsure where to put or use templates)
and this........
IMediaDet *ptr;
hr = CoCreateInstance(
CLSID_MediaDet, NULL, CLSCTX_INPROC_SERVER,
IID_IMediaDet, (void**)&ptr);
kinda makes more sense but of course IMediaDet is unrecognised. I know I am missing a step here...........can anyine let me know what it is or e-mail or post a basic example!
Ta very much
I am writing some Machine Vision software in Visual C++ and am using a new SDK from Microsoft to do so. I would like to use some of the interfaces from Direct Show (in particular IMediaDet) so I can save a frame from an avi file. I am a newie to the dcom interface stuff!!!!!! I have got as far as Intialising com (whoopee) but am unsure how to get a reference to IMediaDet.
"CComPtr<IMediaDet> pDet;
hr = pDet.CoCreateInstance(__uuidof(MediaDet));"
returns error C2955: 'CComPtr' : use of class template requires template argument list (I am not an ATL programmer and am unsure where to put or use templates)
and this........
IMediaDet *ptr;
hr = CoCreateInstance(
CLSID_MediaDet, NULL, CLSCTX_INPROC_SERVER,
IID_IMediaDet, (void**)&ptr);
kinda makes more sense but of course IMediaDet is unrecognised. I know I am missing a step here...........can anyine let me know what it is or e-mail or post a basic example!
Ta very much