Through capCreateCaptureWindowA open cameras,
String lpszName
Ulong l1
L1=handle (p_1)
LpszName='camera interface... '
Lhand=capCreateCaptureWindowA (lpszName, 262144 + 12582912 + 1073741824 + 268435456, 5, 30320240, l1, 0)
If lhand & lt;> 0 then
Send (lhand WM_CAP_SET_CALLBACK_VIDEOSTREAM, 0, 0)
Send (lhand WM_CAP_SET_CALLBACK_ERROR, 0, 0)
Send (lhand WM_CAP_SET_CALLBACK_STATUSA, 0, 0)
Send (lhand WM_CAP_DRIVER_CONNECT, 0, 0)
Send (lhand WM_CAP_SET_SCALE, 1, 0)
Send (lhand WM_CAP_SET_PREVIEWRATE, 66, 0)
Send (lhand WM_CAP_SET_OVERLAY, 1, 0)
Send (lhand WM_CAP_SET_PREVIEW, 1, 0)
End the if
Consult how to solve this problem? thank you
CodePudding user response:
Lhand=capCreateCaptureWindowA (lpszName, 262144 + 12582912 + 1073741824 + 268435456, UnitsToPixels (0, XUnitsToPixels!) , UnitsToPixels (0, YUnitsToPixels! , UnitsToPixels (parent. The width to 25, XUnitsToPixels!) , UnitsToPixels (1890, YUnitsToPixels!) , l1, 0)CodePudding user response:
This is to use getbitmap. DLL files, whether file version is not the sameCodePudding user response:
1/f, not tried, my code is as follows:String lpszName
Ulong l1
L1=handle (p_1)
LpszName='camera interface... '
Lhand=capCreateCaptureWindowA (lpszName, 262144 + 12582912 + 1073741824 + 268435456, 5, 30320240, l1, 0)
If lhand & lt;> 0 then
Send (lhand WM_CAP_SET_CALLBACK_VIDEOSTREAM, 0, 0)
Send (lhand WM_CAP_SET_CALLBACK_ERROR, 0, 0)
Send (lhand WM_CAP_SET_CALLBACK_STATUSA, 0, 0)
Send (lhand WM_CAP_DRIVER_CONNECT, 0, 0)
Send (lhand WM_CAP_SET_SCALE, 1, 0)
Send (lhand WM_CAP_SET_PREVIEWRATE, 66, 0)
Send (lhand WM_CAP_SET_OVERLAY, 1, 0)
Send (lhand WM_CAP_SET_PREVIEW, 1, 0)
end if
CodePudding user response:
Reply to the second floor, I from the Internet to download the DLL file, you said no success, I refer to external files are as follows:The function ulong getwindowdc (ulong HWND) library "user32. DLL" alias for "getwindowdc
"The function ulong capcreatecapturewindowa (string lpszwindowname, ulong dwstyle, long x, long y, long nwidth, long nheight, ulong parentwin, long nid) library "AVICAP32. DLL" alias for "capcreatecapturewindowa; Ansi
"The function of integer out_num (integer irow) library "getbitmap. DLL" alias for "out_num
"The function integer getbitmapfromscreen (string filename) library "getbitmap. DLL" alias for "getbitmapfromscreen; Ansi
"The function integer getbitmapfromwindow (string lpfilename, ulong HWDC, integer x, integer y, integer w, integer h, integer zoom) library "getbitmap. DLL" alias for "getbitmapfromwindow; Ansi
"The function integer grabimage (ulong HWNDC, string path) library "getbitmap. DLL" alias for "grabimage; Ansi
"The function of integer stopkinescope (ulong HWNDC) library "getbitmap. DLL" alias for "stopkinescope
"The function integer kinescope (ulong HWNDC, string filename) library "getbitmap. DLL" alias for kinescope; "" Ansi
"
CodePudding user response:
You had better install the hd driver and the corresponding camera software, then search up getbitmap. DLL, try to use their ownCodePudding user response:
What demand, I have a call camera ocx, OpenCV encapsulation,CodePudding user response: