ReactOS 0.4.16-dev-1946-g52006dd
fxusbdeviceapi.cpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxUsbDeviceAPI.cpp
8
9Abstract:
10
11
12Author:
13
14Environment:
15
16 Both kernel and user mode
17
18Revision History:
19
20--*/
21
22#include "fxusbpch.hpp"
23
24extern "C" {
25#if defined(EVENT_TRACING)
26#include "FxUsbDeviceAPI.tmh"
27#endif
28}
29
30//
31// Extern "C" all APIs
32//
33extern "C" {
34
40 __in
41 PFX_DRIVER_GLOBALS FxDriverGlobals,
42 __in
44 __in
48 __out
49 WDFUSBDEVICE* UsbDevice
50 )
51/*++
52
53Routine Description:
54 Creates a WDFUSBDEVICE handle for the client.
55
56Arguments:
57
58 Device - FxDeviceBase object
59
60 USBDClientContractVersion - The USBD Client Contract version of the client driver
61
62 UsbDevice - Pointer which will receive the created handle
63
64Return Value:
65 STATUS_SUCCESS - success
66 STATUS_INSUFFICIENT_RESOURCES - no memory available
67 ...
68
69 --*/
70{
73
74 //
75 // Basic parameter validation
76 //
77
78 FxPointerNotNull(FxDriverGlobals, UsbDevice);
79 *UsbDevice = NULL;
80
83 return status;
84 }
85
86 status = FxValidateObjectAttributes(FxDriverGlobals,
89 if (!NT_SUCCESS(status)) {
90 return status;
91 }
92
93 pUsbDevice = new(FxDriverGlobals, Attributes) FxUsbDevice(FxDriverGlobals);
94 if (pUsbDevice == NULL) {
96 }
97
98 //
99 // Perform all init and handle creation functions. Check for error at the
100 // end and clean up there.
101 //
102 status = pUsbDevice->Init(Device);
103
106
107 device = NULL;
108
110
111 if (NT_SUCCESS(status)) {
112 status = pUsbDevice->CreateInterfaces();
113 }
114
115 if (NT_SUCCESS(status)) {
116 status = Device->AddIoTarget(pUsbDevice);
117 }
118
119 if (NT_SUCCESS(status)) {
121 }
122
123 if (NT_SUCCESS(status)) {
124 *UsbDevice = (WDFUSBDEVICE) device;
125 }
126 }
127
128 if (!NT_SUCCESS(status)) {
129 //
130 // And now free it
131 //
132 pUsbDevice->DeleteFromFailedCreate();
133 }
134
135 return status;
136}
137
141WDFAPI
142NTAPI
143WDFEXPORT(WdfUsbTargetDeviceCreate)(
144 __in
145 PWDF_DRIVER_GLOBALS DriverGlobals,
146 __in
147 WDFDEVICE Device,
150 __out
151 WDFUSBDEVICE* UsbDevice
152 )
153/*++
154
155Routine Description:
156 Creates a WDFUSBDEVICE handle for the client.
157
158Arguments:
159 Device - WDFDEVICE handle to which we are attaching the WDFUSBDEVICE handle
160 to
161 PUsbDevice - Pointer which will receive the created handle
162
163Return Value:
164 STATUS_SUCCESS - success
165 STATUS_INSUFFICIENT_RESOURCES - no memory available
166 ...
167
168 --*/
169{
170 DDI_ENTRY();
171
174
176 Device,
178 (PVOID*)&pDevice,
180
182 pDevice,
185 UsbDevice);
186}
187
191WDFAPI
192NTAPI
193WDFEXPORT(WdfUsbTargetDeviceCreateWithParameters)(
194 __in
195 PWDF_DRIVER_GLOBALS DriverGlobals,
196 __in
197 WDFDEVICE Device,
198 __in
202 __out
203 WDFUSBDEVICE* UsbDevice
204 )
205/*++
206
207Routine Description:
208 Creates a WDFUSBDEVICE handle for the client.
209
210Arguments:
211 Device - WDFDEVICE handle to which we are attaching the WDFUSBDEVICE handle
212 to
213 PUsbDevice - Pointer which will receive the created handle
214
215Return Value:
216 STATUS_SUCCESS - success
217 STATUS_INSUFFICIENT_RESOURCES - no memory available
218 ...
219
220 --*/
221{
222 DDI_ENTRY();
223
227
229 Device,
231 (PVOID*)&pDevice,
233
235
236 if (Config->Size != sizeof(WDF_USB_DEVICE_CREATE_CONFIG)) {
238
241 "WDF_USB_DEVICE_CREATE_CONFIG Size 0x%x, expected 0x%x, %!STATUS!",
243
244 return status;
245 }
246
248 pDevice,
249 Config->USBDClientContractVersion,
251 UsbDevice);
252}
253
257WDFAPI
258NTAPI
259WDFEXPORT(WdfUsbTargetDeviceRetrieveInformation)(
260 __in
261 PWDF_DRIVER_GLOBALS DriverGlobals,
262 __in
263 WDFUSBDEVICE UsbDevice,
264 __out
266 )
267{
268 DDI_ENTRY();
269
273
275 UsbDevice,
277 (PVOID*) &pUsbDevice,
279
281
285 "Information size %d, expected %d %!STATUS!",
287 status);
288 return status;
289 }
290
291 pUsbDevice->GetInformation(Information);
292
294}
295
297VOID
298WDFAPI
299NTAPI
300WDFEXPORT(WdfUsbTargetDeviceGetDeviceDescriptor)(
301 __in
302 PWDF_DRIVER_GLOBALS DriverGlobals,
303 __in
304 WDFUSBDEVICE UsbDevice,
305 __out
307 )
308{
309 DDI_ENTRY();
310
314
316 UsbDevice,
318 (PVOID*) &pUsbDevice,
320
322
324 if (!NT_SUCCESS(status)) {
325 return;
326 }
327
328 pUsbDevice->CopyDeviceDescriptor(UsbDeviceDescriptor);
329}
330
334WDFAPI
335NTAPI
336WDFEXPORT(WdfUsbTargetDeviceRetrieveConfigDescriptor)(
337 __in
338 PWDF_DRIVER_GLOBALS DriverGlobals,
339 __in
340 WDFUSBDEVICE UsbDevice,
343 __inout
345 )
346{
347 DDI_ENTRY();
348
352
354 UsbDevice,
356 (PVOID*) &pUsbDevice,
358
360
362 if (!NT_SUCCESS(status)) {
363 return status;
364 }
365
366 return pUsbDevice->GetConfigDescriptor(ConfigDescriptor,
368}
369
373WDFAPI
374NTAPI
375WDFEXPORT(WdfUsbTargetDeviceQueryString)(
376 __in
377 PWDF_DRIVER_GLOBALS DriverGlobals,
378 __in
379 WDFUSBDEVICE UsbDevice,
381 WDFREQUEST Request,
386 __inout
388 __in
392 )
393{
394 DDI_ENTRY();
395
399
401 UsbDevice,
403 (PVOID*) &pUsbDevice,
405
407
409 if (!NT_SUCCESS(status)) {
410 return status;
411 }
412
414 if (!NT_SUCCESS(status)) {
415 return status;
416 }
417
418 status = pUsbDevice->GetString(String,
421 LangID,
422 Request,
424
425 return status;
426}
427
431WDFAPI
432NTAPI
433WDFEXPORT(WdfUsbTargetDeviceAllocAndQueryString)(
434 __in
435 PWDF_DRIVER_GLOBALS DriverGlobals,
436 __in
437 WDFUSBDEVICE UsbDevice,
440 __out
441 WDFMEMORY* StringMemory,
444 __in
448 )
449{
450 DDI_ENTRY();
451
453 WDFMEMORY hMemory;
457
459 UsbDevice,
461 (PVOID*) &pUsbDevice,
463
465
468 *NumCharacters = 0;
469 }
470
472 if (!NT_SUCCESS(status)) {
473 return status;
474 }
475
477 if (!NT_SUCCESS(status)) {
478 return status;
479 }
480
482
485
490 numChars * sizeof(WCHAR),
491 &pBuffer);
492
493 if (!NT_SUCCESS(status)) {
495 }
496
498 (WDFOBJECT*)&hMemory);
499
500 if (NT_SUCCESS(status)) {
501 status = pUsbDevice->GetString((PUSHORT) pBuffer->GetBuffer(),
502 &numChars,
504 LangID);
505
506 if (NT_SUCCESS(status)) {
507 if (NumCharacters != NULL) {
509 }
511 }
512 }
513
514 if (!NT_SUCCESS(status)) {
515 //
516 // There can only be one context on this object right now,
517 // so just clear out the one.
518 //
519 pBuffer->DeleteFromFailedCreate();
520 }
521 }
522
523 return status;
524}
525
529NTAPI
530WDFEXPORT(WdfUsbTargetDeviceFormatRequestForString)(
531 __in
532 PWDF_DRIVER_GLOBALS DriverGlobals,
533 __in
534 WDFUSBDEVICE UsbDevice,
535 __in
536 WDFREQUEST Request,
537 __in
538 WDFMEMORY Memory,
541 __in
545 )
546/*++
547
548Routine Description:
549 Formats a request so that it can be used to query for a string from the
550 device.
551
552Arguments:
553 UsbDevice - device to be queried
554
555 Request - request to format
556
557 Memory - memory to write the string into
558
559
560Return Value:
561
562
563 --*/
564
565{
566 DDI_ENTRY();
567
575
577 UsbDevice,
579 (PVOID*) &pUsbDevice,
581
584 "WDFUSBDEVICE %p, WDFREQUEST %p, WDFMEMORY %p, StringIndex %d, LandID 0x%x",
586
588 Memory,
590 (PVOID*) &pMemory);
591
593 Request,
595 (PVOID*) &pRequest);
596
598 if (!NT_SUCCESS(status)) {
599 return status;
600 }
601
602 buf.SetMemory(pMemory, Offset);
603
604 bufferSize = buf.GetBufferLength();
605
606 //
607 // the string descriptor is array of WCHARs so the buffer being used must be
608 // of an integral number of them.
609 //
610 if ((bufferSize % sizeof(WCHAR)) != 0) {
612
615 "WDFMEMORY %p length must be even number of WCHARs, but is %I64d in "
616 "length, %!STATUS!",
618
619 return status;
620 }
621
622 //
623 // While the length in the descriptor (bLength) is a byte, so the requested
624 // buffer cannot be bigger then that, do not check the bufferSize < 0xFF.
625 // We don't check because the driver can be using the WDFMEMORY as a part
626 // of a larger structure.
627 //
628
629 //
630 // Format the request
631 //
632 status = pUsbDevice->FormatStringRequest(pRequest, &buf, StringIndex, LangID);
633
634 if (NT_SUCCESS(status)) {
635 FxUsbDeviceStringContext* pContext;
636
639 pContext->m_UsbParameters.Parameters.DeviceString.StringIndex = StringIndex;
641 }
642
644 "WDFUSBDEVICE %p, WDFREQUEST %p, WDFMEMORY %p, %!STATUS!",
646
647 return status;
648}
649
653WDFAPI
654NTAPI
655WDFEXPORT(WdfUsbTargetDeviceSelectConfig)(
656 __in
657 PWDF_DRIVER_GLOBALS DriverGlobals,
658 __in
659 WDFUSBDEVICE UsbDevice,
662 __inout
664 )
665{
666 DDI_ENTRY();
667
671
673 UsbDevice,
675 (PVOID*) &pUsbDevice,
677
679
681 if (!NT_SUCCESS(status)) {
682 return status;
683 }
684
688 "Params size %d, expected %d %!STATUS!",
690 status);
691 return status;
692 }
693
694 //
695 // Sanity check the Type value as well to be in range.
696 //
698 ||
700
702
704 "Params Type %d not a valid value, %!STATUS!",
705 Params->Size, status);
706
707 return status;
708 }
709
710#if (FX_CORE_MODE == FX_CORE_USER_MODE)
715
717 "Params Type %d not supported for UMDF, %!STATUS!",
718 Params->Type, status);
719
720 return status;
721
722 }
723#endif
724
728 if (!NT_SUCCESS(status)) {
729 return status;
730 }
731
732 if (pUsbDevice->HasMismatchedInterfacesInConfigDescriptor()) {
733 //
734 // Config descriptor reported zero interfaces, but we found an
735 // interface descriptor in it.
736 //
738
741 "WDFUSBDEVICE %p number of interfaces found in the config descriptor "
742 "does not match bNumInterfaces in config descriptor, failing config "
743 "operation %!WdfUsbTargetDeviceSelectConfigType!, %!STATUS!",
744 UsbDevice, Params->Type, status);
745
746 return status;
747 }
748 else if (pUsbDevice->GetNumInterfaces() == 0) {
749 //
750 // Special case the zero interface case and exit early
751 //
753
756 "WDFUSBDEVICE %p succeeding config operation "
757 "%!WdfUsbTargetDeviceSelectConfigType! on zero interfaces "
758 "immediately, %!STATUS!", UsbDevice, Params->Type, status);
759
760 return status;
761 }
762
763 switch (Params->Type) {
764
765#if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
766
768 status = pUsbDevice->Deconfig();
769 break;
770
772 if (Params->Types.Descriptor.InterfaceDescriptors == NULL ||
773 Params->Types.Descriptor.NumInterfaceDescriptors == 0) {
777 "Either InterfaceDescriptor is NULL or NumInterfaceDescriptors is zero "
778 "WDFUSBDEVICE %p InterfaceDescriptor %p NumInterfaceDescriptors 0x%x"
779 "%!WdfUsbTargetDeviceSelectConfigType! %!STATUS!", UsbDevice,
780 Params->Types.Descriptor.InterfaceDescriptors,
781 Params->Types.Descriptor.NumInterfaceDescriptors,
782 Params->Type,
783 status);
784
785 }
786 else {
787 status = pUsbDevice->SelectConfigDescriptor(
789 Params);
790 }
791 break;
792
794 //
795 // Since the USBD macro's dont include the USBD_PIPE_INFORMATION for 0 EP's,
796 // make the length check to use
797 // sizeof(struct _URB_SELECT_CONFIGURATION) - sizeof(USBD_PIPE_INFORMATION)
798 //
799 if (Params->Types.Urb.Urb == NULL ||
800 Params->Types.Urb.Urb->UrbHeader.Function != URB_FUNCTION_SELECT_CONFIGURATION ||
801 Params->Types.Urb.Urb->UrbHeader.Length <
802 (sizeof(struct _URB_SELECT_CONFIGURATION) - sizeof(USBD_PIPE_INFORMATION))) {
806 "Either URB passed in was NULL or the URB Function or Length was invalid "
807 " WDFUSBDEVICE %p Urb 0x%p "
808 "%!WdfUsbTargetDeviceSelectConfigType!"
809 " %!STATUS!", UsbDevice,
810 Params->Types.Urb.Urb,
811 Params->Type,
812 status);
813
814 }
815 else {
816 status = pUsbDevice->SelectConfig(
818 Params->Types.Urb.Urb,
820 NULL);
821 }
822 break;
823
824#endif
825
826
827
828
829
831 if (Params->Types.MultiInterface.Pairs == NULL) {
833
836 "WDFUSBDEVICE %p SettingPairs Array passed is NULL, %!STATUS!",
837 pUsbDevice->GetHandle(),status);
838
839 break;
840 }
841 else if (Params->Types.MultiInterface.NumberInterfaces !=
842 pUsbDevice->GetNumInterfaces()) {
844
847 "WDFUSBDEVICE %p MultiInterface.NumberInterfaces %d != %d "
848 "(reported num interfaces), %!STATUS!",
849 pUsbDevice->GetHandle(),
850 Params->Types.MultiInterface.NumberInterfaces,
851 pUsbDevice->GetNumInterfaces(), status);
852
853 break;
854 }
855
856 // || || Fall through || ||
857 // \/ \/ \/ \/
859
860 //
861 // Validate SettingIndexes passed-in
862 //
863 for (ULONG i = 0;
864 i < Params->Types.MultiInterface.NumberInterfaces;
865 i++) {
866
869 UCHAR numSettings;
870
871 pair = &(Params->Types.MultiInterface.Pairs[i]);
872
874 pair->UsbInterface,
876 (PVOID*) &pUsbInterface);
877
878 numSettings = pUsbInterface->GetNumSettings();
879
880 if (pair->SettingIndex >= numSettings) {
882
885 "WDFUSBDEVICE %p SettingPairs contains invalid SettingIndex"
886 " for WDFUSBINTERFACE %p. Setting index passed in: %d, "
887 "max index: %d, returning %!STATUS!",
888 pUsbDevice->GetHandle(),
889 pair->UsbInterface,
890 pair->SettingIndex,
892 status);
893
894 return status;
895 }
896 }
897
898 status = pUsbDevice->SelectConfigMulti(
900 Params);
901 break;
902
904 status = pUsbDevice->SelectConfigSingle( //vm changed name from SelectConfigAuto
906 Params);
907 break;
908
909 default:
911 }
912
913 return status;
914}
915
916
918UCHAR
919WDFAPI
920NTAPI
921WDFEXPORT(WdfUsbTargetDeviceGetNumInterfaces)(
922 __in
923 PWDF_DRIVER_GLOBALS DriverGlobals,
924 __in
925 WDFUSBDEVICE UsbDevice
926 )
927{
928 DDI_ENTRY();
929
931
933 UsbDevice,
935 (PVOID*) &pUsbDevice);
936
937 return pUsbDevice->GetNumInterfaces();
938}
939
940
943WDFAPI
944NTAPI
945WDFEXPORT(WdfUsbTargetDeviceWdmGetConfigurationHandle)(
946 __in
947 PWDF_DRIVER_GLOBALS DriverGlobals,
948 __in
949 WDFUSBDEVICE UsbDevice
950 )
951{
952 DDI_ENTRY();
953
955
957 UsbDevice,
959 (PVOID*) &pUsbDevice);
960
961 return pUsbDevice->GetConfigHandle();
962}
963
967NTAPI
968WDFEXPORT(WdfUsbTargetDeviceSendControlTransferSynchronously)(
969 __in
970 PWDF_DRIVER_GLOBALS DriverGlobals,
971 __in
972 WDFUSBDEVICE UsbDevice,
974 WDFREQUEST Request,
977 __in
983 )
984/*++
985
986Routine Description:
987 Synchronously sends a control transfer to the default control pipe on the
988 device.
989
990Arguments:
991 UsbDevice - the target representing the device
992
993 Request - Request whose PIRP to use
994
995 RequestOptions - options to use when sending the request
996
997 SetupPacket - control setup packet to be used in the transfer
998
999 MemoryDescriptor - memory to use in the transfer after the setup packet
1000
1001 BytesTransferred - number of bytes sent to or by the device
1002
1003Return Value:
1004 NTSTATUS
1005
1006 --*/
1007{
1008 DDI_ENTRY();
1009
1014
1016 UsbDevice,
1018 (PVOID*) &pUsbDevice,
1020
1022
1024
1025 //
1026 // FxSyncRequest always succeesds for KM but can fail for UM.
1027 //
1028 status = request.Initialize();
1029 if (!NT_SUCCESS(status)) {
1031 "Failed to initialize FxSyncRequest");
1032 return status;
1033 }
1034
1036 "WDFUSBDEVICE %p control transfer sync", UsbDevice);
1037
1039
1041 if (!NT_SUCCESS(status)) {
1042 return status;
1043 }
1044
1046 if (!NT_SUCCESS(status)) {
1047 return status;
1048 }
1049
1050 status = buf.ValidateMemoryDescriptor(
1054 );
1055
1056 if (!NT_SUCCESS(status)) {
1057 return status;
1058 }
1059
1060 status = pUsbDevice->FormatControlRequest(request.m_TrueRequest,
1062 &buf);
1063
1064 if (NT_SUCCESS(status)) {
1067 "WDFUSBDEVICE %p, WDFREQUEST %p being submitted",
1068 UsbDevice, request.m_TrueRequest->GetTraceObjectHandle());
1069
1070 status = pUsbDevice->SubmitSync(request.m_TrueRequest, RequestOptions);
1071
1072 if (BytesTransferred != NULL) {
1073 if (NT_SUCCESS(status)) {
1074#if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
1075 *BytesTransferred = context.m_Urb->TransferBufferLength;
1076#elif (FX_CORE_MODE == FX_CORE_USER_MODE)
1077 *BytesTransferred = context.m_UmUrb.UmUrbControlTransfer.TransferBufferLength;
1078#endif
1079 }
1080 else {
1081 *BytesTransferred = 0;
1082 }
1083 }
1084 }
1085
1087 "WDFUSBDEVICE %p, %!STATUS!", UsbDevice, status);
1088
1089 return status;
1090}
1091
1095NTAPI
1096WDFEXPORT(WdfUsbTargetDeviceFormatRequestForControlTransfer)(
1097 __in
1098 PWDF_DRIVER_GLOBALS DriverGlobals,
1099 __in
1100 WDFUSBDEVICE UsbDevice,
1101 __in
1102 WDFREQUEST Request,
1103 __in
1105 __in_opt
1107 __in_opt
1109 )
1110/*++
1111
1112Routine Description:
1113 Formats a request so that a control transfer can be sent to the device
1114 after this call returns successfully.
1115
1116Arguments:
1117 UsbDevice - the target representing the device
1118
1119 Request - Request to format
1120
1121 SetupPacket - control setup packet to be used in the transfer
1122
1123 TransferMemory - memory to use in the transfer after the setup packet
1124
1125 TransferOffset - offset into TransferMemory and size override for transfer
1126 length
1127
1128Return Value:
1129 NTSTATUS
1130
1131 --*/
1132{
1133 DDI_ENTRY();
1134
1141
1143 UsbDevice,
1145 (PVOID*) &pUsbDevice,
1147
1149 "WDFUSBDEVICE %p, WDFREQUEST %p, WDFMEMORY %p",
1151
1153
1158 (PVOID*) &pMemory);
1159
1161 if (!NT_SUCCESS(status)) {
1162 return status;
1163 }
1164
1165 buf.SetMemory(pMemory, TransferOffset);
1166 }
1167 else {
1168 pMemory = NULL;
1169 }
1170
1172 Request,
1174 (PVOID*) &pRequest);
1175
1176 status = pUsbDevice->FormatControlRequest(pRequest, SetupPacket, &buf);
1177
1178 if (NT_SUCCESS(status)) {
1179 FxUsbDeviceControlContext* pContext;
1180
1182
1184 &pContext->m_UsbParameters.Parameters.DeviceControlTransfer.SetupPacket,
1186 sizeof(*SetupPacket)
1187 );
1188
1189 if (pMemory != NULL) {
1192 }
1193 }
1194
1196 "format control request WDFUSBDEVICE %p, WDFREQWUEST %p, WDFMEMORY %p, %!STATUS!",
1198
1199 return status;
1200}
1201
1205WDFAPI
1206NTAPI
1207WDFEXPORT(WdfUsbTargetDeviceResetPortSynchronously)(
1208 __in
1209 PWDF_DRIVER_GLOBALS DriverGlobals,
1210 __in
1211 WDFUSBDEVICE UsbDevice
1212 )
1213{
1214 DDI_ENTRY();
1215
1219
1221 UsbDevice,
1223 (PVOID*) &pUsbDevice,
1225
1227 if (!NT_SUCCESS(status)) {
1228 return status;
1229 }
1230
1231 status = pUsbDevice->Reset();
1232
1233 return status;
1234}
1235
1236#pragma warning(disable:28285)
1240WDFAPI
1241NTAPI
1242WDFEXPORT(WdfUsbTargetDeviceCreateIsochUrb)(
1243 __in
1244 PWDF_DRIVER_GLOBALS DriverGlobals,
1245 __in
1246 WDFUSBDEVICE UsbDevice,
1247 __in_opt
1249 __in
1251 __out
1252 WDFMEMORY* UrbMemory,
1254 PURB* Urb
1255 )
1256/*++
1257
1258Routine Description:
1259 Creates a WDFUSBDEVICE handle for the client.
1260
1261Arguments:
1262 Attributes - Attributes associated with this object
1263
1264 NumberOfIsochPacket - Maximum number of Isoch packets that will be programmed into this Urb
1265
1266 UrbMemory - The returned handle to the caller for the allocated Urb
1267
1268 Urb - (opt) Pointer to the associated urb buffer.
1269
1270Return Value:
1271 STATUS_INVALID_PARAMETER - any required parameters are not present/invalid
1272
1273 STATUS_INVALID_DEVICE_STATE - If the client did not specify a client contract verion while
1274 creating the WDFUSBDEVICE
1275
1276 STATUS_INSUFFICIENT_RESOURCES - could not allocated the object that backs
1277 the handle
1278
1279 STATUS_SUCCESS - success
1280
1281 ...
1282
1283 --*/
1284{
1285 DDI_ENTRY();
1286
1290
1292 UsbDevice,
1294 (PVOID*) &pUsbDevice,
1296
1297 //
1298 // Basic parameter validation
1299 //
1301
1302 if (pUsbDevice->GetUSBDHandle() == NULL) {
1304
1307 "USBDEVICE Must have been created with Client Contract Verion Info, %!STATUS!",
1308 status);
1309
1310 return status;
1311 }
1312
1313 status = pUsbDevice->CreateIsochUrb(Attributes,
1315 UrbMemory,
1316 Urb);
1317
1318 return status;
1319}
1320
1322WDFUSBINTERFACE
1323WDFAPI
1324NTAPI
1325WDFEXPORT(WdfUsbTargetDeviceGetInterface)(
1326 __in
1327 PWDF_DRIVER_GLOBALS DriverGlobals,
1328 __in
1329 WDFUSBDEVICE UsbDevice,
1330 __in
1332 )
1333/*++
1334
1335Routine Description:
1336
1337
1338Arguments:
1339
1340Return Value:
1341
1342
1343 --*/
1344
1345{
1346 DDI_ENTRY();
1347
1351
1353 UsbDevice,
1355 (PVOID*) &pUsbDevice,
1357
1358 pUsbInterface = pUsbDevice->GetInterfaceFromIndex(InterfaceIndex);
1359
1361 return pUsbInterface->GetHandle();
1362 }
1363 else {
1366 "WDFUSBDEVICE %p has %d interfaces, index %d requested, returning "
1367 "NULL handle",
1368 UsbDevice, pUsbDevice->GetNumInterfaces(), InterfaceIndex);
1369
1370 return NULL;
1371 }
1372}
1373
1377WDFAPI
1378NTAPI
1379WDFEXPORT(WdfUsbTargetDeviceQueryUsbCapability)(
1380 __in
1381 PWDF_DRIVER_GLOBALS DriverGlobals,
1382 __in
1383 WDFUSBDEVICE UsbDevice,
1384 __in
1386 __in
1391 PVOID CapabilityBuffer,
1392 __out_opt
1395 )
1396/*++
1397
1398Routine Description:
1399 Queries USB capability for the device. Such capabilities are available
1400 only with USB 3.0 stack. On earlier stacks this API will fail with
1401 STATUS_NOT_IMPLEMENTED
1402
1403Arguments:
1404 UsbDevice - Device whose capability is to be queried.
1405
1406 CapabilityType - Type of capability as defined by
1407 IOCTL_INTERNAL_USB_GET_USB_CAPABILITY
1408
1409 CapabilityBufferLength - Length of Capability buffer
1410
1411 CapabilityBuffer - Buffer for capability. Can be NULL if
1412 CapabilitiyBufferLength is 0
1413
1414 ResultLength - Actual length of the capability. This parameter is optional.
1415
1416Return Value:
1417 STATUS_SUCCESS - success
1418 STATUS_NOT_IMPLEMENTED - Capabilties are not supported by USB stack
1419 STATUS_INSUFFICIENT_RESOURCES - no memory available
1420 ...
1421
1422 --*/
1423{
1424 DDI_ENTRY();
1425
1429
1431 UsbDevice,
1433 (PVOID*) &pUsbDevice,
1435
1436 if (CapabilityBufferLength > 0) {
1437 FxPointerNotNull(pFxDriverGlobals, CapabilityBuffer);
1438 }
1439
1440 status = pUsbDevice->QueryUsbCapability(CapabilityType,
1442 CapabilityBuffer,
1443 ResultLength);
1444 return status;
1445}
1446
1447} // extern "C"
LONG NTSTATUS
Definition: precomp.h:26
static _Must_inspect_result_ NTSTATUS _Create(__in PFX_DRIVER_GLOBALS DriverGlobals, __in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __in POOL_TYPE PoolType, __in ULONG PoolTag, __in size_t BufferSize, __out FxMemoryObject **Object)
__inline FxRequestContext * GetContext(VOID)
UCHAR GetNumSettings(VOID)
WDFUSBINTERFACE GetHandle(VOID)
_Must_inspect_result_ NTSTATUS ValidateMemoryOffsets(__in_opt PWDFMEMORY_OFFSET Offsets)
Definition: ifxmemory.hpp:105
#define STATUS_NOT_SUPPORTED
Definition: d3dkmdt.h:48
#define __out_opt
Definition: dbghelp.h:65
#define __in
Definition: dbghelp.h:35
#define __out_bcount(x)
Definition: dbghelp.h:68
#define __inout
Definition: dbghelp.h:50
#define __in_opt
Definition: dbghelp.h:38
#define __out
Definition: dbghelp.h:62
#define __out_ecount_opt(x)
Definition: dbghelp.h:77
#define TRACINGIOTARGET
Definition: dbgtrace.h:72
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define __drv_when(cond, annotes)
Definition: driverspecs.h:335
#define __drv_maxIRQL(irql)
Definition: driverspecs.h:291
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#define NonPagedPool
Definition: env_spec_w32.h:307
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
__inline PFX_DRIVER_GLOBALS GetFxDriverGlobals(__in PWDF_DRIVER_GLOBALS DriverGlobals)
Definition: fxglobals.h:597
#define DDI_ENTRY()
Definition: fxglobalskm.h:56
#define WDFEXPORT(a)
Definition: fxmacros.hpp:157
#define FxPointerNotNull(FxDriverGlobals, Ptr)
Definition: fxmacros.hpp:253
@ MemoryDescriptorNullAllowed
@ MemoryDescriptorNoBufferAllowed
NTSTATUS __inline FxValidateRequestOptions(_In_ PFX_DRIVER_GLOBALS FxDriverGlobals, _In_ PWDF_REQUEST_SEND_OPTIONS Options, _In_opt_ FxRequestBase *Request=NULL)
@ FX_TYPE_USB_INTERFACE
Definition: fxtypes.h:104
@ IFX_TYPE_MEMORY
Definition: fxtypes.h:55
@ FX_TYPE_REQUEST
Definition: fxtypes.h:53
@ FX_TYPE_IO_TARGET_USB_DEVICE
Definition: fxtypes.h:102
@ FX_TYPE_DEVICE_BASE
Definition: fxtypes.h:83
@ FxUrbTypeLegacy
Definition: fxusbdevice.hpp:27
return FxUsbTargetDeviceCreate(pFxDriverGlobals, pDevice, USBD_CLIENT_CONTRACT_VERSION_INVALID, Attributes, UsbDevice)
FxUsbInterface * pUsbInterface
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt WDFREQUEST __in_opt PWDF_REQUEST_SEND_OPTIONS RequestOptions
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt PWDF_OBJECT_ATTRIBUTES PipesAttributes
return NULL
_Must_inspect_result_ __in WDFUSBDEVICE __out PWDF_USB_DEVICE_INFORMATION Information
FxUsbDeviceControlContext context(FxUrbTypeLegacy)
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt WDFREQUEST __in_opt PWDF_REQUEST_SEND_OPTIONS __out_ecount_opt NumCharacters PUSHORT __inout PUSHORT __in UCHAR StringIndex
FxObjectHandleGetPtr(pFxDriverGlobals, Memory, IFX_TYPE_MEMORY,(PVOID *) &pMemory)
__checkReturn __in WDFUSBDEVICE __in_opt PWDF_OBJECT_ATTRIBUTES __in ULONG __out WDFMEMORY * UrbMemory
pUsbDevice
_Must_inspect_result_ __in FxDeviceBase * Device
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt WDFREQUEST __in_opt PWDF_REQUEST_SEND_OPTIONS __in PWDF_USB_CONTROL_SETUP_PACKET __in_opt PWDF_MEMORY_DESCRIPTOR MemoryDescriptor
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt WDFREQUEST Request
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGIOTARGET, "WDFUSBDEVICE %p, WDFREQUEST %p, WDFMEMORY %p, StringIndex %d, LandID 0x%x", UsbDevice, Request, Memory, StringIndex, LangID)
__in WDFUSBDEVICE __in UCHAR InterfaceIndex
_Must_inspect_result_ __in FxDeviceBase __in ULONG USBDClientContractVersion
return STATUS_SUCCESS
FxDeviceBase * pDevice
FxRequestBuffer buf
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt WDFREQUEST __in_opt PWDF_REQUEST_SEND_OPTIONS __out_ecount_opt NumCharacters PUSHORT __inout PUSHORT NumCharacters
_Must_inspect_result_ __in WDFUSBDEVICE __in WDFREQUEST __in WDFMEMORY Memory
NTSTATUS status
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt PWDF_OBJECT_ATTRIBUTES StringMemoryAttributes
USHORT numChars
_Must_inspect_result_ __in WDFUSBDEVICE __in CONST GUID __in ULONG CapabilityBufferLength
IFxMemory * pMemory
FxObjectHandleGetPtrAndGlobals(GetFxDriverGlobals(DriverGlobals), Device, FX_TYPE_DEVICE_BASE,(PVOID *)&pDevice, &pFxDriverGlobals)
__checkReturn __in WDFUSBDEVICE __in_opt PWDF_OBJECT_ATTRIBUTES __in ULONG NumberOfIsochPackets
FxRequest * pRequest
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt WDFREQUEST __in_opt PWDF_REQUEST_SEND_OPTIONS __in PWDF_USB_CONTROL_SETUP_PACKET SetupPacket
_Must_inspect_result_ __in WDFUSBDEVICE __in WDFREQUEST __in PWDF_USB_CONTROL_SETUP_PACKET __in_opt WDFMEMORY TransferMemory
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt WDFREQUEST __in_opt PWDF_REQUEST_SEND_OPTIONS __in PWDF_USB_CONTROL_SETUP_PACKET __in_opt PWDF_MEMORY_DESCRIPTOR __out_opt PULONG BytesTransferred
__checkReturn __in WDFDEVICE __in PWDF_USB_DEVICE_CREATE_CONFIG Config
_Must_inspect_result_ __in WDFUSBDEVICE __in CONST GUID * CapabilityType
_Must_inspect_result_ __in FxDeviceBase __in ULONG __in_opt PWDF_OBJECT_ATTRIBUTES __out WDFUSBDEVICE * UsbDevice
WDFMEMORY hMemory
size_t bufferSize
_Must_inspect_result_ __in WDFUSBDEVICE __in WDFREQUEST __in WDFMEMORY __in_opt PWDFMEMORY_OFFSET Offset
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt PWDF_OBJECT_ATTRIBUTES __out WDFMEMORY * StringMemory
__in WDFUSBDEVICE __out PUSB_DEVICE_DESCRIPTOR UsbDeviceDescriptor
_Must_inspect_result_ __in FxDeviceBase __in ULONG __in_opt PWDF_OBJECT_ATTRIBUTES Attributes
_Must_inspect_result_ __in WDFUSBDEVICE __in WDFREQUEST __in PWDF_USB_CONTROL_SETUP_PACKET __in_opt WDFMEMORY __in_opt PWDFMEMORY_OFFSET TransferOffset
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt PWDF_OBJECT_ATTRIBUTES __inout PWDF_USB_DEVICE_SELECT_CONFIG_PARAMS Params
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt WDFREQUEST __in_opt PWDF_REQUEST_SEND_OPTIONS __out_ecount_opt NumCharacters PUSHORT __inout PUSHORT __in UCHAR __in_opt USHORT LangID
PFX_DRIVER_GLOBALS pFxDriverGlobals
@ FX_VALIDATE_OPTION_PARENT_NOT_ALLOWED
_Must_inspect_result_ NTSTATUS FxValidateObjectAttributes(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PWDF_OBJECT_ATTRIBUTES Attributes, __in ULONG Flags=FX_VALIDATE_OPTION_NONE_SPECIFIED)
__inline NTSTATUS FxVerifierCheckIrqlLevel(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in KIRQL Irql)
Definition: fxverifier.h:158
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define _Must_inspect_result_
Definition: no_sal2.h:62
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
#define CONST
Definition: pedump.c:81
unsigned short USHORT
Definition: pedump.c:61
PVOID pBuffer
#define __checkReturn
Definition: sal_old.h:113
#define __deref_out_range(x, y)
Definition: sal_old.h:220
#define __out_bcount_part_opt(size, length)
Definition: sal_old.h:281
#define __deref_opt_out_bcount(size)
Definition: sal_old.h:184
#define TRACE_LEVEL_VERBOSE
Definition: storswtr.h:30
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
WDF_USB_REQUEST_COMPLETION_PARAMS m_UsbParameters
Definition: usb.h:529
struct _WDF_USB_REQUEST_COMPLETION_PARAMS::@4014::@4015 DeviceString
union _WDF_USB_REQUEST_COMPLETION_PARAMS::@4014 Parameters
struct _WDF_USB_REQUEST_COMPLETION_PARAMS::@4014::@4016 DeviceControlTransfer
Definition: http.c:7252
Definition: devices.h:37
Definition: _pair.h:47
Definition: tftpd.h:86
Definition: ps.c:97
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
uint16_t * PUSHORT
Definition: typedefs.h:56
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define STATUS_INVALID_DEVICE_STATE
Definition: udferr_usr.h:178
#define STATUS_INFO_LENGTH_MISMATCH
Definition: udferr_usr.h:133
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define URB_FUNCTION_SELECT_CONFIGURATION
Definition: usb.h:86
_In_ PIO_STACK_LOCATION _In_ PURB Urb
Definition: usbdlib.h:267
#define USBD_CLIENT_CONTRACT_VERSION_INVALID
Definition: usbdlib.h:99
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
Definition: wdfchildlist.h:476
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3782
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2439
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS RequestOptions
Definition: wdfiotarget.h:867
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _Strict_type_match_ POOL_TYPE _In_opt_ ULONG _In_ _Out_ WDFMEMORY * Memory
Definition: wdfmemory.h:169
_In_ WDFIOTARGET _In_ PWDF_REQUEST_COMPLETION_PARAMS Params
Definition: wdfrequest.h:308
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
Definition: wdfrequest.h:1049
#define WDFAPI
Definition: wdftypes.h:53
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_ CONST GUID _In_ ULONG CapabilityBufferLength
Definition: wdfusb.h:1615
_In_ WDFUSBDEVICE _Out_ PUSB_DEVICE_DESCRIPTOR UsbDeviceDescriptor
Definition: wdfusb.h:1008
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_ WDFREQUEST _In_ WDFMEMORY UrbMemory
Definition: wdfusb.h:1576
_Must_inspect_result_ _In_ WDFDEVICE _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFUSBDEVICE * UsbDevice
Definition: wdfusb.h:906
_Must_inspect_result_ _In_ WDFUSBDEVICE _Out_writes_bytes_to_opt_ ConfigDescriptorLength PVOID ConfigDescriptor
Definition: wdfusb.h:1036
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_ WDFREQUEST _In_ PWDF_USB_CONTROL_SETUP_PACKET _In_opt_ WDFMEMORY _In_opt_ PWDFMEMORY_OFFSET TransferOffset
Definition: wdfusb.h:1387
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ ULONG NumberOfIsochPackets
Definition: wdfusb.h:1703
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ PWDF_OBJECT_ATTRIBUTES StringMemoryAttributes
Definition: wdfusb.h:1123
_Must_inspect_result_ _In_ WDFUSBDEVICE _Out_writes_bytes_to_opt_ ConfigDescriptorLength PVOID _Inout_ PUSHORT ConfigDescriptorLength
Definition: wdfusb.h:1040
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _In_ PWDF_USB_CONTROL_SETUP_PACKET _In_opt_ PWDF_MEMORY_DESCRIPTOR MemoryDescriptor
Definition: wdfusb.h:1339
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_writes_opt_ NumCharacters PUSHORT _Inout_ PUSHORT NumCharacters
Definition: wdfusb.h:1078
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_ CONST GUID * CapabilityType
Definition: wdfusb.h:1613
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_writes_opt_ NumCharacters PUSHORT _Inout_ PUSHORT _In_ UCHAR StringIndex
Definition: wdfusb.h:1080
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_writes_opt_ NumCharacters PUSHORT _Inout_ PUSHORT _In_ UCHAR _In_opt_ USHORT LangID
Definition: wdfusb.h:1083
@ WdfUsbTargetDeviceSelectConfigTypeUrb
Definition: wdfusb.h:132
@ WdfUsbTargetDeviceSelectConfigTypeInterfacesPairs
Definition: wdfusb.h:130
@ WdfUsbTargetDeviceSelectConfigTypeSingleInterface
Definition: wdfusb.h:128
@ WdfUsbTargetDeviceSelectConfigTypeInterfacesDescriptor
Definition: wdfusb.h:131
@ WdfUsbTargetDeviceSelectConfigTypeDeconfig
Definition: wdfusb.h:127
@ WdfUsbTargetDeviceSelectConfigTypeMultiInterface
Definition: wdfusb.h:129
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFMEMORY * StringMemory
Definition: wdfusb.h:1125
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_ WDFREQUEST _In_ PWDF_USB_CONTROL_SETUP_PACKET _In_opt_ WDFMEMORY TransferMemory
Definition: wdfusb.h:1384
_In_ WDFUSBDEVICE _In_ UCHAR InterfaceIndex
Definition: wdfusb.h:2462
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _In_ PWDF_USB_CONTROL_SETUP_PACKET SetupPacket
Definition: wdfusb.h:1337
_Must_inspect_result_ _In_ WDFUSBINTERFACE _In_opt_ PWDF_OBJECT_ATTRIBUTES PipesAttributes
Definition: wdfusb.h:2390
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _In_ PWDF_USB_CONTROL_SETUP_PACKET _In_opt_ PWDF_MEMORY_DESCRIPTOR _Out_opt_ PULONG BytesTransferred
Definition: wdfusb.h:1342
unsigned char UCHAR
Definition: xmlstorage.h:181
__wchar_t WCHAR
Definition: xmlstorage.h:180