win32 capCreateCaptureWindow problem

John C johnch_atms at hotmail.com
Wed Aug 12 01:31:12 PDT 2009


Ivan Boritsky wrote:
> i work on a win32 application. i try to access my web camera.
> when i use this api funtion;
> capCreateCaptureWindow("cam", WS_VISIBLE + WS_CHILD, 10, 10,266, 252, hWnd, 0);

That should be: WS_VISIBLE | WS_CHILD.

> 
> i get this error:
> Error: undefined identifier capCreateCaptureWindow

You need a header module that imports the function. Try the vfw.d module 
at the project Jarrett pointed you to.

> 
> my compile comman is:
> dmd webcam.d gdi32.lib advapi32.lib

You'll also need vfw32.lib, which isn't part of the DMD distribution, 
but will be on your system if you've downloaded the Platform SDK - in 
which case, you'll need to run it through coffimplib 
(ftp://ftp.digitalmars.com/coffimplib.zip).

> 
> what am i doing wrong? how can i acces my web cam?


More information about the Digitalmars-d-learn mailing list