FunVB Newbie
Joined: 15 Jul 2005 Posts: 2
|
Posted: Jul 15th, 2005 11:48 AM Post subject: SONY Puppy FIU (C++ to VB) |
|
|
I am using a Finger Identification Unit (FIU) from Sony. The SDK provided with the hardware unit has C++ sample code. The SDK comes with a .LIB, .DLL and .h files.
I am writing this code in VB5 and am getting an error. The header file has the following declaratives
#define FIU_PORT_USB 3
DWORD APIENTRY FIUAcquireDevice(LPDWORD lpdwHandle, DWORD dwPortType, DWORD PortAddress, LPBYTE lpbReserved);
and the function call is
ret = FIUAcquireDevice(&DeviceHandleList[i], FIU_PORT_USB, NULL, 0);
This function returns a handle to the hardware.
I converted the declaritive in VB as
Public Const FIU_PORT_USB = 3
Declare Function FIUAcquireDevice Lib "FIU32.dll" _
(ByRef lpdwHandle As Long, _
ByVal dwPortType As Long, _
ByVal PortAddress As Long, _
ByRef lpbReserved As Byte)
When I call the function as
dwReturnValue = FIUAcquireDevice(dwHandle, FIU_PORT_USB, Null, 0)
I get a invalid use of Null. When I change the call to
dwReturnValue = FIUAcquireDevice(dwHandle, FIU_PORT_USB, 0, 0)
I get a an error 131077 (ENCRYPTION_OFF) error.
Has anyone used the SONY Puppy using Visual Basic ? Is there anything wrong with the above code ?
Please help.
Thanks. |
|