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
UsbGetInterface
Go to RapidDriver Main Page


Language

Description

C/C++
BOOL UsbGetInterface(IN USB_DEVICE_HANDLE hUsb, 
IN UCHAR InterfaceIndex,   
IN PUCHAR InterfaceNum);  

Delphi
function UsbGetInterface(hUsb             : USB_DEVICE_HANDLE;
                         InterfaceIndex   : UCHAR;
                         var InterfaceNum : UCHAR) : BOOL; stdcall;

VB
Function UsbGetInterface (ByVal hUsb As Long, _
                          ByVal InterfaceIndex As Byte, _
                          ByRef InterfaceNumber As Byte) As Boolean



Parameters
 
hUsb  
Specifies handle to USB device  
 
InterfaceIndex  
Device defined index of interface  
 
InterfaceNum  
Value returned from device     

Return Value
 
If function fails it return FALSE. To detect error call GetLastError function.  
   
Description
 
Function return in InterfaceNum currently active alternate setting for a particular interface.  

Note
 
This function is not supported in WindowsXP.