41#ifndef PLUGPLAY_REGKEY_DRIVER
42#define PLUGPLAY_REGKEY_DRIVER 2
118 ULONG OverheadTable[] = {
301 Version->Supported_USB_Version = 0x200;
336 ULONG InterfaceCount = 0, PipeCount = 0;
384 for (EndPointNumber = 0; EndPointNumber < InterfaceInfo->
NumberOfPipes; EndPointNumber++)
424 for (Current = (
ULONG_PTR)CurrentDescriptor;
426 Current += CurrentDescriptor->
bLength)
433 InterfaceFound =
TRUE;
459 while(CommonDescriptor)
464 DPRINT(
"End reached %p\n", CommonDescriptor);
474 return CommonDescriptor;
477 if (CommonDescriptor->
bLength == 0)
512 DPRINT(
"USBD_ParseConfigurationDescriptorEx\n");
513 DPRINT(
"ConfigurationDescriptor %p Length %lu\n", ConfigurationDescriptor, ConfigurationDescriptor->
wTotalLength);
594 DPRINT(
"No Descriptor With InterfaceNumber %ld AlternateSetting %ld InterfaceClass %ld InterfaceSubClass %ld InterfaceProtocol %ld found\n",
InterfaceNumber,
669 if (ParameterLength < PartialInfo->
DataLength)
PRTL_UNICODE_STRING_BUFFER PULONG PULONG Unknown4
PDEVICE_OBJECT PhysicalDeviceObject
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID _In_ size_t _Out_ size_t * DataLength
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD IN DWORD IN DWORD IN DWORD Unknown6
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD IN DWORD IN DWORD Unknown5
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD Unknown3
#define NT_SUCCESS(StatCode)
DRIVER_INITIALIZE DriverEntry
#define ExAllocatePoolWithTag(hernya, size, tag)
#define ExAllocatePool(type, size)
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
@ KeyValuePartialInformation
struct _KEY_VALUE_PARTIAL_INFORMATION KEY_VALUE_PARTIAL_INFORMATION
#define STANDARD_RIGHTS_ALL
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define STATUS_NOT_SUPPORTED
NTSTATUS NTAPI IoOpenDeviceRegistryKey(IN PDEVICE_OBJECT DeviceObject, IN ULONG DevInstKeyType, IN ACCESS_MASK DesiredAccess, OUT PHANDLE DevInstRegKey)
_In_ UCHAR _Outptr_result_bytebuffer_ DescriptorBufferLength PVOID * DescriptorBuffer
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
struct _URB_SELECT_CONFIGURATION UrbSelectConfiguration
PUSBD_INTERFACE_INFORMATION Interface
PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
struct _USB_INTERFACE_DESCRIPTOR * PUSB_INTERFACE_DESCRIPTOR
struct _USB_COMMON_DESCRIPTOR * PUSB_COMMON_DESCRIPTOR
#define USB_INTERFACE_DESCRIPTOR_TYPE
struct _USBD_INTERFACE_INFORMATION * PUSBD_INTERFACE_INFORMATION
#define URB_FUNCTION_SELECT_CONFIGURATION
VOID NTAPI USBD_FreeDeviceMutex(PVOID Unknown)
VOID NTAPI USBD_Debug_RetHeap(PVOID Heap, ULONG Unknown2, ULONG Unknown3)
VOID NTAPI USBD_Debug_LogEntry(PCHAR Name, ULONG_PTR Info1, ULONG_PTR Info2, ULONG_PTR Info3)
NTSTATUS NTAPI USBD_InitializeDevice(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3, ULONG Unknown4, ULONG Unknown5, ULONG Unknown6)
NTSTATUS NTAPI USBD_RegisterHostController(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3, ULONG Unknown4, ULONG Unknown5, ULONG Unknown6, ULONG Unknown7, ULONG Unknown8, ULONG Unknown9, ULONG Unknown10)
PUSB_COMMON_DESCRIPTOR NTAPI USBD_ParseDescriptors(PVOID DescriptorBuffer, ULONG TotalLength, PVOID StartPosition, LONG DescriptorType)
VOID NTAPI USBD_WaitDeviceMutex(PVOID Unknown)
PVOID NTAPI USBD_Debug_GetHeap(ULONG Unknown1, POOL_TYPE PoolType, ULONG NumberOfBytes, ULONG Tag)
ULONG NTAPI DllInitialize(ULONG Unknown)
PURB NTAPI USBD_CreateConfigurationRequestEx(PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor, PUSBD_INTERFACE_LIST_ENTRY InterfaceList)
PUSB_INTERFACE_DESCRIPTOR NTAPI USBD_ParseConfigurationDescriptorEx(PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor, PVOID StartPosition, LONG InterfaceNumber, LONG AlternateSetting, LONG InterfaceClass, LONG InterfaceSubClass, LONG InterfaceProtocol)
NTSTATUS NTAPI USBD_CreateDevice(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3, ULONG Unknown4, ULONG Unknown5)
VOID NTAPI USBD_FreeDeviceName(PVOID Unknown)
ULONG NTAPI USBD_CalculateUsbBandwidth(ULONG MaxPacketSize, UCHAR EndpointType, BOOLEAN LowSpeed)
PUSB_INTERFACE_DESCRIPTOR NTAPI USBD_ParseConfigurationDescriptor(PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor, UCHAR InterfaceNumber, UCHAR AlternateSetting)
ULONG NTAPI USBD_GetPdoRegistryParameter(PDEVICE_OBJECT PhysicalDeviceObject, PVOID Parameter, ULONG ParameterLength, PWCHAR KeyName, ULONG KeyNameLength)
NTSTATUS NTAPI USBD_QueryBusTime(PDEVICE_OBJECT RootHubPdo, PULONG CurrentFrame)
ULONG NTAPI USBD_Dispatch(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3, ULONG Unknown4)
VOID NTAPI USBD_RegisterHcDeviceCapabilities(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3)
VOID NTAPI USBD_SetSuspendPowerState(ULONG Unknown1, ULONG Unknown2)
ULONG NTAPI USBD_GetSuspendPowerState(ULONG Unknown1)
VOID NTAPI USBD_RegisterHcFilter(PDEVICE_OBJECT DeviceObject, PDEVICE_OBJECT FilterDeviceObject)
PVOID NTAPI USBD_AllocateDeviceName(ULONG Unknown)
NTSTATUS NTAPI USBD_MakePdoName(ULONG Unknown1, ULONG Unknown2)
VOID NTAPI USBD_CompleteRequest(ULONG Unknown1, ULONG Unknown2)
NTSTATUS NTAPI USBD_GetDeviceInformation(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3)
VOID NTAPI USBD_GetUSBDIVersion(PUSBD_VERSION_INFORMATION Version)
NTSTATUS NTAPI USBD_RemoveDevice(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3)
PURB NTAPI USBD_CreateConfigurationRequest(PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor, PUSHORT Size)
ULONG NTAPI USBD_GetInterfaceLength(PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor, PUCHAR BufferEnd)
NTSTATUS NTAPI USBD_RestoreDevice(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3)
_In_ ULONG _In_ PVOID StartPosition
_In_ UCHAR _In_ BOOLEAN LowSpeed
_In_ PVOID _In_ LONG _In_ LONG _In_ LONG _In_ LONG InterfaceSubClass
#define GET_USBD_INTERFACE_SIZE(numEndpoints)
_In_ ULONG _In_ PVOID _In_ LONG DescriptorType
_In_ PDEVICE_OBJECT FilterDeviceObject
#define GET_SELECT_CONFIGURATION_REQUEST_SIZE(totalInterfaces, totalPipes)
_In_ PUSBD_INTERFACE_LIST_ENTRY InterfaceList
_In_ PVOID _In_ LONG _In_ LONG AlternateSetting
_In_ ULONG ParameterLength
_In_ ULONG _In_ ULONG KeyNameLength
_In_ PVOID _In_ LONG _In_ LONG _In_ LONG _In_ LONG _In_ LONG InterfaceProtocol
_In_ PVOID _In_ LONG _In_ LONG _In_ LONG InterfaceClass
_In_ PVOID _In_ LONG InterfaceNumber
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
_In_ WDFUSBINTERFACE _In_ UCHAR _Out_ PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
_In_ ULONG _In_ ACCESS_MASK _Out_ PHANDLE DevInstRegKey
#define PLUGPLAY_REGKEY_DEVICE
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
_Inout_opt_ PVOID Parameter