[Solved] IWiaVideo::CreateVideoByDevNum Failure

Started by
0 comments, last by Xeile 18 years, 3 months ago
Hello all, I'm trying to capture image using WIA from a webcam. I get a failure which I cannot explain the cause. Please see the following source code:

HRESULT Result = S_OK;
IWiaVideo *Device = NULL;

CoInitialize(NULL);
Result = CoCreateInstance(CLSID_WiaVideo, NULL, CLSCTX_INPROC_SERVER, IID_IWiaVideo, (void**)&Device);
// Ok Result is still 'S_OK' here still.
Result = Device->CreateVideoByDevNum(0, hWnd, FALSE, TRUE);
// Now Result is E_POINTER.



I cannot explain why the result is E_POINTER all the time. All drivers are installed and only 1 webcam is connected to this computer. Can any help me? Thank you, Xeile [Edited by - Xeile on January 10, 2006 9:31:12 AM]
Advertisement
Solved it, you must also specify the image directory.

This topic is closed to new replies.

Advertisement