WinUsb_GetCurrentAlternateSetting function
The WinUsb_GetCurrentAlternateSetting function gets the current alternate interface setting for an interface. This is a synchronous operation.
Syntax
BOOL __stdcall WinUsb_GetCurrentAlternateSetting( _In_ WINUSB_INTERFACE_HANDLE InterfaceHandle, _Out_ PUCHAR AlternateSetting );
Parameters
- InterfaceHandle [in]
-
An opaque handle to an interface in the selected configuration. To get the current alternate setting in the first (default) interface on the device, use the interface handle returned by WinUsb_Initialize. For all other interfaces, use the handle to the target interface, retrieved by WinUsb_GetAssociatedInterface.
- AlternateSetting [out]
-
A pointer to an unsigned character that receives an integer that indicates the current alternate setting.
Return value
WinUsb_GetCurrentAlternateSetting returns TRUE if the operation succeeds. Otherwise, this routine returns FALSE, and the caller can retrieve the logged error by calling GetLastError.
GetLastError can return the following error code.
Return code | Description |
---|---|
|
The caller passed NULL in the InterfaceHandle parameter. |
Requirements
Header |
|
---|---|
Library |
|
See also
Send comments about this topic to Microsoft
Build date: 12/5/2013