Quote
here is the code:
HWND camhwnd = capCreateCaptureWindow ("camera window", WS_CHILD , 0, 100, 300, 300, hwnd, 0);
SendMessage(camhwnd,WM_CAP_DRIVER_CONNECT,0,0);
So, I try to use capCreateCaptureWindow from avicap32.dll with the following code. I can compile it into file *.exe but when I try to run it's *.exe, always show the following error:

And here is the code:
hMod = LoadLibrary("avicap32.dll");
if(!hMod)
{
MessageBox(NULL,"Error - module","Error",MB_OK | MB_IConerror);
}
else
{
_capCreateCaptureWindowW = (LDCAPWND)GetProcAddress(hMod,"capCreateCaptureWindowW");
if(!_capCreateCaptureWindowW)
{
MessageBox(NULL,"Error - function","Error",MB_OK | MB_IConerror);
}
else
{
HWND hCam = _capCreateCaptureWindowW((LPCWSTR) "Capture Window",WS_CHILD | WS_VISIBLE | SS_SIMPLE,10,100,200,200,hwnd,0);
}
}
FreeLibrary(hMod);
SendMessage (hCam, WM_CAP_DRIVER_CONNECT, 0 /* wIndex */, 0L);
I use Dev Cpp 4.9.9.2 and WindowsXP.
I give up, and have no idea.
I really need to use it's.
But How?
Please help me
Thank you

New Topic/Question
Reply



MultiQuote





|