|
Posted by abc9250 on February 7, 2006, 4:34 am
Please log in for more thread options
At First, I have already studied the following links:
http://groups.google.com.tw/group/microsoft.public.smartphone.developer/browse_thread/thread/8845a0d1545c82fd/15addd590cef5d1d?lnk=st&q=directshow+camera+smartphone&rnum=1&hl=zh-TW#15addd590cef5d1d
http://groups.google.com.tw/group/microsoft.public.smartphone.developer/browse_thread/thread/c9a4b3a393d4aa8a/eb7e3510d0004847?lnk=st&q=directshow+camera+smartphone&rnum=14&hl=zh-TW#eb7e3510d0004847
But I still don't know how to make the following code work:
==========================================
// Initialize the video capture filter
pVideoCap.CoCreateInstance( CLSID_VideoCapture );
varCamName = L"CAM1:";
if(( varCamName.vt == VT_BSTR ) == NULL ) {
return E_OUTOFMEMORY;
}
PropBag.Write( L"VCapName", &varCamName );
pPropertyBag->Load( &PropBag, NULL );
pPropertyBag.Release();
pGraph->AddFilter( pVideoCap, L"Video capture source" );
==========================================
I modify the statement
pVideoCap.QueryInterface( &pPropertyBag );
to
hr = CoCreateInstance(CLSID_PropertyBag, NULL,
CLSCTX_INPROC,IID_IPropertyBag, (void **)&pPropertyBag);
But when I build , the build tool show me error message: "error C2065:
'CLSID_PropertyBag' : undeclared identifier".
What should I do ? I search the MSDN and google and I don't find any
question about that.
Thank you.
|