- May 21, 2001
- 25,776
- 4,305
- 126
I need to use a function in a 3rd party library nameed OOIDRV32.DLL. I have had no problems using that library in the past for most functions. But, there are a few functions that I have never been able to use since I couldn't figure out how. If anyone could help with this one example, I could easilly convert it to other functions.
A module that is supposed to be included in the project has this declaration:
Declare Function USB2000_IdentifyUSB2000 Lib "OOIDRV32.DLL" Alias "#402" (ByVal DevNum As Integer, SerNum As Byte) As Long
I am getting the proper DevNum returned from that function. I am getting the proper long result from the function (1 if it works and 0 if it doesn't). However, I am only getting the first part of SerNum. I need SerNum to be a string that looks like this "USB2E7477". All I get is SerNum = 85, and 85 is the ASCII code for "U".
The manual for that library says this:
Clearly, a byte is just one ASCII character. Is it possible to get an array of ASCII values or is the library just fuc&ed?
A module that is supposed to be included in the project has this declaration:
Declare Function USB2000_IdentifyUSB2000 Lib "OOIDRV32.DLL" Alias "#402" (ByVal DevNum As Integer, SerNum As Byte) As Long
I am getting the proper DevNum returned from that function. I am getting the proper long result from the function (1 if it works and 0 if it doesn't). However, I am only getting the first part of SerNum. I need SerNum to be a string that looks like this "USB2E7477". All I get is SerNum = 85, and 85 is the ASCII code for "U".
The manual for that library says this:
Bool USB2000_ItentifyUSB2000(int devnum, char* serialnumber)
Parameter: Use
devnum: An index from 0 to 127
serialnumber: The returned serial number from the USB2000
Return value: This function returns TRUE if the device is a USB2000, FALSE otherwise.
! To use this function in Visual Basic or Visual Basic for Applications, convert the serial number from an array of ASCII values.
Clearly, a byte is just one ASCII character. Is it possible to get an array of ASCII values or is the library just fuc&ed?