如何调用函数iidc_lockdata()
新手请教大家如何调用下面这个函数*********************
void* iidc_lockdata( HIIDC h, -1)
HIIDC h; handle to specify the camera
Return Values
If the function succeeds, the return value is pointer to frame buffer.
If the function fails, the return value is 0.
*********************
如果用VC++,用下面代码就可以把数据导入Imgbuffer中
Imgbuffer=(LPBYTE)iidc_lockdata(hCamera,-1)
但在VB6中该如何用呢?函数返回的是个指针,下面的代码对吗?
Private Declare Function (iidc_lockdata Lib "IIDCAPI_SONY.DLL" Alias "#37" (ByVal HIIDC as Long, -1) As Long
Dim Height,Width,ImgSize as long
Dim ImgData() as Byte
Height=1280
Width=960
ImgSize=Height*Width
Redim ImgData(1 to Height, 1 to Width)
ImgData = iidc_lockdata(hCamera,-1)
or
ImgData(1,1) = iidc_lockdata(hCamera,-1)
第一个说不能返回到数组,第二个说overflow,我想是把指针的数值给了ImgData(1,1)。那位大侠告诉我该怎么调用,谢谢!