Home > Software engineering >  How to transfer the DLL in the c statement to vb statement
How to transfer the DLL in the c statement to vb statement

Time:10-07

Typedef int (CALLBACK * DS_SNAP_PROC) (BYTE * pImageBuffer);

DT_API DS_CAMERA_STATUS CameraInit (DS_SNAP_PROC pCallbackFunction, DS_RESOLUTION uiResolution, BYTE TriggerMode, HWND hWndDisplay, BYTE CamNum, HWND MsHWND);
Please give this two sentences into a statement of vb, the first sentence statement a callback function, the DLL below statement used in this function,

CodePudding user response:

The callback
Declare the Function Lib XXX "DLL name" (parameters) As XXX (or not)
Then write a function in the module, then any place? (=XXX... The AddressOf your function name)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
DT_API DS_CAMERA_STATUS so structure as stated in vb, not reference to vb - "c conversion, stated as well as the callback
  •  Tags:  
  • API
  • Related