Hi there
I was calling this C++ function from vb and i got the error "Attempted to read or write protected memory..."
Here's the code:
The prototype of the API is:
voidWINAPIAvzGetImage(unsigned short DeviceID, unsigned char *Image,unsigned short FingerOn)
DeviceID = Device ID
Image = Data Of The Image
FingerOn = Is always 1
So, in vb, i tried calling it using:
Declare Auto Sub AvzGetImage Lib "AvzScanner.dll" (ByVal DID As UShort, ByRef img() As Byte, ByVal finger As UShort)
Dim img(280 * 280 - 1) as Byte
AvzGetImage(0, img, 1)
However, it would return me the stated error. Anyone any idea? =D