Claim and obtain a handle for a device identified by UsbWaitForEvent, UsbEventsWithCallback, UsbFindFirstDevice, UsbFindNextDevice.
int32_t UsbOpenDevice( 
    struct usbDeviceInfo * udi, 
    char * drvrname, 
    int32_t * udev, 
    void * data 
); 
Parameters
udi 
- Pointer to  usbDeviceInfo structure returned from UsbWaitForEvent, UsbEventsWithCallback, UsbFindFirstDevice or UsbFindNextDevice 
 drvname 
- The name to be associated with the handle returned (the "driver name"). 
 udev  
- Pointer to a variable to receive the handle for this device. 
 data 
- User-defined data to be associated with this device. 
 
Return Values
| USB_ERR_NORMAL_COMPLETION | 
Success. The device was claimed and a valid handle returned. | 
| USB_ERR_NO_STACK | 
The USB stack is not ready. | 
| USB_ERR_MEMORY | 
Memory could not be allocated for the operation. | 
| USB_ERR_IN_USE | 
The device has already been claimed. | 
| USB_ERR_INVAL | 
Any of udi, drvname or udev is not a valid pointer. | 
Requirements
| Versions | 
Defined in | 
Include | 
Link to | 
| INtime 5.0 | 
intime/rt/include/usbif3h | 
usbif3h | 
usbif3lib |