Opens the RapidUSB.sys kernel mode WDM device driver under Windows
2000/XP, providing direct access to the USB hardware.
Language
|
Description
|
C/C++
|
HANDLE OpenRapidUsb ( ULONG DeviceInstance )
|
Delphi
|
function OpenRapidUsb ( DeviceInstance : Longword) : THandle; stdcall
|
VB
|
Function OpenRapidUsb ( ByVal DeviceInstance As Long) As Long
|
Parameters:
DeviceInstance - USB device instance.
Return Value:
The RapidUSB handle value or NULL if fails. Keep this handle opened all time when you are working with RapidUSB functions and close by CloseRapidUSB() at end of application.
Comments:
If the driver was successfully opened, the IsRapidUSBOpened() returns True; if the function fails, the IsRapidUSBOpened() returns False.
With RapidUSB you can support as many USB devices as you want. To select the device you need to change DeviceInstance value from 0 up to maximum number of USB device installed with RapidUSB driver. For the first application use
hUSB = OpenRapidUsb(0);
For second:
hUSB = OpenRapidUsb(1);
and so on.
See also: CloseRapidUSB IsRapidUSBOpened
|