Home    Prev Next    
Contents
Programming For USB Device
Overview
Programmers Guide
Scenario
Data transfer
Synchronous Transfer
Asynchronous Transfer
Reading Descriptors
USB Support Routines And Structures
Common Procedures
UsbEnumerateDevices
OpenRapidUsb
IsRapidUsbOpened
CloseRapidUsb
Descriptors
UsbGetDescriptor
UsbGetDeviceDescriptor
UsbGetStringDescriptor
UsbGetConfigDescriptor
UsbFreeConfigDescriptor
UsbGetInterfaceDescriptor
UsbFreeInterfaceDescriptor
UsbGetEndpointDescriptor
Configure Device
UsbGetDeviceInfo
UsbUnconfigureDevice
UsbSelectConfig
UsbGetConfig
UsbSelectInterface
UsbGetInterface
UsbResetDevice
UsbGetBandwidthInfo
UsbCyclePort
Features and Status
UsbSetFeature
UsbClearFeature
UsbGetStatus
Vendor/Class Requests
UsbVendorRequestIn
UsbVendorRequestOut
UsbClassRequestIn
UsbClassRequestOut
Pipes
IsRapidUsbPipeOpened
UsbPipeOpen
UsbPipeClose
UsbGetPipeCount
UsbPipeGetInfo
UsbPipeDirectionIn
UsbPipeGetType
UsbTransfer
UsbTransferAsync
TRANSFER_COMPLETION_ROUTINE
UsbCancelTransfer
UsbPipeReset
UsbPipeAbort
Other
UsbGetPortStatus
UsbGetCurrentFrameNumber
USB Structures and Types
RDUSB_DEVICE_INFORMATION
RDUSB_PIPE_INFORMATION
RDUSB_PIPE_TYPE
RDUSB_BANDWIDTH_INFORMATION
OpenRapidUsb
Go to RapidDriver Main Page

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