17 #ifndef _LIBUSBK_LIBK_TYPES
31 typedef INT_PTR (FAR WINAPI* KPROC)();
34 #if defined(DYNAMIC_DLL)
41 #if !defined(KUSB_API)
42 #define KUSB_API WINAPI
48 #pragma warning(disable:4200)
49 #pragma warning(disable:4201)
50 #pragma warning(disable:4214) // named type definition in parentheses
60 typedef union _KUSB_SETUP_PACKET
150 typedef enum _KLIB_HANDLE_TYPE
187 typedef struct _KLIB_VERSION
207 #ifndef _LIBUSBK_ISOK_TYPES
222 #ifndef _LIBUSBK_LSTK_TYPES
228 #define KLST_STRING_MAX_LEN 256
238 typedef enum _KLST_SYNC_FLAG
260 typedef struct _KLST_DEV_COMMON_INFO
284 typedef struct _KLST_DEVINFO
350 typedef enum _KLST_FLAG
371 typedef struct _KLST_PATTERN_MATCH
407 _in KLST_HANDLE DeviceList,
408 _in KLST_DEVINFO_HANDLE DeviceInfo,
417 #include <pshpack1.h>
423 #define USBD_ISO_START_FRAME_RANGE 1024
428 typedef enum _BMREQUEST_DIR
430 BMREQUEST_DIR_HOST_TO_DEVICE = 0,
431 BMREQUEST_DIR_DEVICE_TO_HOST = 1,
435 typedef enum _BMREQUEST_TYPE
448 typedef enum _BMREQUEST_RECIPIENT
464 #define MAXIMUM_USB_STRING_LENGTH 255
467 typedef enum _USB_GETSTATUS
477 typedef enum _USB_DESCRIPTOR_TYPE
517 #define USB_DESCRIPTOR_MAKE_TYPE_AND_INDEX(d, i) \
518 ((USHORT)((USHORT)d<<8 | i))
521 #define USB_ENDPOINT_TYPE_MASK 0x03
524 #define USB_ENDPOINT_TYPE_CONTROL 0x00
527 #define USB_ENDPOINT_TYPE_ISOCHRONOUS 0x01
530 #define USB_ENDPOINT_TYPE_BULK 0x02
533 #define USB_ENDPOINT_TYPE_INTERRUPT 0x03
536 #define USB_CONFIG_POWERED_MASK 0xc0
539 typedef enum _USB_CONFIG_BM_ATTRIBUTE_ENUM
552 #define USB_ENDPOINT_DIRECTION_MASK 0x80
555 #define USB_ENDPOINT_ADDRESS_MASK 0x0F
561 #define USB_ENDPOINT_DIRECTION_OUT(addr) (!((addr) & USB_ENDPOINT_DIRECTION_MASK))
567 #define USB_ENDPOINT_DIRECTION_IN(addr) ((addr) & USB_ENDPOINT_DIRECTION_MASK)
576 typedef enum _USB_REQUEST_ENUM
617 typedef enum _USB_DEVICE_CLASS_ENUM
652 typedef struct _USB_DEVICE_DESCRIPTOR
708 typedef struct _USB_ENDPOINT_DESCRIPTOR
744 #pragma warning(push)
746 #pragma warning (disable:4201)
747 #pragma warning(disable:4214) // named type definition in parentheses
756 typedef struct _USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR
774 UCHAR MaxStreams : 5;
786 UCHAR SspCompanion : 1;
803 typedef struct _BOS_DEV_CAPABILITY_DESCRIPTOR
815 UCHAR CapabilityData[0];
819 typedef enum _BOS_CAPABILITY_TYPE
877 typedef struct _BOS_DESCRIPTOR
891 UCHAR DevCapabilityDescriptors[0];
896 typedef struct _BOS_USB_2_0_EXTENSION_DESCRIPTOR
913 typedef struct _BOS_SS_USB_DEVICE_CAPABILITY_DESCRIPTOR
942 typedef struct _BOS_CONTAINER_ID_DESCRIPTOR
957 UCHAR ContainerID[16];
962 typedef struct _BOS_PLATFORM_DESCRIPTOR
971 UCHAR bDevCapabilityType;
980 UCHAR PlatformCapabilityUUID[16];
983 UCHAR CapabilityData[0];
987 typedef struct _BOS_WINDOWS_PLATFORM_VERSION
1021 typedef struct _USB_MSOSV1_STRING_DESCRIPTOR
1031 UCHAR qwSignature[14];
1045 typedef enum _MSOS_FEATURE_TYPE
1067 typedef struct _MSOSV1_EXTENDED_COMPAT_ID_DESCRIPTOR
1084 }MSOSV1_EXTENDED_COMPAT_ID_DESCRIPTOR, *PMSOSV1_EXTENDED_COMPAT_ID_DESCRIPTOR;
1087 typedef struct _MSOSV1_FUNCTION_DESCRIPTOR
1109 UCHAR CompatibleID[8];
1117 UCHAR SubCompatibleID[8];
1134 typedef struct _MSOSV1_EXTENDED_PROP_DESCRIPTOR
1149 UCHAR CustomProperties[0];
1151 }MSOSV1_EXTENDED_PROP_DESCRIPTOR, * PMSOSV1_EXTENDED_PROP_DESCRIPTOR;
1170 typedef struct _MSOSV1_CUSTOM_PROP_DESCRIPTOR
1190 UCHAR CustomProperty[0];
1195 typedef struct _MSOS_CUSTOM_PROP_ELEMENT
1197 USHORT wPropertyNameLength;
1198 PWCHAR pPropertyName;
1199 USHORT wPropertyDataLength;
1200 PUCHAR pPropertyData;
1209 typedef enum _MSOSV2_DESCRIPTOR_TYPE
1241 typedef struct _MSOSV2_COMMON_DESCRIPTOR
1252 typedef struct _MSOSV2_SET_HEADER_DESCRIPTOR
1269 typedef struct _MSOSV2_SUBSET_HEADER_CONFIGURATION_DESCRIPTOR
1289 typedef struct _MSOSV2_SUBSET_HEADER_FUNCTION_DESCRIPTOR
1316 typedef struct _MSOSV2_FEATURE_COMPATBLE_ID_DESCRIPTOR
1330 UCHAR CompatibleID[8];
1338 UCHAR SubCompatibleID[8];
1356 typedef struct _MSOSV2_FEATURE_REG_PROPERTY_DESCRIPTOR
1379 UCHAR CustomProperty[0];
1397 typedef struct _MSOSV2_FEATURE_MIN_RESUME_TIME_DESCRIPTOR
1418 typedef struct _MSOSV2_FEATURE_MODEL_ID_DESCRIPTOR
1438 typedef struct _MSOSV2_FEATURE_CCGP_DESCRIPTOR
1460 typedef struct _MSOSV2_FEATURE_VENDOR_REVISION_DESCRIPTOR
1478 #if _MSC_VER >= 1200
1479 #pragma warning(pop)
1489 typedef struct _USB_CONFIGURATION_DESCRIPTOR
1526 typedef struct _USB_INTERFACE_DESCRIPTOR
1564 typedef struct _USB_STRING_DESCRIPTOR
1580 typedef struct _USB_COMMON_DESCRIPTOR
1592 #if _MSC_VER >= 1200
1593 #pragma warning(push)
1595 #pragma warning (disable:4201)
1596 #pragma warning(disable:4214) // named type definition in parentheses
1612 typedef struct _USB_INTERFACE_ASSOCIATION_DESCRIPTOR
1642 #if _MSC_VER >= 1200
1643 #pragma warning(pop)
1648 #include <poppack.h>
1651 #ifndef _LIBUSBK_LIBK_TYPES
1657 typedef enum _KUSB_PROPERTY
1668 typedef enum _KUSB_DRVID
1688 typedef enum _KUSB_FNID
1810 _out KUSB_HANDLE* InterfaceHandle,
1811 _in KLST_DEVINFO_HANDLE DevInfo);
1814 _in KUSB_HANDLE InterfaceHandle);
1816 typedef BOOL
KUSB_API KUSB_ClaimInterface (
1817 _in KUSB_HANDLE InterfaceHandle,
1818 _in UCHAR NumberOrIndex,
1821 typedef BOOL
KUSB_API KUSB_ReleaseInterface (
1822 _in KUSB_HANDLE InterfaceHandle,
1823 _in UCHAR NumberOrIndex,
1826 typedef BOOL
KUSB_API KUSB_SetAltInterface (
1827 _in KUSB_HANDLE InterfaceHandle,
1828 _in UCHAR NumberOrIndex,
1830 _in UCHAR AltSettingNumber);
1832 typedef BOOL
KUSB_API KUSB_GetAltInterface (
1833 _in KUSB_HANDLE InterfaceHandle,
1834 _in UCHAR NumberOrIndex,
1836 _out PUCHAR AltSettingNumber);
1838 typedef BOOL
KUSB_API KUSB_GetDescriptor (
1839 _in KUSB_HANDLE InterfaceHandle,
1840 _in UCHAR DescriptorType,
1842 _in USHORT LanguageID,
1844 _in UINT BufferLength,
1845 _outopt PUINT LengthTransferred);
1847 typedef BOOL
KUSB_API KUSB_ControlTransfer (
1848 _in KUSB_HANDLE InterfaceHandle,
1850 _refopt PUCHAR Buffer,
1851 _in UINT BufferLength,
1852 _outopt PUINT LengthTransferred,
1853 _inopt LPOVERLAPPED Overlapped);
1855 typedef BOOL
KUSB_API KUSB_SetPowerPolicy (
1856 _in KUSB_HANDLE InterfaceHandle,
1857 _in UINT PolicyType,
1858 _in UINT ValueLength,
1861 typedef BOOL
KUSB_API KUSB_GetPowerPolicy (
1862 _in KUSB_HANDLE InterfaceHandle,
1863 _in UINT PolicyType,
1864 _ref PUINT ValueLength,
1867 typedef BOOL
KUSB_API KUSB_SetConfiguration (
1868 _in KUSB_HANDLE InterfaceHandle,
1869 _in UCHAR ConfigurationNumber);
1871 typedef BOOL
KUSB_API KUSB_GetConfiguration (
1872 _in KUSB_HANDLE InterfaceHandle,
1873 _out PUCHAR ConfigurationNumber);
1875 typedef BOOL
KUSB_API KUSB_ResetDevice (
1876 _in KUSB_HANDLE InterfaceHandle);
1878 typedef BOOL
KUSB_API KUSB_Initialize (
1879 _in HANDLE DeviceHandle,
1880 _out KUSB_HANDLE* InterfaceHandle);
1882 typedef BOOL
KUSB_API KUSB_SelectInterface (
1883 _in KUSB_HANDLE InterfaceHandle,
1884 _in UCHAR NumberOrIndex,
1887 typedef BOOL
KUSB_API KUSB_GetAssociatedInterface (
1888 _in KUSB_HANDLE InterfaceHandle,
1889 _in UCHAR AssociatedInterfaceIndex,
1890 _out KUSB_HANDLE* AssociatedInterfaceHandle);
1893 _in KUSB_HANDLE InterfaceHandle,
1894 _out KUSB_HANDLE* DstInterfaceHandle);
1896 typedef BOOL
KUSB_API KUSB_QueryInterfaceSettings (
1897 _in KUSB_HANDLE InterfaceHandle,
1898 _in UCHAR AltSettingIndex,
1899 _out PUSB_INTERFACE_DESCRIPTOR UsbAltInterfaceDescriptor);
1901 typedef BOOL
KUSB_API KUSB_QueryDeviceInformation (
1902 _in KUSB_HANDLE InterfaceHandle,
1903 _in UINT InformationType,
1904 _ref PUINT BufferLength,
1905 _ref PUCHAR Buffer);
1907 typedef BOOL
KUSB_API KUSB_SetCurrentAlternateSetting (
1908 _in KUSB_HANDLE InterfaceHandle,
1909 _in UCHAR AltSettingNumber);
1911 typedef BOOL
KUSB_API KUSB_GetCurrentAlternateSetting (
1912 _in KUSB_HANDLE InterfaceHandle,
1913 _out PUCHAR AltSettingNumber);
1915 typedef BOOL
KUSB_API KUSB_QueryPipe (
1916 _in KUSB_HANDLE InterfaceHandle,
1917 _in UCHAR AltSettingNumber,
1918 _in UCHAR PipeIndex,
1921 typedef BOOL
KUSB_API KUSB_QueryPipeEx(
1922 _in KUSB_HANDLE InterfaceHandle,
1923 _in UCHAR AlternateSettingNumber,
1924 _in UCHAR PipeIndex,
1927 typedef BOOL
KUSB_API KUSB_GetSuperSpeedPipeCompanionDescriptor(
1928 __in KUSB_HANDLE Handle,
1929 __in UCHAR AltSettingNumber,
1930 __in UCHAR PipeIndex,
1931 __out PUSB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR PipeCompanionDescriptor);
1933 typedef BOOL
KUSB_API KUSB_SetPipePolicy (
1934 _in KUSB_HANDLE InterfaceHandle,
1936 _in UINT PolicyType,
1937 _in UINT ValueLength,
1940 typedef BOOL
KUSB_API KUSB_GetPipePolicy (
1941 _in KUSB_HANDLE InterfaceHandle,
1943 _in UINT PolicyType,
1944 _ref PUINT ValueLength,
1947 typedef BOOL
KUSB_API KUSB_ReadPipe (
1948 _in KUSB_HANDLE InterfaceHandle,
1951 _in UINT BufferLength,
1952 _outopt PUINT LengthTransferred,
1953 _inopt LPOVERLAPPED Overlapped);
1955 typedef BOOL
KUSB_API KUSB_WritePipe (
1956 _in KUSB_HANDLE InterfaceHandle,
1959 _in UINT BufferLength,
1960 _outopt PUINT LengthTransferred,
1961 _inopt LPOVERLAPPED Overlapped);
1963 typedef BOOL
KUSB_API KUSB_ResetPipe (
1964 _in KUSB_HANDLE InterfaceHandle,
1967 typedef BOOL
KUSB_API KUSB_AbortPipe (
1968 _in KUSB_HANDLE InterfaceHandle,
1971 typedef BOOL
KUSB_API KUSB_FlushPipe (
1972 _in KUSB_HANDLE InterfaceHandle,
1975 typedef BOOL
KUSB_API KUSB_IsoReadPipe (
1976 _in KUSB_HANDLE InterfaceHandle,
1979 _in UINT BufferLength,
1980 _in LPOVERLAPPED Overlapped,
1983 typedef BOOL
KUSB_API KUSB_IsoWritePipe (
1984 _in KUSB_HANDLE InterfaceHandle,
1987 _in UINT BufferLength,
1988 _in LPOVERLAPPED Overlapped,
1991 typedef BOOL
KUSB_API KUSB_GetCurrentFrameNumber (
1992 _in KUSB_HANDLE InterfaceHandle,
1993 _out PUINT FrameNumber);
1995 typedef BOOL
KUSB_API KUSB_GetOverlappedResult (
1996 _in KUSB_HANDLE InterfaceHandle,
1997 _in LPOVERLAPPED Overlapped,
1998 _out PUINT lpNumberOfBytesTransferred,
2001 typedef BOOL
KUSB_API KUSB_GetProperty (
2002 _in KUSB_HANDLE InterfaceHandle,
2004 _ref PUINT PropertySize,
2007 typedef BOOL
KUSB_API KUSB_IsochReadPipe(
2008 _in KISOCH_HANDLE IsochHandle,
2009 _inopt UINT DataLength,
2010 _refopt PUINT FrameNumber,
2011 _inopt UINT NumberOfPackets,
2012 _in LPOVERLAPPED Overlapped);
2014 typedef BOOL
KUSB_API KUSB_IsochWritePipe(
2015 _in KISOCH_HANDLE IsochHandle,
2016 _inopt UINT DataLength,
2017 _refopt PUINT FrameNumber,
2018 _inopt UINT NumberOfPackets,
2019 _in LPOVERLAPPED Overlapped);
2028 typedef struct _KUSB_DRIVER_API_INFO
2045 typedef struct _KUSB_DRIVER_API
2066 KUSB_ClaimInterface* ClaimInterface;
2072 KUSB_ReleaseInterface* ReleaseInterface;
2078 KUSB_SetAltInterface* SetAltInterface;
2084 KUSB_GetAltInterface* GetAltInterface;
2090 KUSB_GetDescriptor* GetDescriptor;
2096 KUSB_ControlTransfer* ControlTransfer;
2102 KUSB_SetPowerPolicy* SetPowerPolicy;
2108 KUSB_GetPowerPolicy* GetPowerPolicy;
2114 KUSB_SetConfiguration* SetConfiguration;
2120 KUSB_GetConfiguration* GetConfiguration;
2126 KUSB_ResetDevice* ResetDevice;
2132 KUSB_Initialize* Initialize;
2138 KUSB_SelectInterface* SelectInterface;
2144 KUSB_GetAssociatedInterface* GetAssociatedInterface;
2156 KUSB_QueryInterfaceSettings* QueryInterfaceSettings;
2162 KUSB_QueryDeviceInformation* QueryDeviceInformation;
2168 KUSB_SetCurrentAlternateSetting* SetCurrentAlternateSetting;
2174 KUSB_GetCurrentAlternateSetting* GetCurrentAlternateSetting;
2180 KUSB_QueryPipe* QueryPipe;
2186 KUSB_SetPipePolicy* SetPipePolicy;
2192 KUSB_GetPipePolicy* GetPipePolicy;
2198 KUSB_ReadPipe* ReadPipe;
2204 KUSB_WritePipe* WritePipe;
2210 KUSB_ResetPipe* ResetPipe;
2216 KUSB_AbortPipe* AbortPipe;
2222 KUSB_FlushPipe* FlushPipe;
2228 KUSB_IsoReadPipe* IsoReadPipe;
2234 KUSB_IsoWritePipe* IsoWritePipe;
2240 KUSB_GetCurrentFrameNumber* GetCurrentFrameNumber;
2246 KUSB_GetOverlappedResult* GetOverlappedResult;
2252 KUSB_GetProperty* GetProperty;
2258 KUSB_IsochReadPipe* IsochReadPipe;
2264 KUSB_IsochWritePipe* IsochWritePipe;
2270 KUSB_QueryPipeEx* QueryPipeEx;
2276 KUSB_GetSuperSpeedPipeCompanionDescriptor* GetSuperSpeedPipeCompanionDescriptor;
2290 #ifndef _LIBUSBK_HOTK_TYPES
2296 typedef enum _KHOT_FLAG
2331 typedef struct _KHOT_PARAMS
2376 #ifndef _LIBUSBK_OVLK_TYPES
2386 typedef enum _KOVL_WAIT_FLAG
2418 typedef enum _KOVL_POOL_FLAG
2420 KOVL_POOL_FLAG_NONE = 0L,
2427 #ifndef _LIBUSBK_STMK_TYPES
2436 typedef enum _KSTM_FLAG
2440 KSTM_FLAG_NO_PARTIAL_XFERS = 0x00100000,
2441 KSTM_FLAG_USE_TIMEOUT = 0x80000000,
2442 KSTM_FLAG_TIMEOUT_MASK = 0x0001FFFF
2449 typedef enum _KSTM_COMPLETE_RESULT
2464 typedef struct _KSTM_XFER_CONTEXT
2490 typedef struct _KSTM_INFO
2530 typedef INT
KUSB_API KSTM_ERROR_CB(_in PKSTM_INFO StreamInfo, _in PKSTM_XFER_CONTEXT XferContext, _in INT XferContextIndex, _in INT ErrorCode);
2536 typedef INT
KUSB_API KSTM_SUBMIT_CB(_in PKSTM_INFO StreamInfo, _in PKSTM_XFER_CONTEXT XferContext, _in INT XferContextIndex, _in LPOVERLAPPED Overlapped);
2542 typedef INT
KUSB_API KSTM_STARTED_CB(_in PKSTM_INFO StreamInfo, _in PKSTM_XFER_CONTEXT XferContext, _in INT XferContextIndex);
2548 typedef INT
KUSB_API KSTM_STOPPED_CB(_in PKSTM_INFO StreamInfo, _in PKSTM_XFER_CONTEXT XferContext, _in INT XferContextIndex);
2554 typedef INT
KUSB_API KSTM_COMPLETE_CB(_in PKSTM_INFO StreamInfo, _in PKSTM_XFER_CONTEXT XferContext, _in INT XferContextIndex, _in INT ErrorCode);
2582 typedef struct _KSTM_CALLBACK
2603 UCHAR z_F_i_x_e_d[64 -
sizeof(UINT_PTR) * 6];
2621 #ifndef _LIBUSBK_LIBK_FUNCTIONS
2724 _in UINT FunctionID);
2757 _out KPROC* ProcAddress,
2759 _in INT FunctionID);
2809 _in PVOID Reserved);
2825 #ifndef _LIBUSBK_USBK_FUNCTIONS
2910 _in UCHAR NumberOrIndex,
2951 _in UCHAR NumberOrIndex,
2981 _in UCHAR NumberOrIndex,
2983 _in UCHAR AltSettingNumber);
3012 _in UCHAR NumberOrIndex,
3014 _out PUCHAR AltSettingNumber);
3051 _in UCHAR DescriptorType,
3053 _in USHORT LanguageID,
3055 _in UINT BufferLength,
3056 _outopt PUINT LengthTransferred);
3103 _refopt PUCHAR Buffer,
3104 _in UINT BufferLength,
3105 _outopt PUINT LengthTransferred,
3106 _inopt LPOVERLAPPED Overlapped);
3159 _in UINT PolicyType,
3160 _in UINT ValueLength,
3201 _in UINT PolicyType,
3202 _ref PUINT ValueLength,
3228 _in UCHAR ConfigurationNumber);
3244 _out PUCHAR ConfigurationNumber);
3296 _in HANDLE DeviceHandle,
3322 _in UCHAR NumberOrIndex,
3352 _in UCHAR AssociatedInterfaceIndex,
3399 _in UCHAR AltSettingIndex,
3425 _in UINT InformationType,
3426 _ref PUINT BufferLength,
3427 _ref PUCHAR Buffer);
3449 _in UCHAR AltSettingNumber);
3470 _out PUCHAR AltSettingNumber);
3506 _in UCHAR AltSettingNumber,
3507 _in UCHAR PipeIndex,
3544 _in UCHAR AltSettingNumber,
3545 _in UCHAR PipeIndex,
3574 _in UCHAR AltSettingNumber,
3575 _in UCHAR PipeIndex,
3576 _out PUSB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR PipeCompanionDescriptor);
3682 _in UINT PolicyType,
3683 _in UINT ValueLength,
3713 _in UINT PolicyType,
3714 _ref PUINT ValueLength,
3751 _in UINT BufferLength,
3752 _outopt PUINT LengthTransferred,
3753 _inopt LPOVERLAPPED Overlapped);
3789 _in UINT BufferLength,
3790 _outopt PUINT LengthTransferred,
3791 _inopt LPOVERLAPPED Overlapped);
3883 _in UINT BufferLength,
3884 _in LPOVERLAPPED Overlapped,
3920 _in UINT BufferLength,
3921 _in LPOVERLAPPED Overlapped,
3939 _out PUINT FrameNumber);
3985 _inopt UINT DataLength,
3986 _refopt PUINT FrameNumber,
3987 _inopt UINT NumberOfPackets,
3988 _in LPOVERLAPPED Overlapped);
4035 _inopt UINT DataLength,
4036 _ref PUINT FrameNumber,
4037 _inopt UINT NumberOfPackets,
4038 _in LPOVERLAPPED Overlapped);
4095 _in LPOVERLAPPED Overlapped,
4096 _out PUINT lpNumberOfBytesTransferred,
4120 _ref PUINT PropertySize,
4128 #ifndef _LIBUSBK_LSTK_FUNCTIONS
4220 _inopt PVOID Context);
4335 #ifndef _LIBUSBK_HOTK_FUNCTIONS
4354 _ref PKHOT_PARAMS InitParams);
4378 #ifndef _LIBUSBK_OVLK_FUNCTIONS
4447 _in INT MaxOverlappedCount,
4529 _inopt INT TimeoutMS,
4531 _out PUINT TransferredLength);
4557 _inopt INT TimeoutMS,
4559 _out PUINT TransferredLength);
4585 _inopt INT TimeoutMS,
4586 _out PUINT TransferredLength);
4612 _inopt INT TimeoutMS,
4613 _out PUINT TransferredLength);
4657 #ifndef _LIBUSBK_STMK_FUNCTIONS
4706 _in INT MaxTransferSize,
4707 _in INT MaxPendingTransfers,
4708 _in INT MaxPendingIO,
4709 _inopt PKSTM_CALLBACK Callbacks,
4758 _in INT TimeoutCancelMS);
4799 _out PUINT TransferredLength);
4837 _out PUINT TransferredLength);
4842 #ifndef _LIBUSBK_ISOK_FUNCTIONS
4873 _in INT NumberOfPackets,
4874 _inopt INT StartFrame);
4912 _in INT PacketSize);
4930 _in INT PacketIndex,
4949 _in INT PacketIndex,
4972 _inopt INT StartPacketIndex,
4973 _inopt PVOID UserState);
4993 #ifndef _LIBUSBK_ISOCHK_FUNCTIONS
5033 _in UINT MaxNumberOfPackets,
5034 _in PUCHAR TransferBuffer,
5035 _in UINT TransferBufferSize);
5064 _in UINT PacketSize);
5093 _in UINT PacketIndex,
5124 _in UINT PacketIndex,
5125 _outopt PUINT Offset,
5126 _outopt PUINT Length,
5127 _outopt PUINT Status);
5149 _inopt UINT StartPacketIndex,
5150 _inopt PVOID UserState);
5167 _in BOOL IsHighSpeed,
5183 _out PUINT NumberOfPackets);
5197 _in UINT NumberOfPackets);
5248 _refopt PUCHAR Buffer,
5249 _in UINT BufferLength,
5250 _outopt PUINT LengthTransferred,
5251 _inopt LPOVERLAPPED Overlapped);
5275 _in UCHAR ConfigurationNumber);
5281 #if _MSC_VER >= 1200
5282 #pragma warning(pop)
5285 #endif // _LIBUSBK_H__
KUSB_EXP BOOL KUSB_API UsbK_GetDescriptor(_in KUSB_HANDLE InterfaceHandle, _in UCHAR DescriptorType, _in UCHAR Index, _in USHORT LanguageID, _out PUCHAR Buffer, _in UINT BufferLength, _outopt PUINT LengthTransferred)
Gets the requested descriptor. This is a synchronous operation.
UCHAR bInterfaceClass
USB-IF class code for this interface.
Definition: libusbk.h:1544
KLST_DEV_COMMON_INFO Common
Common usb device information.
Definition: libusbk.h:287
BMREQUEST_DIR
bmRequest.Dir
Definition: libusbk.h:428
KUSB_EXP BOOL KUSB_API IsochK_SetPacketOffsets(_in KISOCH_HANDLE IsochHandle, _in UINT PacketSize)
Convenience function for setting the offsets and lengths of all ISO packets of an isochronous transfe...
INT KUSB_API KSTM_COMPLETE_CB(_in PKSTM_INFO StreamInfo, _in PKSTM_XFER_CONTEXT XferContext, _in INT XferContextIndex, _in INT ErrorCode)
Function definition for an optional user-defined callback; executed when a valid transfer completes...
Summarizes configuration information for a function implemented by the device.
Definition: libusbk.h:867
INT KUSB_API KSTM_SUBMIT_CB(_in PKSTM_INFO StreamInfo, _in PKSTM_XFER_CONTEXT XferContext, _in INT XferContextIndex, _in LPOVERLAPPED Overlapped)
Function definition for an optional user-defined callback; executed to submit a transfer.
UsbK_GetProperty dynamic driver function id.
Definition: libusbk.h:1790
Microsoft OS 2.0 model ID descriptor.
Definition: libusbk.h:1231
KUSB_EXP BOOL KUSB_API UsbK_IsochReadPipe(_in KISOCH_HANDLE IsochHandle, _inopt UINT DataLength, _refopt PUINT FrameNumber, _inopt UINT NumberOfPackets, _in LPOVERLAPPED Overlapped)
Reads from an isochronous pipe. Supports LibusbK or WinUsb.
UCHAR bFirstInterface
First interface number of the set of interfaces that follow this descriptor.
Definition: libusbk.h:1621
Set or enable a specific feature.
Definition: libusbk.h:585
INT KUSB_API KSTM_STARTED_CB(_in PKSTM_INFO StreamInfo, _in PKSTM_XFER_CONTEXT XferContext, _in INT XferContextIndex)
Function definition for an optional user-defined callback; executed for each transfer context when th...
KUSB_EXP BOOL KUSB_API LibK_Context_Init(_inopt HANDLE Heap, _in PVOID Reserved)
Initializes the global libusbK process context.
UCHAR bDevCapabilityType
Capability type. See BOS_CAPABILITY_TYPE.
Definition: libusbk.h:922
If the i/o operation fails or completes successfully, release the OverlappedK back to its pool...
Definition: libusbk.h:2398
UCHAR bReserved
Reserved.
Definition: libusbk.h:1301
Defines the set of Wireless USB 1.1-specific device level capabilities.
Definition: libusbk.h:855
Shared USB handle. KUSB_HANDLE.
Definition: libusbk.h:159
UsbK_AbortPipe dynamic driver function id.
Definition: libusbk.h:1772
UCHAR bAlternateSetting
Value used to select this alternate setting for this interface.
Definition: libusbk.h:1538
KUSB_EXP BOOL KUSB_API UsbK_ReadPipe(_in KUSB_HANDLE InterfaceHandle, _in UCHAR PipeID, _out PUCHAR Buffer, _in UINT BufferLength, _outopt PUINT LengthTransferred, _inopt LPOVERLAPPED Overlapped)
Reads data from the specified pipe.
INT DriverID
Driver id this device element is using.
Definition: libusbk.h:290
UsbK_Initialize dynamic driver function id.
Definition: libusbk.h:1730
Invalid.
Definition: libusbk.h:2454
KUSB_EXP BOOL KUSB_API StmK_Stop(_in KSTM_HANDLE StreamHandle, _in INT TimeoutCancelMS)
Stops the internal stream thread.
KSTM_COMPLETE_RESULT KUSB_API KSTM_BEFORE_COMPLETE_CB(_in PKSTM_INFO StreamInfo, _in PKSTM_XFER_CONTEXT XferContext, _in INT XferContextIndex, _ref PINT ErrorCode)
Function definition for an optional user-defined callback; executed immediately after a transfer comp...
Standard request. See USB_REQUEST_ENUM.
Definition: libusbk.h:438
USHORT wLength
The length, in bytes, of this subset header. Shall be set to 8.
Definition: libusbk.h:1292
Container ID type.
Definition: libusbk.h:831
KUSB_EXP BOOL KUSB_API IsochK_SetPacket(_in KISOCH_HANDLE IsochHandle, _in UINT PacketIndex, _in UINT Offset, _in UINT Length, _in UINT Status)
Convenience function for setting all fields in an isochronous transfer packet.
Get the specified descriptor.
Definition: libusbk.h:591
KUSB_EXP BOOL KUSB_API HotK_Init(_out KHOT_HANDLE *Handle, _ref PKHOT_PARAMS InitParams)
Creates a new hot-plug handle for USB device arrival/removal event monitoring.
UCHAR bDescriptorType
Descriptor type.
Definition: libusbk.h:948
BOOL KUSB_API KLST_ENUM_DEVINFO_CB(_in KLST_HANDLE DeviceList, _in KLST_DEVINFO_HANDLE DeviceInfo, _in PVOID Context)
Device list enumeration function callback typedef.
Definition: libusbk.h:406
UCHAR bLength
Size of this descriptor (in bytes)
Definition: libusbk.h:1615
UCHAR bDescriptorType
Descriptor type.
Definition: libusbk.h:968
KUSB_EXP BOOL KUSB_API IsoK_SetPacket(_in PKISO_CONTEXT IsoContext, _in INT PacketIndex, _in PKISO_PACKET IsoPacket)
Convenience function for setting all fields of a KISO_PACKET.
USHORT bcdDevice
Device release number in binary-coded decimal.
Definition: libusbk.h:685
UsbK_QueryPipeEx dynamic driver function id.
Definition: libusbk.h:1799
Always release the OverlappedK back to its pool. If the operation timed-out, cancel it before releasi...
Definition: libusbk.h:2407
KSTM_XFER_CONTEXT * PKSTM_XFER_CONTEXT
Pointer to a KSTM_XFER_CONTEXT structure.
Definition: libusbk.h:2481
KLIB_HANDLE KLST_HANDLE
Opaque LstK handle, see LstK_Init.
Definition: libusbk.h:131
KUSB_EXP BOOL KUSB_API UsbK_SetCurrentAlternateSetting(_in KUSB_HANDLE InterfaceHandle, _in UCHAR AltSettingNumber)
Sets the alternate setting of an interface.
BOS device capability descriptor.
Definition: libusbk.h:803
Configuration descriptor type.
Definition: libusbk.h:483
UCHAR bmAttributes
Configuration characteristics.
Definition: libusbk.h:1510
KUSB_EXP KLIB_USER_CONTEXT KUSB_API LibK_GetContext(_in KLIB_HANDLE Handle, _in KLIB_HANDLE_TYPE HandleType)
Gets the internal user context for the specified KLIB_HANDLE.
Interface power descriptor type.
Definition: libusbk.h:501
KUSB_DRIVER_API_INFO Info
Driver API information.
Definition: libusbk.h:2048
USHORT idProduct
USB-IF product ID.
Definition: libusbk.h:682
USHORT wLength
The length, in bytes, of this descriptor. Shall be set to 4.
Definition: libusbk.h:1441
The provider characteristics of a port on the device.
Definition: libusbk.h:846
UCHAR bDevCapabilityType
Capability type. See BOS_CAPABILITY_TYPE.
Definition: libusbk.h:951
Microsoft OS 2.0 minimum USB resume time descriptor.
Definition: libusbk.h:1397
KOVL_POOL_FLAG
Overlapped pool config flags.
Definition: libusbk.h:2418
Microsoft OS 2.0 function subset header.
Definition: libusbk.h:1219
UsbK_IsochWritePipe dynamic driver function id.
Definition: libusbk.h:1796
A function section defines the compatible ID and a subcompatible ID for a specified interface or func...
Definition: libusbk.h:1087
KUSB_EXP BOOL KUSB_API OvlK_ReUse(_in KOVL_HANDLE OverlappedK)
Initializes an overlappedK for re-use. The overlappedK is not return to its pool. ...
KUSB_EXP BOOL KUSB_API OvlK_Init(_out KOVL_POOL_HANDLE *PoolHandle, _in KUSB_HANDLE UsbHandle, _in INT MaxOverlappedCount, _inopt KOVL_POOL_FLAG Flags)
Creates a new overlapped pool.
Device is self powered.
Definition: libusbk.h:470
The consumer characteristics of a port on the device.
Definition: libusbk.h:843
UsbK_GetSuperSpeedPipeCompanionDescriptor dynamic driver function id.
Definition: libusbk.h:1802
Added (Arrival) state,.
Definition: libusbk.h:247
All MS OS V2.0 descriptors start with these two fields.
Definition: libusbk.h:1241
Hot plug handle. KHOT_HANDLE.
Definition: libusbk.h:153
Get the current device configuration value.
Definition: libusbk.h:597
A structure representing the standard USB endpoint descriptor.
Definition: libusbk.h:708
UCHAR bmAttributes
Attributes which apply to the endpoint when it is configured using the bConfigurationValue.
Definition: libusbk.h:731
The WINUSB_SETUP_PACKET structure describes a USB setup packet.
Definition: lusbk_shared.h:129
KLST_DEVINFO * KLST_DEVINFO_HANDLE
Pointer to a KLST_DEVINFO structure. (semi-opaque)
Definition: libusbk.h:347
vendor-specific class
Definition: libusbk.h:644
KUSB_EXP BOOL KUSB_API LUsb0_SetConfiguration(_in KUSB_HANDLE InterfaceHandle, _in UCHAR ConfigurationNumber)
Sets the device configuration number.
UCHAR bAltEnumCode
Alternate enumeration indicator.
Definition: libusbk.h:1012
Update existing descriptors or add new descriptors.
Definition: libusbk.h:594
USHORT wLength
The length, in bytes, of this subset header. Shall be set to 8.
Definition: libusbk.h:1272
KUSB_EXP BOOL KUSB_API OvlK_Release(_in KOVL_HANDLE OverlappedK)
Returns an OverlappedK structure to it's pool.
KUSB_EXP BOOL KUSB_API UsbK_ResetPipe(_in KUSB_HANDLE InterfaceHandle, _in UCHAR PipeID)
Resets the data toggle and clears the stall condition on a pipe.
KUSB_EXP BOOL KUSB_API IsoK_ReUse(_ref PKISO_CONTEXT IsoContext)
Convenience function for re-using an isochronous transfer context in a subsequent request...
USHORT wDescriptorType
MSOSV2_DESCRIPTOR_TYPE_SUBSET_HEADER_CONFIGURATION
Definition: libusbk.h:1275
KUSB_EXP BOOL KUSB_API UsbK_GetProperty(_in KUSB_HANDLE InterfaceHandle, _in KUSB_PROPERTY PropertyType, _ref PUINT PropertySize, _out PVOID Value)
Gets a USB device (driver specific) property from usb handle.
UsbK_QueryInterfaceSettings dynamic driver function id.
Definition: libusbk.h:1742
libusb0.sys driver ID
Definition: libusbk.h:1674
KUSB_EXP BOOL KUSB_API LibK_SetContext(_in KLIB_HANDLE Handle, _in KLIB_HANDLE_TYPE HandleType, _in KLIB_USER_CONTEXT ContextValue)
Sets internal user context for the specified KLIB_HANDLE.
If a UserHwnd is specified, use PostMessage instead of SendMessage.
Definition: libusbk.h:2309
USB core driver API information structure.
Definition: libusbk.h:2028
Interface association descriptor type.
Definition: libusbk.h:504
The WINUSB_PIPE_INFORMATION structure contains pipe information that the UsbK_QueryPipe routine retri...
Definition: lusbk_shared.h:72
UCHAR bLength
Size of this descriptor (in bytes)
Definition: libusbk.h:1583
No flags (or 0)
Definition: libusbk.h:2300
USHORT wTotalLength
Total length of data returned for this configuration.
Definition: libusbk.h:1498
Device capabilities descriptor type.
Definition: libusbk.h:510
If the i/o operation times-out, cancel it and release the OverlappedK back to its pool...
Definition: libusbk.h:2404
UsbK_GetAltInterface dynamic driver function id.
Definition: libusbk.h:1706
UCHAR bFunctionProtocol
bInterfaceProtocol used for the associated interfaces
Definition: libusbk.h:1633
KLST_PATTERN_MATCH PatternMatch
File pattern matches for restricting notifcations to a single/group or all supported usb devices...
Definition: libusbk.h:2349
UCHAR bDescriptorType
Descriptor type.
Definition: libusbk.h:1618
KUSB_EXP BOOL KUSB_API IsoK_SetPackets(_in PKISO_CONTEXT IsoContext, _in INT PacketSize)
Convenience function for setting the offset of all ISO packets of an isochronous transfer context...
The MS OS 2.0 descriptor set header.
Definition: libusbk.h:1213
USHORT wSpeedSupported
Bitmap encoding of the supported speeds.
Definition: libusbk.h:928
UCHAR bmAttributes
Bitmap encoding of supported device level features.
Definition: libusbk.h:925
USHORT Index
wIndex
Definition: libusbk.h:82
Device qualifier descriptor type.
Definition: libusbk.h:495
KUSB_EXP BOOL KUSB_API StmK_Free(_in KSTM_HANDLE StreamHandle)
Frees resources allocated by a stream handle.
UCHAR iManufacturer
Index of string descriptor describing manufacturer.
Definition: libusbk.h:688
Helper structure for parsing a /ref MSOSV1_CUSTOM_PROP_DESCRIPTOR or a MSOSV2_FEATURE_REG_PROPERTY_DE...
Definition: libusbk.h:1195
KUSB_EXP BOOL KUSB_API IsochK_GetNumberOfPackets(_in KISOCH_HANDLE IsochHandle, _out PUINT NumberOfPackets)
Gets the number of iso packets that will be used.
libusb0.sys filter driver ID
Definition: libusbk.h:1680
A structure representing the common USB descriptor.
Definition: libusbk.h:1580
KUSB_HANDLE UsbHandle
KUSB_HANDLE this stream uses.
Definition: libusbk.h:2493
UCHAR bLength
Size of this descriptor (in bytes)
Definition: libusbk.h:1529
PVOID UserState
Stream info user defined state.
Definition: libusbk.h:2520
If the i/o operation times-out cancel it, but do not release the OverlappedK back to its pool...
Definition: libusbk.h:2401
Audio class.
Definition: libusbk.h:623
KUSB_EXP BOOL KUSB_API LibK_SetCleanupCallback(_in KLIB_HANDLE Handle, _in KLIB_HANDLE_TYPE HandleType, _in KLIB_HANDLE_CLEANUP_CB *CleanupCB)
Assigns a cleanup callback function to a KLIB_HANDLE.
USB handle. KUSB_HANDLE.
Definition: libusbk.h:156
Device list/hot-plug pattern match structure.
Definition: libusbk.h:371
Microsoft OS 2.0 vendor revision descriptor.
Definition: libusbk.h:1460
Max handle type count.
Definition: libusbk.h:180
KUSB_EXP BOOL KUSB_API LstK_Free(_in KLST_HANDLE DeviceList)
Frees a usb device list.
KUSB_EXP BOOL KUSB_API HotK_Free(_in KHOT_HANDLE Handle)
Frees the specified hot-plug handle.
UCHAR bInterfaceProtocol
USB-IF protocol code for this interface.
Definition: libusbk.h:1550
UCHAR bLength
Size of this descriptor (in bytes)
Definition: libusbk.h:965
KUSB_EXP BOOL KUSB_API IsochK_SetNumberOfPackets(_in KISOCH_HANDLE IsochHandle, _in UINT NumberOfPackets)
Sets the number of iso packets that will be used.
Hub class.
Definition: libusbk.h:641
KLST_FLAG
Device list initialization flags.
Definition: libusbk.h:350
UCHAR bLength
Size of this descriptor (in bytes)
Definition: libusbk.h:916
UCHAR bResumeSignalingTime
The number of milliseconds the device requires resume signaling to be asserted. (Valid values 1 to 20...
Definition: libusbk.h:1409
UsbK_GetDescriptor dynamic driver function id.
Definition: libusbk.h:1709
Connect changed state.
Definition: libusbk.h:253
UCHAR iInterface
Index of string descriptor describing this interface.
Definition: libusbk.h:1553
USB 2.0 Extension descriptor.
Definition: libusbk.h:896
UINT UserMessage
WM_USER message start offset used when sending/posting messages, See details.
Definition: libusbk.h:2343
VOID KUSB_API KHOT_PLUG_CB(_in KHOT_HANDLE HotHandle, _in KLST_DEVINFO_HANDLE DeviceInfo, _in KLST_SYNC_FLAG PlugType)
Hot plug event function definition.
Definition: libusbk.h:2313
Vendor-specific request.
Definition: libusbk.h:444
UCHAR bLength
Size of this descriptor (in bytes)
Definition: libusbk.h:655
UCHAR bMS_VendorCode
Vendor specific vendor code.
Definition: libusbk.h:1034
Microsoft OS 2.0 minimum USB resume time descriptor.
Definition: libusbk.h:1228
KUSB_EXP BOOL KUSB_API IsochK_EnumPackets(_in KISOCH_HANDLE IsochHandle, _in KISOCH_ENUM_PACKETS_CB *EnumPackets, _inopt UINT StartPacketIndex, _inopt PVOID UserState)
Convenience function for enumerating ISO packets of an isochronous transfer context.
UCHAR bMS_VendorCode
Vendor defined code.
Definition: libusbk.h:1005
KLST_PATTERN_MATCH * PKLST_PATTERN_MATCH
Pointer to a KLST_PATTERN_MATCH structure.
Definition: libusbk.h:389
UINT bmAttributes
Bitmap encoding of supported device level features.
Definition: libusbk.h:908
KLIB_HANDLE KHOT_HANDLE
Opaque HotK handle, see HotK_Init.
Definition: libusbk.h:134
KUSB_EXP BOOL KUSB_API UsbK_Initialize(_in HANDLE DeviceHandle, _out KUSB_HANDLE *InterfaceHandle)
Creates a libusbK handle for the device specified by a file handle.
UCHAR iSerialNumber
Index of string descriptor containing device serial number.
Definition: libusbk.h:694
Return the selected alternate setting for the specified interface.
Definition: libusbk.h:603
Hot plug parameter structure.
Definition: libusbk.h:2331
UsbK_SetConfiguration dynamic driver function id.
Definition: libusbk.h:1721
USHORT wLength
The length, in bytes, of this descriptor. Shall be set to 6.
Definition: libusbk.h:1463
KLST_SYNC_FLAG SyncFlags
Synchronization flags. (internal use only)
Definition: libusbk.h:336
KUSB_EXP BOOL KUSB_API LibK_LoadDriverAPI(_out PKUSB_DRIVER_API DriverAPI, _in INT DriverID)
Initialize a driver API set.
Interface descriptor type.
Definition: libusbk.h:489
Wireless USB device capability.
Definition: libusbk.h:822
USB_INTERFACE_ASSOCIATION_DESCRIPTOR * PUSB_INTERFACE_ASSOCIATION_DESCRIPTOR
pointer to a USB_INTERFACE_ASSOCIATION_DESCRIPTOR
Definition: libusbk.h:1640
Valid.
Definition: libusbk.h:2452
USB_CONFIG_BM_ATTRIBUTE_ENUM
Values used in the bmAttributes field of a USB_CONFIGURATION_DESCRIPTOR.
Definition: libusbk.h:539
UsbK_FlushPipe dynamic driver function id.
Definition: libusbk.h:1775
INT Micro
Micro version number.
Definition: libusbk.h:196
KUSB_EXP BOOL KUSB_API UsbK_GetSuperSpeedPipeCompanionDescriptor(_in KUSB_HANDLE InterfaceHandle, _in UCHAR AltSettingNumber, _in UCHAR PipeIndex, _out PUSB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR PipeCompanionDescriptor)
Retrieves a pipes super speed endpoint companion descriptor associated with an interface.
Notify all devices which match upon a succuessful call to HotK_Init.
Definition: libusbk.h:2303
Pipe stream handle. KSTM_HANDLE.
Definition: libusbk.h:177
Microsoft OS 2.0 model ID descriptor.
Definition: libusbk.h:1418
KUSB_EXP BOOL KUSB_API UsbK_GetAltInterface(_in KUSB_HANDLE InterfaceHandle, _in UCHAR NumberOrIndex, _in BOOL IsIndex, _out PUCHAR AltSettingNumber)
Gets the alternate setting for the specified interface.
Mass storage class.
Definition: libusbk.h:638
A structure representing additional information about super speed (or higher) endpoints.
Definition: libusbk.h:756
Request is for a vendor-specific purpose.
Definition: libusbk.h:460
Pipe stream handle. KSTM_HANDLE.
Definition: libusbk.h:174
KUSB_EXP BOOL KUSB_API UsbK_QueryDeviceInformation(_in KUSB_HANDLE InterfaceHandle, _in UINT InformationType, _ref PUINT BufferLength, _ref PUCHAR Buffer)
Retrieves information about the physical device that is associated with a libusbK handle...
KHOT_FLAG Flags
Additional init/config parameters.
Definition: libusbk.h:2346
KUSB_EXP VOID KUSB_API LibK_GetVersion(_out PKLIB_VERSION Version)
Gets the internal user context for the specified KLIB_HANDLE.
KUSB_EXP BOOL KUSB_API UsbK_GetCurrentFrameNumber(_in KUSB_HANDLE InterfaceHandle, _out PUINT FrameNumber)
Retrieves the current USB frame number.
libusbK.sys driver ID
Definition: libusbk.h:1671
UsbK_QueryPipe dynamic driver function id.
Definition: libusbk.h:1754
UsbK_Free dynamic driver function id.
Definition: libusbk.h:1694
Printer class.
Definition: libusbk.h:635
A structure representing the standard USB interface descriptor.
Definition: libusbk.h:1526
Uses alterable wait functions. See http://msdn.microsoft.com/en-us/library/windows/desktop/ms687036%2...
Definition: libusbk.h:2410
UCHAR bNumInterfaces
Number of interfaces supported by this configuration.
Definition: libusbk.h:1501
UCHAR bConfigurationValue
Identifier value for this configuration.
Definition: libusbk.h:1504
SuperSpeed Device Capability Descriptor.
Definition: libusbk.h:913
UsbK_ClaimInterface dynamic driver function id.
Definition: libusbk.h:1697
UsbK_SetCurrentAlternateSetting dynamic driver function id.
Definition: libusbk.h:1748
UCHAR bNumDeviceCaps
Number of device capability descriptors.
Definition: libusbk.h:889
BOS_CAPABILITY_TYPE
USB BOS capability types.
Definition: libusbk.h:819
UsbK_ResetDevice dynamic driver function id.
Definition: libusbk.h:1727
Get the internal device file handle used for operations such as GetOverlappedResult or DeviceIoContro...
Definition: libusbk.h:1661
KUSB_EXP BOOL KUSB_API OvlK_WaitOrCancel(_in KOVL_HANDLE OverlappedK, _inopt INT TimeoutMS, _out PUINT TransferredLength)
Waits for overlapped I/O completion, cancels on a timeout error.
USB_DEVICE_CLASS_ENUM
USB defined class codes.
Definition: libusbk.h:617
UINT dwSize
The size of this custom properties section.
Definition: libusbk.h:1173
USHORT wLength
The length, in bytes, of this descriptor.
Definition: libusbk.h:1359
UCHAR bLength
Size of this descriptor. Shall always be 18 bytes.
Definition: libusbk.h:1025
KUSB_EXP BOOL KUSB_API UsbK_QueryPipe(_in KUSB_HANDLE InterfaceHandle, _in UCHAR AltSettingNumber, _in UCHAR PipeIndex, _out PWINUSB_PIPE_INFORMATION PipeInformation)
Retrieves information about a pipe that is associated with an interface.
Stream callback structure.
Definition: libusbk.h:2582
KUSB_EXP BOOL KUSB_API LibK_SetDefaultContext(_in KLIB_HANDLE_TYPE HandleType, _in KLIB_USER_CONTEXT ContextValue)
Sets the default user context for the specified KLIB_HANDLE_TYPE.
The WINUSB_PIPE_INFORMATION_EX structure contains pipe information that the UsbK_QueryPipeEx routine ...
Definition: lusbk_shared.h:92
KUSB_EXP BOOL KUSB_API LibK_CopyDriverAPI(_out PKUSB_DRIVER_API DriverAPI, _in KUSB_HANDLE UsbHandle)
Copies the driver API set out of a KUSB_HANDLE.
Microsoft OS V1.0 extended properties descriptor.
Definition: libusbk.h:1051
KSTM_BEFORE_COMPLETE_CB * BeforeComplete
Executed immediately after a transfer completes.
Definition: libusbk.h:2600
UsbK_Init dynamic driver function id.
Definition: libusbk.h:1691
UCHAR bInterfaceCount
The Number of interfaces follow this descriptor that are considered "associated". ...
Definition: libusbk.h:1624
Structure describing an isochronous transfer packet for libusbK.
Definition: lusbk_shared.h:162
A structure representing the standard USB configuration descriptor.
Definition: libusbk.h:1489
UCHAR MaxPower
Maximum power consumption of the USB device from this bus in this configuration when the device is fu...
Definition: libusbk.h:1516
KUSB_EXP BOOL KUSB_API IsoK_EnumPackets(_in PKISO_CONTEXT IsoContext, _in KISO_ENUM_PACKETS_CB *EnumPackets, _inopt INT StartPacketIndex, _inopt PVOID UserState)
Convenience function for enumerating ISO packets of an isochronous transfer context.
Microsoft OS 2.0 configuration subset header.
Definition: libusbk.h:1216
UCHAR bEndpointAddress
The address of the endpoint described by this descriptor.
Definition: libusbk.h:722
MSOSV2_DESCRIPTOR_TYPE
Microsoft OS 2.0 descriptor wDescriptorType values.
Definition: libusbk.h:1210
INT MaxPendingTransfers
Maximum transfer read/write request allowed pending.
Definition: libusbk.h:2499
UsbK_GetCurrentFrameNumber dynamic driver function id.
Definition: libusbk.h:1784
Request is for a device.
Definition: libusbk.h:451
UsbK_IsoReadPipe dynamic driver function id.
Definition: libusbk.h:1778
KUSB_EXP BOOL KUSB_API UsbK_SetConfiguration(_in KUSB_HANDLE InterfaceHandle, _in UCHAR ConfigurationNumber)
Sets the device configuration number.
USHORT wLength
The length, in bytes, of this header. Shall be set to 10.
Definition: libusbk.h:1255
UsbK_GetConfiguration dynamic driver function id.
Definition: libusbk.h:1724
USHORT wDescriptorType
MSOSV2_DESCRIPTOR_TYPE_FEATURE_COMPATIBLE_ID
Definition: libusbk.h:1322
KUSB_EXP BOOL KUSB_API IsochK_Init(_out KISOCH_HANDLE *IsochHandle, _in KUSB_HANDLE InterfaceHandle, _in UCHAR PipeId, _in UINT MaxNumberOfPackets, _in PUCHAR TransferBuffer, _in UINT TransferBufferSize)
Creates a new isochronous transfer handle for libusbK or WinUSB.
Request is for an endpoint of a device.
Definition: libusbk.h:457
BOS descriptor type.
Definition: libusbk.h:507
MSOS_FEATURE_TYPE
Microsoft feature descriptor types.
Definition: libusbk.h:1045
INT MI
Composite interface number parsed from KLST_DEVINFO::DeviceID. Set to -1 for devices that do not have...
Definition: libusbk.h:269
UCHAR bNumConfigurations
Number of possible configurations.
Definition: libusbk.h:697
Driver API function set structure.
Definition: libusbk.h:2045
USB 2.0 extensions.
Definition: libusbk.h:825
Set device address for all future accesses.
Definition: libusbk.h:588
KSTM_CALLBACK * PKSTM_CALLBACK
Pointer to a KSTM_CALLBACK structure.
Definition: libusbk.h:2607
BOOL Connected
Indicates the devices connection state.
Definition: libusbk.h:333
KUSB_EXP BOOL KUSB_API LstK_MoveNext(_in KLST_HANDLE DeviceList, _outopt KLST_DEVINFO_HANDLE *DeviceInfo)
Advances the device list current KLST_DEVINFO position.
KSTM_SUBMIT_CB * Submit
Executed to submit a transfer.
Definition: libusbk.h:2588
UCHAR bReserved
Reserved.
Definition: libusbk.h:974
UCHAR bLength
Size of this descriptor (in bytes)
Definition: libusbk.h:759
Structure describing a user defined isochronous transfer.
Definition: lusbk_shared.h:300
UCHAR bDescriptorType
Descriptor type.
Definition: libusbk.h:1570
Common usb device information structure.
Definition: libusbk.h:260
USHORT wDescriptorType
MSOSV2_DESCRIPTOR_TYPE_FEATURE_REG_PROPERTY
Definition: libusbk.h:1362
The device is capable of waking the the host from a low power/sleeping state.
Definition: libusbk.h:548
Microsoft OS 2.0 CCGP device descriptor.
Definition: libusbk.h:1234
KSTM_HANDLE StreamHandle
Stream handle.
Definition: libusbk.h:2517
UsbK_IsochReadPipe dynamic driver function id.
Definition: libusbk.h:1793
KOVL_WAIT_FLAG
WaitFlags used by OvlK_Wait.
Definition: libusbk.h:2386
KUSB_EXP BOOL KUSB_API StmK_Start(_in KSTM_HANDLE StreamHandle)
Starts the internal stream thread.
HANDLE DeviceHandle
Populated with the device file handle for the specified UsbHandle.
Definition: libusbk.h:2514
UCHAR bFunctionSubClass
bInterfaceSubClass used for the associated interfaces
Definition: libusbk.h:1630
USHORT Value
wValue
Definition: libusbk.h:79
UCHAR bU1DevExitLat
U1 Device Exit Latency. Worst-case latency to transition from U1 to U0.
Definition: libusbk.h:934
UsbK_SelectInterface dynamic driver function id.
Definition: libusbk.h:1733
INT Major
Major version number.
Definition: libusbk.h:190
PVOID UserState
User defined state.
Definition: libusbk.h:2477
KUSB_EXP BOOL KUSB_API OvlK_Acquire(_out KOVL_HANDLE *OverlappedK, _in KOVL_POOL_HANDLE PoolHandle)
Gets a preallocated OverlappedK structure from the specified/default pool.
INT FunctionCount
[ReadOnly] Number of valid functions contained in the driver API.
Definition: libusbk.h:2034
Cleared/invalid state.
Definition: libusbk.h:241
USB_GETSTATUS
Values for the bits returned by the USB_REQUEST_GET_STATUS request.
Definition: libusbk.h:467
UCHAR bDeviceProtocol
USB-IF protocol code for the device.
Definition: libusbk.h:673
Microsoft OS V1.0 compatible IDs descriptor.
Definition: libusbk.h:1048
KUSB_EXP BOOL KUSB_API UsbK_GetPowerPolicy(_in KUSB_HANDLE InterfaceHandle, _in UINT PolicyType, _ref PUINT ValueLength, _out PVOID Value)
Gets the power policy for a device.
USHORT wLength
The length, in bytes, of this descriptor.
Definition: libusbk.h:1244
All states.
Definition: libusbk.h:256
KUSB_EXP BOOL KUSB_API UsbK_Free(_in KUSB_HANDLE InterfaceHandle)
Frees a libusbK interface handle.
Precision Time Measurement (PTM) Capability Descriptor.
Definition: libusbk.h:852
INT KUSB_API KLIB_HANDLE_CLEANUP_CB(_in KLIB_HANDLE Handle, _in KLIB_HANDLE_TYPE HandleType, _in KLIB_USER_CONTEXT UserContext)
Function typedef for LibK_SetCleanupCallback.
Definition: libusbk.h:184
A custom property section contains the information for a single property.
Definition: libusbk.h:1170
Container ID Descriptor.
Definition: libusbk.h:942
The device is powered by it's host.
Definition: libusbk.h:542
USHORT wDescriptorType
MSOSV2_DESCRIPTOR_TYPE_FEATURE_VENDOR_REVISION
Definition: libusbk.h:1466
Select an alternate interface for the specified interface.
Definition: libusbk.h:606
If the i/o operation fails, release the OverlappedK back to it's pool.
Definition: libusbk.h:2395
UCHAR bDevCapabilityType
Capability type. See BOS_CAPABILITY_TYPE.
Definition: libusbk.h:905
Unchanged state,.
Definition: libusbk.h:244
Allow other KHOT_HANDLE instances to consume this match.
Definition: libusbk.h:2306
KSTM_ERROR_CB * Error
Executed when a transfer error occurs.
Definition: libusbk.h:2585
typedef INT_PTR(FAR WINAPI *KPROC)()
UsbK base function pointer, See LibK_GetProcAddress.
Communications class.
Definition: libusbk.h:626
USHORT idVendor
USB-IF vendor ID.
Definition: libusbk.h:679
Endpoint descriptor type.
Definition: libusbk.h:492
KUSB_DRVID
Supported driver id enumeration.
Definition: libusbk.h:1668
Special Microsoft string descriptor used to indicate that a device supports Microsoft OS V1...
Definition: libusbk.h:1022
Microsoft OS 2.0 compatible ID descriptor.
Definition: libusbk.h:1222
UCHAR iFunction
Index of string descriptor describing the associated interfaces.
Definition: libusbk.h:1636
KUSB_EXP BOOL KUSB_API LstK_InitEx(_out KLST_HANDLE *DeviceList, _in KLST_FLAG Flags, _in PKLST_PATTERN_MATCH PatternMatch)
Initializes a new usb device list containing only devices matching a specific class GUID...
USHORT VendorRevision
Revision number associated with the descriptor set.
Definition: libusbk.h:1473
KUSB_EXP BOOL KUSB_API StmK_Write(_in KSTM_HANDLE StreamHandle, _in PUCHAR Buffer, _in INT Offset, _in INT Length, _out PUINT TransferredLength)
Writes data to the stream buffer.
UCHAR PipeID
This parameter corresponds to the bEndpointAddress field in the endpoint descriptor.
Definition: libusbk.h:2496
USHORT bU2DevExitLat
U2 Device Exit Latency. Worst-case latency to transition from U2 to U0.
Definition: libusbk.h:937
#define KUSB_API
Indicates the calling convention. This is always WINAPI (stdcall) by default.
Definition: libusbk.h:42
USB_ENDPOINT_DESCRIPTOR * PUSB_ENDPOINT_DESCRIPTOR
pointer to a USB_ENDPOINT_DESCRIPTOR
Definition: libusbk.h:741
KSTM_FLAG
Stream config flags.
Definition: libusbk.h:2436
UCHAR bDescriptorType
Descriptor type.
Definition: libusbk.h:658
UsbK_ReadPipe dynamic driver function id.
Definition: libusbk.h:1763
KLIB_HANDLE KISOCH_HANDLE
Opaque IsochK handle, see IsochK_Init.
Definition: libusbk.h:147
KUSB_EXP BOOL KUSB_API UsbK_IsoReadPipe(_in KUSB_HANDLE InterfaceHandle, _in UCHAR PipeID, _out PUCHAR Buffer, _in UINT BufferLength, _in LPOVERLAPPED Overlapped, _refopt PKISO_CONTEXT IsoContext)
Reads from an isochronous pipe.
KUSB_EXP BOOL KUSB_API OvlK_IsComplete(_in KOVL_HANDLE OverlappedK)
Checks for i/o completion; returns immediately. (polling)
KUSB_FNID
Supported function id enumeration.
Definition: libusbk.h:1688
KUSB_EXP BOOL KUSB_API UsbK_SetPipePolicy(_in KUSB_HANDLE InterfaceHandle, _in UCHAR PipeID, _in UINT PolicyType, _in UINT ValueLength, _in PVOID Value)
Sets the policy for a specific pipe associated with an endpoint on the device. This is a synchronous ...
SuperSpeed USB device capability.
Definition: libusbk.h:828
KUSB_EXP BOOL KUSB_API UsbK_GetConfiguration(_in KUSB_HANDLE InterfaceHandle, _out PUCHAR ConfigurationNumber)
Gets the device current configuration number.
KHOT_FLAG
Hot plug config flags.
Definition: libusbk.h:2297
UCHAR bFirstInterfaceNumber
The interface or function number.
Definition: libusbk.h:1098
UsbK_Clone dynamic driver function id.
Definition: libusbk.h:1739
INT TransferLength
Number of bytes to write or number of bytes read.
Definition: libusbk.h:2474
KUSB_EXP BOOL KUSB_API UsbK_Init(_out KUSB_HANDLE *InterfaceHandle, _in KLST_DEVINFO_HANDLE DevInfo)
Creates/opens a libusbK interface handle from the device list. This is a preferred method...
None.
Definition: libusbk.h:2439
Overlapped pool handle. KOVL_POOL_HANDLE.
Definition: libusbk.h:171
VOID KUSB_API KHOT_POWER_BROADCAST_CB(_in KHOT_HANDLE HotHandle, _in KLST_DEVINFO_HANDLE DeviceInfo, _in UINT PbtEvent)
Power broadcast event function definition.
Definition: libusbk.h:2319
UCHAR bLength
Size of this descriptor (in bytes)
Definition: libusbk.h:806
UsbK_ControlTransfer dynamic driver function id.
Definition: libusbk.h:1712
KUSB_DRIVER_API DriverAPI
Populated with the driver api for the specified UsbHandle.
Definition: libusbk.h:2511
KUSB_EXP VOID KUSB_API LibK_Context_Free(VOID)
Frees the global libusbK process context.
KUSB_EXP BOOL KUSB_API StmK_Init(_out KSTM_HANDLE *StreamHandle, _in KUSB_HANDLE UsbHandle, _in UCHAR PipeID, _in INT MaxTransferSize, _in INT MaxPendingTransfers, _in INT MaxPendingIO, _inopt PKSTM_CALLBACK Callbacks, _inopt KSTM_FLAG Flags)
Initializes a new uni-directional pipe stream.
INT LUsb0FilterIndex
libusb-win32 filter index id.
Definition: libusbk.h:330
UCHAR bMaxBurst
Specifies the maximum number of packets that the endpoint can send or receive as a part of a burst...
Definition: libusbk.h:765
UCHAR bDescriptorType
Descriptor type.
Definition: libusbk.h:809
UsbK_SetPipePolicy dynamic driver function id.
Definition: libusbk.h:1757
Config power descriptor type.
Definition: libusbk.h:498
USHORT wPropertyDataType
The type of data associated with the section.
Definition: libusbk.h:1376
Billboard capability.
Definition: libusbk.h:858
USHORT wTotalLength
The size of entire MS OS 2.0 descriptor set. The value shall match the value in the descriptor set in...
Definition: libusbk.h:1264
KUSB_EXP BOOL KUSB_API UsbK_QueryPipeEx(_in KUSB_HANDLE InterfaceHandle, _in UCHAR AltSettingNumber, _in UCHAR PipeIndex, _out PWINUSB_PIPE_INFORMATION_EX PipeInformationEx)
Retrieves information about a pipe that is associated with an interface.
INT MaxPendingIO
Maximum number of I/O request allowed pending.
Definition: libusbk.h:2505
INT Nano
Nano version number.
Definition: libusbk.h:199
Allows hardware manufacturers to define groupings of interfaces.
Definition: libusbk.h:1612
UCHAR bDescriptorType
Descriptor type.
Definition: libusbk.h:902
Platform specific capability.
Definition: libusbk.h:834
INT KUSB_API KSTM_ERROR_CB(_in PKSTM_INFO StreamInfo, _in PKSTM_XFER_CONTEXT XferContext, _in INT XferContextIndex, _in INT ErrorCode)
Function definition for an optional user-defined callback; executed when a transfer error occurs...
USHORT wTotalLength
Length of this descriptor and all sub descriptors.
Definition: libusbk.h:886
KUSB_EXP BOOL KUSB_API OvlK_Free(_in KOVL_POOL_HANDLE PoolHandle)
Destroys the specified pool and all resources it created.
Microsoft OS 2.0 descriptor set header.
Definition: libusbk.h:1252
KUSB_EXP BOOL KUSB_API UsbK_SelectInterface(_in KUSB_HANDLE InterfaceHandle, _in UCHAR NumberOrIndex, _in BOOL IsIndex)
Selects the specified interface by number or index as the current interface.
USB_STRING_DESCRIPTOR * PUSB_STRING_DESCRIPTOR
pointer to a USB_STRING_DESCRIPTOR
Definition: libusbk.h:1577
KLIB_HANDLE KSTM_HANDLE
Opaque StmK handle, see StmK_Init.
Definition: libusbk.h:144
KUSB_EXP BOOL KUSB_API UsbK_ReleaseInterface(_in KUSB_HANDLE InterfaceHandle, _in UCHAR NumberOrIndex, _in BOOL IsIndex)
Releases the specified interface by number or index.
UsbK_GetOverlappedResult dynamic driver function id.
Definition: libusbk.h:1787
USHORT Length
wLength ushort value
Definition: libusbk.h:85
KUSB_EXP BOOL KUSB_API UsbK_ControlTransfer(_in KUSB_HANDLE InterfaceHandle, _in WINUSB_SETUP_PACKET SetupPacket, _refopt PUCHAR Buffer, _in UINT BufferLength, _outopt PUINT LengthTransferred, _inopt LPOVERLAPPED Overlapped)
Transmits control data over a default control endpoint.
Microsoft OS 2.0 vendor revision descriptor.
Definition: libusbk.h:1237
KUSB_EXP BOOL KUSB_API IsoK_GetPacket(_in PKISO_CONTEXT IsoContext, _in INT PacketIndex, _out PKISO_PACKET IsoPacket)
Convenience function for getting all fields of a KISO_PACKET.
USB_COMMON_DESCRIPTOR * PUSB_COMMON_DESCRIPTOR
pointer to a USB_COMMON_DESCRIPTOR
Definition: libusbk.h:1590
UsbK_SetAltInterface dynamic driver function id.
Definition: libusbk.h:1703
Microsoft OS 2.0 compatible ID descriptor.
Definition: libusbk.h:1316
KSTM_STARTED_CB * Started
Executed for every transfer context when the stream is started with StmK_Start.
Definition: libusbk.h:2594
If the i/o operation completes successfully, release the OverlappedK back to it's pool...
Definition: libusbk.h:2392
KUSB_EXP VOID KUSB_API LstK_MoveReset(_in KLST_HANDLE DeviceList)
Sets the device list to its initial position, which is before the first element in the list...
INT KUSB_API KSTM_STOPPED_CB(_in PKSTM_INFO StreamInfo, _in PKSTM_XFER_CONTEXT XferContext, _in INT XferContextIndex)
Function definition for an optional user-defined callback; executed for each transfer context when th...
UCHAR bDeviceClass
USB-IF class code for the device.
Definition: libusbk.h:667
BMREQUEST_RECIPIENT
bmRequest.Recipient
Definition: libusbk.h:448
Semi-opaque device information structure of a device list.
Definition: libusbk.h:284
KSTM_COMPLETE_RESULT
Stream config flags.
Definition: libusbk.h:2449
KUSB_EXP BOOL KUSB_API UsbK_AbortPipe(_in KUSB_HANDLE InterfaceHandle, _in UCHAR PipeID)
Aborts all of the pending transfers for a pipe.
KUSB_EXP BOOL KUSB_API UsbK_GetPipePolicy(_in KUSB_HANDLE InterfaceHandle, _in UCHAR PipeID, _in UINT PolicyType, _ref PUINT ValueLength, _out PVOID Value)
Gets the policy for a specific pipe (endpoint).
UCHAR bDescriptorType
Descriptor type.
Definition: libusbk.h:762
BMREQUEST_TYPE
bmRequest.Type
Definition: libusbk.h:435
Authentication Capability Descriptor.
Definition: libusbk.h:861
Microsoft OS 2.0 registry property descriptor.
Definition: libusbk.h:1225
UsbK_ReleaseInterface dynamic driver function id.
Definition: libusbk.h:1700
UCHAR bDescriptorType
Descriptor type.
Definition: libusbk.h:1532
Enable listings for the raw device interface GUID only. {A5DCBF10-6530-11D2-901F-00C04FB951ED}.
Definition: libusbk.h:356
USB_REQUEST_ENUM
USB defined request codes.
Definition: libusbk.h:576
USHORT wMaxPacketSize
Maximum packet size this endpoint is capable of sending/receiving.
Definition: libusbk.h:734
USB_ENDPOINT_DESCRIPTOR EndpointDescriptor
Populated with the endpoint descriptor for the specified PipeID.
Definition: libusbk.h:2508
WinUSB.sys driver ID.
Definition: libusbk.h:1677
UsbK_GetAssociatedInterface dynamic driver function id.
Definition: libusbk.h:1736
UINT dwWindowsVersion
Windows version.
Definition: libusbk.h:1261
UCHAR bLength
Size of this descriptor (in bytes)
Definition: libusbk.h:1492
Billboard Ex capability.
Definition: libusbk.h:864
KLIB_VERSION * PKLIB_VERSION
Pointer to a
Definition: libusbk.h:202
#define KUSB_EXP
Indicates that a function is an exported API call.
Definition: libusbk.h:37
USHORT wDescriptorType
MSOSV2_DESCRIPTOR_TYPE_SUBSET_HEADER_FUNCTION
Definition: libusbk.h:1295
Stream information structure.
Definition: libusbk.h:2490
INT Pid
ProductID parsed from KLST_DEVINFO::DeviceID.
Definition: libusbk.h:266
KLIB_HANDLE KUSB_HANDLE
Opaque UsbK handle, see UsbK_Init.
Definition: libusbk.h:128
libusbK verson information structure.
Definition: libusbk.h:187
USHORT wTotalLength
The size of entire configuration subset including this header.
Definition: libusbk.h:1284
Supported driver count.
Definition: libusbk.h:1683
KUSB_EXP BOOL KUSB_API OvlK_WaitOldest(_in KOVL_POOL_HANDLE PoolHandle, _outopt KOVL_HANDLE *OverlappedK, _inopt INT TimeoutMS, _inopt KOVL_WAIT_FLAG WaitFlags, _out PUINT TransferredLength)
Waits for overlapped I/O completion on the oldest acquired OverlappedK handle and performs actions sp...
KUSB_EXP BOOL KUSB_API IsochK_CalcPacketInformation(_in BOOL IsHighSpeed, _in PWINUSB_PIPE_INFORMATION_EX PipeInformationEx, _out PKISOCH_PACKET_INFORMATION PacketInformation)
Helper function for isochronous packet/transfer calculations.
USHORT wDescriptorType
See MSOSV2_DESCRIPTOR_TYPE.
Definition: libusbk.h:1247
Device descriptor type.
Definition: libusbk.h:480
INT DriverID
[ReadOnly] Driver id of the driver api.
Definition: libusbk.h:2031
BOOL KUSB_API KISOCH_ENUM_PACKETS_CB(_in UINT PacketIndex, _ref PUINT Offset, _ref PUINT Length, _ref PUINT Status, _in PVOID UserState)
Callback function typedef for IsochK_EnumPackets.
Definition: libusbk.h:217
KUSB_EXP BOOL KUSB_API LstK_Current(_in KLST_HANDLE DeviceList, _out KLST_DEVINFO_HANDLE *DeviceInfo)
Gets the KLST_DEVINFO element for the current position.
Request is for an interface of a device.
Definition: libusbk.h:454
UCHAR bNumEndpoints
Number of endpoints used by this interface (excluding the control endpoint)
Definition: libusbk.h:1541
UINT dwPropertyDataType
The type of data associated with the section.
Definition: libusbk.h:1187
KUSB_EXP BOOL KUSB_API UsbK_WritePipe(_in KUSB_HANDLE InterfaceHandle, _in UCHAR PipeID, _in PUCHAR Buffer, _in UINT BufferLength, _outopt PUINT LengthTransferred, _inopt LPOVERLAPPED Overlapped)
Writes data to a pipe.
KUSB_EXP BOOL KUSB_API OvlK_Wait(_in KOVL_HANDLE OverlappedK, _inopt INT TimeoutMS, _inopt KOVL_WAIT_FLAG WaitFlags, _out PUINT TransferredLength)
Waits for overlapped I/O completion, and performs actions specified in WaitFlags. ...
KUSB_EXP BOOL KUSB_API UsbK_GetAssociatedInterface(_in KUSB_HANDLE InterfaceHandle, _in UCHAR AssociatedInterfaceIndex, _out KUSB_HANDLE *AssociatedInterfaceHandle)
Retrieves a handle for an associated interface.
UCHAR bLength
Size of this descriptor (in bytes)
Definition: libusbk.h:1567
Provides information on each battery supported by the device.
Definition: libusbk.h:840
KUSB_EXP BOOL KUSB_API UsbK_GetOverlappedResult(_in KUSB_HANDLE InterfaceHandle, _in LPOVERLAPPED Overlapped, _out PUINT lpNumberOfBytesTransferred, _in BOOL bWait)
Retrieves the results of an overlapped operation on the specified libusbK handle. ...
KUSB_EXP BOOL KUSB_API UsbK_IsochWritePipe(_in KISOCH_HANDLE IsochHandle, _inopt UINT DataLength, _ref PUINT FrameNumber, _inopt UINT NumberOfPackets, _in LPOVERLAPPED Overlapped)
Writes to an isochronous pipe. Supports LibusbK or WinUsb.
Do not perform any additional actions upon exiting OvlK_Wait.
Definition: libusbk.h:2389
UsbK_WritePipe dynamic driver function id.
Definition: libusbk.h:1766
Set then report an endpoint's synchronization frame.
Definition: libusbk.h:609
UCHAR bFunctionClass
bInterfaceClass used for this associated interfaces
Definition: libusbk.h:1627
USHORT bcdUSB
USB specification release number in binary-coded decimal.
Definition: libusbk.h:664
KUSB_EXP BOOL KUSB_API LstK_Count(_in KLST_HANDLE DeviceList, _ref PUINT Count)
Counts the number of device info elements in a device list.
USHORT wLength
The length, bytes, of the compatible ID descriptor including value descriptors. Shall be set to 20...
Definition: libusbk.h:1319
Device can wake the system from a low power/sleeping state.
Definition: libusbk.h:473
KSTM_COMPLETE_CB * Complete
Executed when a valid transfer completes.
Definition: libusbk.h:2591
USHORT wDescriptorType
MSOSV2_DESCRIPTOR_TYPE_FEATURE_MODEL_ID
Definition: libusbk.h:1424
USHORT wDescriptorType
MSOSV2_DESCRIPTOR_TYPE_SET_HEADER_DESCRIPTOR
Definition: libusbk.h:1258
USB_DEVICE_DESCRIPTOR * PUSB_DEVICE_DESCRIPTOR
pointer to a USB_DEVICE_DESCRIPTOR
Definition: libusbk.h:701
KUSB control setup packet.
Definition: libusbk.h:60
Human Interface Device class.
Definition: libusbk.h:629
Device list handle. KLST_HANDLE.
Definition: libusbk.h:162
String descriptor type.
Definition: libusbk.h:486
KUSB_EXP BOOL KUSB_API LstK_FindByVidPid(_in KLST_HANDLE DeviceList, _in INT Vid, _in INT Pid, _out KLST_DEVINFO_HANDLE *DeviceInfo)
Find a device by vendor and product id.
UCHAR iConfiguration
Index of string descriptor describing this configuration.
Definition: libusbk.h:1507
KUSB_EXP BOOL KUSB_API UsbK_ResetDevice(_in KUSB_HANDLE InterfaceHandle)
Resets the usb device of the specified interface handle. (port cycle).
KUSB_EXP BOOL KUSB_API UsbK_FlushPipe(_in KUSB_HANDLE InterfaceHandle, _in UCHAR PipeID)
Discards any data that is cached in a pipe.
Overlapped handle. KOVL_HANDLE.
Definition: libusbk.h:168
UCHAR bPad
Padding.
Definition: libusbk.h:1037
UsbK_IsoWritePipe dynamic driver function id.
Definition: libusbk.h:1781
KHOT_PARAMS * PKHOT_PARAMS
Pointer to a KHOT_PARAMS structure.
Definition: libusbk.h:2370
UCHAR bInterfaceSubClass
USB-IF subclass code for this interface.
Definition: libusbk.h:1547
INT Vid
VendorID parsed from KLST_DEVINFO::DeviceID.
Definition: libusbk.h:263
KUSB_EXP BOOL KUSB_API OvlK_WaitAndRelease(_in KOVL_HANDLE OverlappedK, _inopt INT TimeoutMS, _out PUINT TransferredLength)
Waits for overlapped I/O completion, cancels on a timeout error and always releases the OvlK handle b...
A structure representing the standard USB string descriptor.
Definition: libusbk.h:1564
USHORT wLength
The length, in bytes, of this descriptor. Shall be set to 6.
Definition: libusbk.h:1400
UCHAR bLength
Size of this descriptor (in bytes)
Definition: libusbk.h:711
KUSB_EXP BOOL KUSB_API IsochK_Free(_in KISOCH_HANDLE IsochHandle)
Destroys an isochronous transfer handle.
UsbK_QueryDeviceInformation dynamic driver function id.
Definition: libusbk.h:1745
UCHAR bLength
Size of this descriptor (in bytes)
Definition: libusbk.h:945
KUSB_EXP BOOL KUSB_API UsbK_ClaimInterface(_in KUSB_HANDLE InterfaceHandle, _in UCHAR NumberOrIndex, _in BOOL IsIndex)
Claims the specified interface by number or index.
UCHAR iProduct
Index of string descriptor describing product.
Definition: libusbk.h:691
Device info handle. KLST_DEVINFO_HANDLE.
Definition: libusbk.h:165
KLIB_HANDLE KOVL_HANDLE
Opaque OvlK handle, see OvlK_Acquire.
Definition: libusbk.h:137
UCHAR bDeviceSubClass
USB-IF subclass code for the device.
Definition: libusbk.h:670
KUSB_EXP BOOL KUSB_API LibK_GetProcAddress(_out KPROC *ProcAddress, _in INT DriverID, _in INT FunctionID)
Initialize a driver API function.
Set device configuration.
Definition: libusbk.h:600
KUSB_EXP KLIB_USER_CONTEXT KUSB_API LibK_GetDefaultContext(_in KLIB_HANDLE_TYPE HandleType)
Gets the default user context for the specified KLIB_HANDLE_TYPE.
UCHAR bReserved
Reserved.
Definition: libusbk.h:1281
UCHAR bLength
Size of this descriptor (in bytes)
Definition: libusbk.h:899
Supported function count.
Definition: libusbk.h:1805
Microsoft OS 2.0 CCGP device descriptor.
Definition: libusbk.h:1438
HWND UserHwnd
Hot plug event window handle to send/post messages when notifications occur.
Definition: libusbk.h:2334
KUSB_EXP HANDLE KUSB_API OvlK_GetEventHandle(_in KOVL_HANDLE OverlappedK)
Returns the internal event handle used to signal IO operations.
UCHAR bDescriptorType
Descriptor type.
Definition: libusbk.h:1495
List all libusbK devices including those not currently connected.
Definition: libusbk.h:359
USB_DESCRIPTOR_TYPE
Standard USB descriptor types. For more information, see section 9-5 of the USB 3.0 specifications.
Definition: libusbk.h:477
Class-specific request.
Definition: libusbk.h:441
KLST_DEV_COMMON_INFO * PKLST_DEV_COMMON_INFO
Pointer to a KLST_DEV_COMMON_INFO structure.
Definition: libusbk.h:276
KUSB_EXP BOOL KUSB_API IsoK_Free(_in PKISO_CONTEXT IsoContext)
Destroys an isochronous transfer context.
KUSB_EXP BOOL KUSB_API LUsb0_ControlTransfer(_in KUSB_HANDLE InterfaceHandle, _in WINUSB_SETUP_PACKET SetupPacket, _refopt PUCHAR Buffer, _in UINT BufferLength, _outopt PUINT LengthTransferred, _inopt LPOVERLAPPED Overlapped)
Transmits control data over a default control endpoint.
KUSB_EXP BOOL KUSB_API IsoK_Init(_out PKISO_CONTEXT *IsoContext, _in INT NumberOfPackets, _inopt INT StartFrame)
Creates a new isochronous transfer context for libusbK only.
KUSB_EXP BOOL KUSB_API IsochK_GetPacket(_in KISOCH_HANDLE IsochHandle, _in UINT PacketIndex, _outopt PUINT Offset, _outopt PUINT Length, _outopt PUINT Status)
Convenience function for getting all fields in an isochronous transfer packet.
UsbK_GetCurrentAlternateSetting dynamic driver function id.
Definition: libusbk.h:1751
KUSB_EXP BOOL KUSB_API UsbK_GetCurrentAlternateSetting(_in KUSB_HANDLE InterfaceHandle, _out PUCHAR AltSettingNumber)
Gets the current alternate interface setting for an interface.
USB_INTERFACE_DESCRIPTOR * PUSB_INTERFACE_DESCRIPTOR
pointer to a USB_INTERFACE_DESCRIPTOR
Definition: libusbk.h:1557
Imaging class.
Definition: libusbk.h:632
Request status of the specific recipient.
Definition: libusbk.h:579
USHORT wDescriptorType
MSOSV2_DESCRIPTOR_TYPE_FEATURE_CCGP_DEVICE
Definition: libusbk.h:1444
USHORT wSubsetLength
The size of entire function subset including this header.
Definition: libusbk.h:1304
UCHAR bDescriptorType
Descriptor type.
Definition: libusbk.h:883
UCHAR bConfigurationValue
The configuration value for the USB configuration to which this subset applies.
Definition: libusbk.h:1278
#define KLST_STRING_MAX_LEN
Allocated length for all strings in a KLST_DEVINFO structure.
Definition: libusbk.h:229
KLIB_HANDLE_TYPE
Handle type enumeration.
Definition: libusbk.h:150
UINT dwWindowsVersion
Minimum version of Windows.
Definition: libusbk.h:995
KUSB_EXP BOOL KUSB_API LstK_Init(_out KLST_HANDLE *DeviceList, _in KLST_FLAG Flags)
Initializes a new usb device list containing all supported devices.
KUSB_PROPERTY
Usb handle specific properties that can be retrieved with UsbK_GetProperty.
Definition: libusbk.h:1658
USHORT wMSOSDescriptorSetTotalLength
The length, in bytes of the MS OS 2.0 descriptor set.
Definition: libusbk.h:998
Defines the various PD Capabilities of this device.
Definition: libusbk.h:837
KUSB_EXP BOOL KUSB_API UsbK_QueryInterfaceSettings(_in KUSB_HANDLE InterfaceHandle, _in UCHAR AltSettingIndex, _out PUSB_INTERFACE_DESCRIPTOR UsbAltInterfaceDescriptor)
Retrieves the interface descriptor for the specified alternate interface settings for a particular in...
Microsoft OS 2.0 function subset header.
Definition: libusbk.h:1289
UCHAR bDescriptorType
Descriptor type.
Definition: libusbk.h:714
INT BufferSize
Size of internal stream buffer.
Definition: libusbk.h:2471
UsbK_GetPipePolicy dynamic driver function id.
Definition: libusbk.h:1760
Reserved class.
Definition: libusbk.h:620
KUSB_EXP BOOL KUSB_API UsbK_SetPowerPolicy(_in KUSB_HANDLE InterfaceHandle, _in UINT PolicyType, _in UINT ValueLength, _in PVOID Value)
Sets the power policy for a device.
UCHAR bDescriptorType
Descriptor type.
Definition: libusbk.h:1586
Types and defines shared with the driver.
Structure describing additional information about how an isochronous pipe transfers data...
Definition: lusbk_shared.h:369
USB 3.0 and USB 2.0 LPM Binary Device Object Store (BOS).
Definition: libusbk.h:877
INT Minor
Minor version number.
Definition: libusbk.h:193
No flags (or 0)
Definition: libusbk.h:353
Platform specific capabilities.
Definition: libusbk.h:962
KUSB_EXP BOOL KUSB_API UsbK_IsoWritePipe(_in KUSB_HANDLE InterfaceHandle, _in UCHAR PipeID, _in PUCHAR Buffer, _in UINT BufferLength, _in LPOVERLAPPED Overlapped, _refopt PKISO_CONTEXT IsoContext)
Writes to an isochronous pipe.
KLIB_HANDLE KOVL_POOL_HANDLE
Opaque OvlPoolK handle, see OvlK_Init.
Definition: libusbk.h:141
KSTM_INFO * PKSTM_INFO
Pointer to a KSTM_INFO structure.
Definition: libusbk.h:2524
USHORT wBytesPerInterval
Number of bytes per interval.
Definition: libusbk.h:791
USHORT wLength
The length, in bytes, of this descriptor. Shall be set to 20.
Definition: libusbk.h:1421
BOOL KUSB_API KISO_ENUM_PACKETS_CB(_in UINT PacketIndex, _in PKISO_PACKET IsoPacket, _in PVOID UserState)
Callback function typedef for IsoK_EnumPackets.
Definition: libusbk.h:214
KUSB_EXP BOOL KUSB_API StmK_Read(_in KSTM_HANDLE StreamHandle, _out PUCHAR Buffer, _in INT Offset, _in INT Length, _out PUINT TransferredLength)
Reads data from the stream buffer.
KUSB_EXP BOOL KUSB_API LstK_Enumerate(_in KLST_HANDLE DeviceList, _in KLST_ENUM_DEVINFO_CB *EnumDevListCB, _inopt PVOID Context)
Enumerates KLST_DEVINFO elements of a KLST_HANDLE.
KUSB_EXP BOOL KUSB_API LibK_IsFunctionSupported(_in PKUSB_DRIVER_API DriverAPI, _in UINT FunctionID)
Checks if the driver supports a function.
UCHAR bDevCapabilityType
Capability type.
Definition: libusbk.h:812
UCHAR bFirstInterface
The interface number for the first interface of the function to which this subset applies...
Definition: libusbk.h:1298
Microsoft OS 2.0 configuration subset header.
Definition: libusbk.h:1269
UCHAR bDescriptorType
Descriptor type.
Definition: libusbk.h:919
UCHAR bLength
Size of this descriptor (in bytes)
Definition: libusbk.h:880
UCHAR bInterval
Interval for polling endpoint for data transfers.
Definition: libusbk.h:737
UsbK_GetPowerPolicy dynamic driver function id.
Definition: libusbk.h:1718
UCHAR bInterfaceNumber
Number of this interface.
Definition: libusbk.h:1535
KUSB_EXP VOID KUSB_API HotK_FreeAll(VOID)
Frees all hot-plug handles initialized with HotK_Init.
PUCHAR Buffer
Internal stream buffer.
Definition: libusbk.h:2468
The device has an external power source.
Definition: libusbk.h:545
INT MaxTransferSize
Maximum transfer sage size.
Definition: libusbk.h:2502
KUSB_EXP BOOL KUSB_API UsbK_Clone(_in KUSB_HANDLE InterfaceHandle, _out KUSB_HANDLE *DstInterfaceHandle)
Clones the specified interface handle.
Microsoft OS V2.0 descriptor set.
Definition: libusbk.h:1054
UCHAR bMaxPacketSize0
Maximum packet size for control endpoint 0.
Definition: libusbk.h:676
INT_PTR KLIB_USER_CONTEXT
User defined handle context space, see LibK_GetContext.
Definition: libusbk.h:53
UCHAR bResumeRecoveryTime
The number of milliseconds the device requires to recover from port resume. (Valid values are 0 to 10...
Definition: libusbk.h:1406
KLST_SYNC_FLAG
Device list sync flags.
Definition: libusbk.h:238
void * KLIB_HANDLE
Base handle type for all library handles, See KLIB_HANDLE_TYPE.
Definition: libusbk.h:125
UsbK_ResetPipe dynamic driver function id.
Definition: libusbk.h:1769
UCHAR bFunctionalitySupport
The lowest speed at which all the functionality supported by the device is available to the user...
Definition: libusbk.h:931
UsbK_SetPowerPolicy dynamic driver function id.
Definition: libusbk.h:1715
Removed (Unplugged) state,.
Definition: libusbk.h:250
UCHAR Request
Request type value.
Definition: libusbk.h:76
Microsoft OS 2.0 registry property descriptor.
Definition: libusbk.h:1356
Defines the set of SuperSpeed Plus USB specific device level capabilities.
Definition: libusbk.h:849
Stream transfer context structure.
Definition: libusbk.h:2464
Clear or disable a specific feature.
Definition: libusbk.h:582
USHORT wDescriptorType
MSOSV2_DESCRIPTOR_TYPE_FEATURE_MIN_RESUME_TIME
Definition: libusbk.h:1403
Superspeed endpoint companion descriptor type.
Definition: libusbk.h:513
KUSB_EXP BOOL KUSB_API UsbK_SetAltInterface(_in KUSB_HANDLE InterfaceHandle, _in UCHAR NumberOrIndex, _in BOOL IsIndex, _in UCHAR AltSettingNumber)
Sets the alternate setting of the specified interface.
UCHAR bDescriptorType
Descriptor type (0x03)
Definition: libusbk.h:1028
USB_CONFIGURATION_DESCRIPTOR * PUSB_CONFIGURATION_DESCRIPTOR
pointer to a USB_CONFIGURATION_DESCRIPTOR
Definition: libusbk.h:1519
KSTM_STOPPED_CB * Stopped
Executed for every transfer context when the stream is stopped with StmK_Stop.
Definition: libusbk.h:2597
This structure represents the windows version records that follow a BOS windows platform descriptor...
Definition: libusbk.h:987
A structure representing the standard USB device descriptor.
Definition: libusbk.h:652