Home > database >  Pb call hd camera black screen
Pb call hd camera black screen

Time:09-15

Such as title, using pb in your program called cameras photographed and saved to the database, the original camera was successful, but in the hd camera, camera direct black screen interface, the code is as follows:
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 same

CodePudding 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 own

CodePudding user response:

What demand, I have a call camera ocx, OpenCV encapsulation,

CodePudding user response:

refer to 6th floor xiaozhe_song response:
what demand, I have a call camera ocx, OpenCV encapsulation,


Requirements through the camera photo id saved to the phone, and displayed in the ole control, save to essentially when confirmed, I can do to save to the phone now, but only show pictures of ole controls, as shown in figure

CodePudding user response:

Change a method, browse, first take out from the database, put a temporary location, and then use controls loading images,

CodePudding user response:

The direct use of image control can, whether it is a BLOB data uploaded or files directly setpicture method line

CodePudding user response:




String ls_photofile, ls_name
String ls_named
The integer li_value
Long ll_pos, ll_filelen
//select photo files
Li_value=https://bbs.csdn.net/topics/GetFileOpenName (" select image files ", & amp;
+ ls_photofile, ls_named, "image", & amp;
+ "BMP Files (*. BMP), *. BMP," & amp;
+ "JPG Files (*.jpg), *. JPG")
If ls_photofile='or isnull (ls_photofile) then return 0
Ll_filelen=FileLength (ls_photofile)
IF ll_filelen & gt; THEN 327650
Messagebox (' error 'and' files beyond the maximum limit of 320 k, it is recommended to use the size of 320 k pictures below! ')
Return 0
End the if
Sle_photo. Text=ls_photofile
Ls_name=ls_photofile
Ll_pos=pos (ls_name, '\')
The do while ll_pos & gt; 0
Ls_name=right (ls_name, len (ls_name) - ll_pos)
Ll_pos=pos (ls_name, '\')
Loop
Sle_name. Text=ls_name
The integer li_fnum, li_set
Long ll_bytes
Blob Emp_Id_Pic
Li_fnum=FileOpen (ls_photofile StreamMode!)
Ll_bytes=FileReadEx (li_fnum Emp_Id_Pic)
If isnull (ll_bytes) then ll_bytes=1

Il_picread=ll_bytes
If il_picread & gt; 0 then
Ib_pic=Emp_Id_Pic
The else
Return 0
End the if

nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related