ReactOS 0.4.15-dev-7958-gcd0bb1a
usbd.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Universal Serial Bus Driver/Helper Library
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: drivers/usb/usbd/usbd.c
5 * PURPOSE: Helper Library for USB
6 * PROGRAMMERS:
7 * Filip Navara <xnavara@volny.cz>
8 * Michael Martin <michael.martin@reactos.org>
9 *
10 */
11
12/*
13 * Universal Serial Bus Driver/Helper Library
14 *
15 * Written by Filip Navara <xnavara@volny.cz>
16 *
17 * Notes:
18 * This driver was obsoleted in Windows XP and most functions
19 * became pure stubs. But some of them were retained for backward
20 * compatibility with existing drivers.
21 *
22 * Preserved functions:
23 *
24 * USBD_Debug_GetHeap (implemented)
25 * USBD_Debug_RetHeap (implemented)
26 * USBD_CalculateUsbBandwidth (implemented, tested)
27 * USBD_CreateConfigurationRequestEx (implemented)
28 * USBD_CreateConfigurationRequest
29 * USBD_GetInterfaceLength (implemented)
30 * USBD_ParseConfigurationDescriptorEx (implemented)
31 * USBD_ParseDescriptors (implemented)
32 * USBD_GetPdoRegistryParameters (implemented)
33 */
34
35#define _USBD_
36#define NDEBUG
37#include <ntddk.h>
38#include <usbdi.h>
39#include <usbdlib.h>
40#include <debug.h>
41#ifndef PLUGPLAY_REGKEY_DRIVER
42#define PLUGPLAY_REGKEY_DRIVER 2
43#endif
44
48{
49 return STATUS_SUCCESS;
50}
51
52/*
53 * @implemented
54 */
57{
58 return 0;
59}
60
61/*
62 * @implemented
63 */
66{
67 return 0;
68}
69
70/*
71 * @implemented
72 */
75 ULONG Tag)
76{
78}
79
80/*
81 * @implemented
82 */
85{
86 ExFreePool(Heap);
87}
88
89/*
90 * @implemented
91 */
94 ULONG_PTR Info3)
95{
96}
97
98/*
99 * @implemented
100 */
103{
105 return NULL;
106}
107
108/*
109 * @implemented
110 */
113 ULONG MaxPacketSize,
116 )
117{
118 ULONG OverheadTable[] = {
119 0x00, /* UsbdPipeTypeControl */
120 0x09, /* UsbdPipeTypeIsochronous */
121 0x00, /* UsbdPipeTypeBulk */
122 0x0d /* UsbdPipeTypeInterrupt */
123 };
125
126 if (OverheadTable[EndpointType] != 0)
127 {
128 Result = ((MaxPacketSize + OverheadTable[EndpointType]) * 8 * 7) / 6;
129 if (LowSpeed)
130 return Result << 3;
131 return Result;
132 }
133 return 0;
134}
135
136/*
137 * @implemented
138 */
141{
143 return 1;
144}
145
146/*
147 * @implemented
148 */
151{
153}
154
155/*
156 * @implemented
157 */
160{
162}
163
164/*
165 * @implemented
166 */
169{
171}
172
173/*
174 * @implemented
175 */
178{
180 return 0;
181}
182
183/*
184 * @implemented
185 */
189{
192}
193
194/*
195 * @implemented
196 */
201{
204}
205
206/*
207 * @implemented
208 */
211{
214}
215
216/*
217 * @implemented
218 */
222{
225}
226
227/*
228 * @implemented
229 */
232{
235}
236
237/*
238 * @implemented
239 */
242{
244}
245
246/*
247 * @implemented
248 */
253 )
254{
256}
257
258/*
259 * @implemented
260 */
263{
265}
266
267/*
268 * @implemented
269 */
271USBD_MakePdoName(ULONG Unknown1, ULONG Unknown2)
272{
275}
276
277/*
278 * @implemented
279 */
282 PDEVICE_OBJECT RootHubPdo,
283 PULONG CurrentFrame
284 )
285{
288}
289
290/*
291 * @implemented
292 */
296 )
297{
298 if (Version != NULL)
299 {
300 Version->USBDI_Version = USBDI_VERSION;
301 Version->Supported_USB_Version = 0x200;
302 }
303}
304
305/*
306 * @implemented
307 */
310{
313}
314
315/*
316 * @implemented
317 */
321{
323}
324
325/*
326 * @implemented
327 */
330 PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor,
332 )
333{
334 PURB Urb;
335 ULONG UrbSize = 0;
336 ULONG InterfaceCount = 0, PipeCount = 0;
337 ULONG InterfaceNumber, EndPointNumber;
338 PUSBD_INTERFACE_INFORMATION InterfaceInfo;
339
340 while(InterfaceList[InterfaceCount].InterfaceDescriptor)
341 {
342 // pipe count
343 PipeCount += InterfaceList[InterfaceCount].InterfaceDescriptor->bNumEndpoints;
344
345 // interface count
346 InterfaceCount++;
347 }
348
349 // size of urb
350 UrbSize = GET_SELECT_CONFIGURATION_REQUEST_SIZE(InterfaceCount, PipeCount);
351
352 // allocate urb
353 Urb = ExAllocatePool(NonPagedPool, UrbSize);
354 if (!Urb)
355 {
356 // no memory
357 return NULL;
358 }
359
360 // zero urb
361 RtlZeroMemory(Urb, UrbSize);
362
363 // init urb header
365 Urb->UrbSelectConfiguration.Hdr.Length = UrbSize;
366 Urb->UrbSelectConfiguration.ConfigurationDescriptor = ConfigurationDescriptor;
367
368 // init interface information
369 InterfaceInfo = &Urb->UrbSelectConfiguration.Interface;
370 for (InterfaceNumber = 0; InterfaceNumber < InterfaceCount; InterfaceNumber++)
371 {
372 // init interface info
373 InterfaceList[InterfaceNumber].Interface = InterfaceInfo;
377
378 // store length
380
381 // sanity check
382 //C_ASSERT(FIELD_OFFSET(USBD_INTERFACE_INFORMATION, Pipes) == 16);
383
384 for (EndPointNumber = 0; EndPointNumber < InterfaceInfo->NumberOfPipes; EndPointNumber++)
385 {
386 // init max transfer size
387 InterfaceInfo->Pipes[EndPointNumber].MaximumTransferSize = PAGE_SIZE;
388 }
389
390 // next interface info
391 InterfaceInfo = (PUSBD_INTERFACE_INFORMATION) ((ULONG_PTR)InterfaceInfo + InterfaceInfo->Length);
392 }
393
394 return Urb;
395}
396
397/*
398 * @implemented
399 */
402 PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor,
404 )
405{
406 /* WindowsXP returns NULL */
407 return NULL;
408}
409
410/*
411 * @implemented
412 */
417 )
418{
419 ULONG_PTR Current;
421 ULONG Length = 0;
422 BOOLEAN InterfaceFound = FALSE;
423
424 for (Current = (ULONG_PTR)CurrentDescriptor;
425 Current < (ULONG_PTR)BufferEnd;
426 Current += CurrentDescriptor->bLength)
427 {
428 CurrentDescriptor = (PUSB_INTERFACE_DESCRIPTOR)Current;
429
430 if ((CurrentDescriptor->bDescriptorType == USB_INTERFACE_DESCRIPTOR_TYPE) && (InterfaceFound))
431 break;
432 else if (CurrentDescriptor->bDescriptorType == USB_INTERFACE_DESCRIPTOR_TYPE)
433 InterfaceFound = TRUE;
434
435 Length += CurrentDescriptor->bLength;
436 }
437
438 return Length;
439}
440
441/*
442 * @implemented
443 */
450 )
451{
452 PUSB_COMMON_DESCRIPTOR CommonDescriptor;
453
454 /* use start position */
455 CommonDescriptor = (PUSB_COMMON_DESCRIPTOR)StartPosition;
456
457
458 /* find next available descriptor */
459 while(CommonDescriptor)
460 {
461 if ((ULONG_PTR)CommonDescriptor >= ((ULONG_PTR)DescriptorBuffer + TotalLength))
462 {
463 /* end reached */
464 DPRINT("End reached %p\n", CommonDescriptor);
465 return NULL;
466 }
467
468 DPRINT("CommonDescriptor Type %x Length %x\n", CommonDescriptor->bDescriptorType, CommonDescriptor->bLength);
469
470 /* is the requested one */
471 if (CommonDescriptor->bDescriptorType == DescriptorType)
472 {
473 /* it is */
474 return CommonDescriptor;
475 }
476
477 if (CommonDescriptor->bLength == 0)
478 {
479 /* invalid usb descriptor */
480 return NULL;
481 }
482
483 /* move to next descriptor */
484 CommonDescriptor = (PUSB_COMMON_DESCRIPTOR)((ULONG_PTR)CommonDescriptor + CommonDescriptor->bLength);
485 }
486
487 /* no descriptor found */
488 return NULL;
489}
490
491
492/*
493 * @implemented
494 */
497 PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor,
504 )
505{
508
509 /* set to start position */
511
512 DPRINT("USBD_ParseConfigurationDescriptorEx\n");
513 DPRINT("ConfigurationDescriptor %p Length %lu\n", ConfigurationDescriptor, ConfigurationDescriptor->wTotalLength);
514 DPRINT("CurrentOffset %p Offset %lu\n", StartPosition, ((ULONG_PTR)StartPosition - (ULONG_PTR)ConfigurationDescriptor));
515
517 {
518 /* get interface descriptor */
521 {
522 /* no more descriptors available */
523 break;
524 }
525
526 DPRINT("InterfaceDescriptor %p InterfaceNumber %x AlternateSetting %x Length %lu\n", InterfaceDescriptor, InterfaceDescriptor->bInterfaceNumber, InterfaceDescriptor->bAlternateSetting, InterfaceDescriptor->bLength);
527
528 /* set found */
529 Found = TRUE;
530
531 /* is there an interface number provided */
532 if(InterfaceNumber != -1)
533 {
534 if(InterfaceNumber != InterfaceDescriptor->bInterfaceNumber)
535 {
536 /* interface number does not match */
537 Found = FALSE;
538 }
539 }
540
541 /* is there an alternate setting provided */
542 if(AlternateSetting != -1)
543 {
544 if(AlternateSetting != InterfaceDescriptor->bAlternateSetting)
545 {
546 /* alternate setting does not match */
547 Found = FALSE;
548 }
549 }
550
551 /* match on interface class */
552 if(InterfaceClass != -1)
553 {
554 if(InterfaceClass != InterfaceDescriptor->bInterfaceClass)
555 {
556 /* no match with interface class criteria */
557 Found = FALSE;
558 }
559 }
560
561 /* match on interface sub class */
562 if(InterfaceSubClass != -1)
563 {
564 if(InterfaceSubClass != InterfaceDescriptor->bInterfaceSubClass)
565 {
566 /* no interface sub class match */
567 Found = FALSE;
568 }
569 }
570
571 /* interface protocol criteria */
572 if(InterfaceProtocol != -1)
573 {
574 if(InterfaceProtocol != InterfaceDescriptor->bInterfaceProtocol)
575 {
576 /* no interface protocol match */
577 Found = FALSE;
578 }
579 }
580
581 if (Found)
582 {
583 /* the chosen one */
584 return InterfaceDescriptor;
585 }
586
587 /* sanity check */
588 ASSERT(InterfaceDescriptor->bLength);
589
590 /* move to next descriptor */
592 }
593
594 DPRINT("No Descriptor With InterfaceNumber %ld AlternateSetting %ld InterfaceClass %ld InterfaceSubClass %ld InterfaceProtocol %ld found\n", InterfaceNumber,
596
597 return NULL;
598}
599
600/*
601 * @implemented
602 */
605 PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor,
608 )
609{
610 return USBD_ParseConfigurationDescriptorEx(ConfigurationDescriptor,
611 (PVOID)ConfigurationDescriptor, InterfaceNumber, AlternateSetting,
612 -1, -1, -1);
613}
614
615
616/*
617 * @implemented
618 */
626 )
627{
630
631 /* Open the device key */
634 if (NT_SUCCESS(Status))
635 {
639
640 /* Initialize the unicode string based on caller data */
641 ValueName.Buffer = KeyName;
642 ValueName.Length = ValueName.MaximumLength = KeyNameLength;
643
645 PartialInfo = ExAllocatePool(PagedPool, Length);
646 if (PartialInfo)
647 {
648 Status = ZwQueryValueKey(DevInstRegKey, &ValueName,
651 {
652 /* The caller doesn't want all the data */
653 ExFreePool(PartialInfo);
654 PartialInfo = ExAllocatePool(PagedPool, Length);
655 if (PartialInfo)
656 {
657 Status = ZwQueryValueKey(DevInstRegKey, &ValueName,
659 }
660 else
661 {
663 }
664 }
665
666 if (NT_SUCCESS(Status))
667 {
668 /* Compute the length to copy back */
669 if (ParameterLength < PartialInfo->DataLength)
671 else
672 Length = PartialInfo->DataLength;
673
675 PartialInfo->Data,
676 Length);
677 }
678
679 if (PartialInfo)
680 {
681 ExFreePool(PartialInfo);
682 }
683 } else
686 }
687 return Status;
688}
unsigned char BOOLEAN
PRTL_UNICODE_STRING_BUFFER PULONG PULONG Unknown4
LONG NTSTATUS
Definition: precomp.h:26
#define UNIMPLEMENTED
Definition: debug.h:115
PDEVICE_OBJECT PhysicalDeviceObject
Definition: btrfs_drv.h:1157
return Found
Definition: dirsup.c:1270
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID _In_ size_t _Out_ size_t * DataLength
Definition: cdrom.h:1444
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD IN DWORD IN DWORD IN DWORD Unknown6
Definition: conport.c:40
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD IN DWORD IN DWORD Unknown5
Definition: conport.c:39
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD Unknown3
Definition: conport.c:37
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
ULONG NTAPI DllUnload()
Definition: dll.cpp:28
DRIVER_INITIALIZE DriverEntry
Definition: condrv.c:21
#define ULONG_PTR
Definition: config.h:101
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define PAGE_SIZE
Definition: env_spec_w32.h:49
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
#define NonPagedPool
Definition: env_spec_w32.h:307
#define PagedPool
Definition: env_spec_w32.h:308
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
Status
Definition: gdiplustypes.h:25
@ Unknown
Definition: i8042prt.h:114
@ Unknown7
Definition: winternl.h:927
@ Unknown10
Definition: winternl.h:930
@ Unknown9
Definition: winternl.h:929
#define ASSERT(a)
Definition: mode.c:44
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
@ KeyValuePartialInformation
Definition: nt_native.h:1182
struct _KEY_VALUE_PARTIAL_INFORMATION KEY_VALUE_PARTIAL_INFORMATION
#define STANDARD_RIGHTS_ALL
Definition: nt_native.h:69
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define STATUS_NO_MEMORY
Definition: ntstatus.h:260
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:423
long LONG
Definition: pedump.c:60
NTSTATUS NTAPI IoOpenDeviceRegistryKey(IN PDEVICE_OBJECT DeviceObject, IN ULONG DevInstKeyType, IN ACCESS_MASK DesiredAccess, OUT PHANDLE DevInstRegKey)
Definition: pnpmgr.c:1621
_In_ UCHAR _Outptr_result_bytebuffer_ DescriptorBufferLength PVOID * DescriptorBuffer
Definition: scsi.h:3884
#define STATUS_SUCCESS
Definition: shellext.h:65
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66
#define DPRINT
Definition: sndvol32.h:71
Definition: usb.h:529
struct _URB_SELECT_CONFIGURATION UrbSelectConfiguration
Definition: usb.h:533
USBD_PIPE_INFORMATION Pipes[1]
Definition: usb.h:286
Definition: usbdlib.h:7
PUSBD_INTERFACE_INFORMATION Interface
Definition: usbdlib.h:9
PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor
Definition: usbdlib.h:8
ULONG MaximumTransferSize
Definition: usb.h:265
uint32_t * PULONG
Definition: typedefs.h:59
INT POOL_TYPE
Definition: typedefs.h:78
#define NTAPI
Definition: typedefs.h:36
uint16_t * PUSHORT
Definition: typedefs.h:56
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint16_t * PWCHAR
Definition: typedefs.h:56
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
struct _USB_INTERFACE_DESCRIPTOR * PUSB_INTERFACE_DESCRIPTOR
struct _USB_COMMON_DESCRIPTOR * PUSB_COMMON_DESCRIPTOR
#define USB_INTERFACE_DESCRIPTOR_TYPE
Definition: usb100.h:52
struct _USBD_INTERFACE_INFORMATION * PUSBD_INTERFACE_INFORMATION
#define URB_FUNCTION_SELECT_CONFIGURATION
Definition: usb.h:86
#define USBDI_VERSION
Definition: usb.h:43
VOID NTAPI USBD_FreeDeviceMutex(PVOID Unknown)
Definition: usbd.c:150
VOID NTAPI USBD_Debug_RetHeap(PVOID Heap, ULONG Unknown2, ULONG Unknown3)
Definition: usbd.c:84
VOID NTAPI USBD_Debug_LogEntry(PCHAR Name, ULONG_PTR Info1, ULONG_PTR Info2, ULONG_PTR Info3)
Definition: usbd.c:93
NTSTATUS NTAPI USBD_InitializeDevice(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3, ULONG Unknown4, ULONG Unknown5, ULONG Unknown6)
Definition: usbd.c:187
NTSTATUS NTAPI USBD_RegisterHostController(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3, ULONG Unknown4, ULONG Unknown5, ULONG Unknown6, ULONG Unknown7, ULONG Unknown8, ULONG Unknown9, ULONG Unknown10)
Definition: usbd.c:198
PUSB_COMMON_DESCRIPTOR NTAPI USBD_ParseDescriptors(PVOID DescriptorBuffer, ULONG TotalLength, PVOID StartPosition, LONG DescriptorType)
Definition: usbd.c:445
VOID NTAPI USBD_WaitDeviceMutex(PVOID Unknown)
Definition: usbd.c:168
PVOID NTAPI USBD_Debug_GetHeap(ULONG Unknown1, POOL_TYPE PoolType, ULONG NumberOfBytes, ULONG Tag)
Definition: usbd.c:74
ULONG NTAPI DllInitialize(ULONG Unknown)
Definition: usbd.c:56
PURB NTAPI USBD_CreateConfigurationRequestEx(PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor, PUSBD_INTERFACE_LIST_ENTRY InterfaceList)
Definition: usbd.c:329
PUSB_INTERFACE_DESCRIPTOR NTAPI USBD_ParseConfigurationDescriptorEx(PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor, PVOID StartPosition, LONG InterfaceNumber, LONG AlternateSetting, LONG InterfaceClass, LONG InterfaceSubClass, LONG InterfaceProtocol)
Definition: usbd.c:496
NTSTATUS NTAPI USBD_CreateDevice(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3, ULONG Unknown4, ULONG Unknown5)
Definition: usbd.c:220
VOID NTAPI USBD_FreeDeviceName(PVOID Unknown)
Definition: usbd.c:159
ULONG NTAPI USBD_CalculateUsbBandwidth(ULONG MaxPacketSize, UCHAR EndpointType, BOOLEAN LowSpeed)
Definition: usbd.c:112
PUSB_INTERFACE_DESCRIPTOR NTAPI USBD_ParseConfigurationDescriptor(PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor, UCHAR InterfaceNumber, UCHAR AlternateSetting)
Definition: usbd.c:604
ULONG NTAPI USBD_GetPdoRegistryParameter(PDEVICE_OBJECT PhysicalDeviceObject, PVOID Parameter, ULONG ParameterLength, PWCHAR KeyName, ULONG KeyNameLength)
Definition: usbd.c:620
NTSTATUS NTAPI USBD_QueryBusTime(PDEVICE_OBJECT RootHubPdo, PULONG CurrentFrame)
Definition: usbd.c:281
ULONG NTAPI USBD_Dispatch(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3, ULONG Unknown4)
Definition: usbd.c:140
VOID NTAPI USBD_RegisterHcDeviceCapabilities(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3)
Definition: usbd.c:319
VOID NTAPI USBD_SetSuspendPowerState(ULONG Unknown1, ULONG Unknown2)
Definition: usbd.c:262
ULONG NTAPI USBD_GetSuspendPowerState(ULONG Unknown1)
Definition: usbd.c:177
VOID NTAPI USBD_RegisterHcFilter(PDEVICE_OBJECT DeviceObject, PDEVICE_OBJECT FilterDeviceObject)
Definition: usbd.c:250
PVOID NTAPI USBD_AllocateDeviceName(ULONG Unknown)
Definition: usbd.c:102
NTSTATUS NTAPI USBD_MakePdoName(ULONG Unknown1, ULONG Unknown2)
Definition: usbd.c:271
VOID NTAPI USBD_CompleteRequest(ULONG Unknown1, ULONG Unknown2)
Definition: usbd.c:241
NTSTATUS NTAPI USBD_GetDeviceInformation(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3)
Definition: usbd.c:210
VOID NTAPI USBD_GetUSBDIVersion(PUSBD_VERSION_INFORMATION Version)
Definition: usbd.c:294
NTSTATUS NTAPI USBD_RemoveDevice(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3)
Definition: usbd.c:231
PURB NTAPI USBD_CreateConfigurationRequest(PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor, PUSHORT Size)
Definition: usbd.c:401
ULONG NTAPI USBD_GetInterfaceLength(PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor, PUCHAR BufferEnd)
Definition: usbd.c:414
NTSTATUS NTAPI USBD_RestoreDevice(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3)
Definition: usbd.c:309
_In_ UCHAR EndpointType
Definition: usbdlib.h:225
_In_ ULONG _In_ PVOID StartPosition
Definition: usbdlib.h:159
_In_ UCHAR _In_ BOOLEAN LowSpeed
Definition: usbdlib.h:226
_In_ PVOID _In_ LONG _In_ LONG _In_ LONG _In_ LONG InterfaceSubClass
Definition: usbdlib.h:172
_In_ ULONG TotalLength
Definition: usbdlib.h:158
#define GET_USBD_INTERFACE_SIZE(numEndpoints)
Definition: usbdlib.h:121
_In_ ULONG _In_ PVOID _In_ LONG DescriptorType
Definition: usbdlib.h:160
_In_ PDEVICE_OBJECT FilterDeviceObject
Definition: usbdlib.h:197
#define GET_SELECT_CONFIGURATION_REQUEST_SIZE(totalInterfaces, totalPipes)
Definition: usbdlib.h:112
_In_ PUSBD_INTERFACE_LIST_ENTRY InterfaceList
Definition: usbdlib.h:181
_In_ PVOID _In_ LONG _In_ LONG AlternateSetting
Definition: usbdlib.h:170
_In_ ULONG ParameterLength
Definition: usbdlib.h:206
_In_ ULONG _In_ ULONG KeyNameLength
Definition: usbdlib.h:208
_In_ PVOID _In_ LONG _In_ LONG _In_ LONG _In_ LONG _In_ LONG InterfaceProtocol
Definition: usbdlib.h:173
_In_ PUCHAR BufferEnd
Definition: usbdlib.h:189
_In_ PVOID _In_ LONG _In_ LONG _In_ LONG InterfaceClass
Definition: usbdlib.h:171
_In_ PVOID _In_ LONG InterfaceNumber
Definition: usbdlib.h:169
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Definition: wdfdevice.h:2699
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:215
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
Definition: wdffdo.h:469
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
Definition: wdfregistry.h:243
_In_ WDFUSBINTERFACE _In_ UCHAR _Out_ PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor
Definition: wdfusb.h:2334
_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
Definition: wsk.h:409
_In_ ULONG _In_ ACCESS_MASK _Out_ PHANDLE DevInstRegKey
Definition: iofuncs.h:1127
#define PLUGPLAY_REGKEY_DEVICE
Definition: iofuncs.h:2786
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1036
_Inout_opt_ PVOID Parameter
Definition: rtltypes.h:323
unsigned char UCHAR
Definition: xmlstorage.h:181