ReactOS  0.4.15-dev-2344-g8ddbfde
fxusbpipeapi.cpp
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 Module Name:
6 
7  FxUsbPipeAPI.cpp
8 
9 Abstract:
10 
11 
12 Author:
13 
14 Environment:
15 
16  Both kernel and user mode
17 
18 Revision History:
19 
20 --*/
21 
22 #include "fxusbpch.hpp"
23 
24 extern "C" {
25 #include "FxUsbPipeAPI.tmh"
26 }
27 
28 //
29 // extern "C" the whole file since we are exporting the APIs by name
30 //
31 extern "C" {
32 
34 VOID
35 WDFAPI
36 WDFEXPORT(WdfUsbTargetPipeGetInformation)(
37  __in
39  __in
40  WDFUSBPIPE Pipe,
41  __out
43  )
44 {
45  DDI_ENTRY();
46 
49 
51  Pipe,
53  (PVOID*) &pUsbPipe,
55 
57 
59 }
60 
62 BOOLEAN
63 WDFAPI
64 WDFEXPORT(WdfUsbTargetPipeIsInEndpoint)(
65  __in
67  __in
68  WDFUSBPIPE Pipe
69  )
70 {
71  DDI_ENTRY();
72 
74 
76  Pipe,
78  (PVOID*) &pUsbPipe);
79 
80  return pUsbPipe->IsInEndpoint();
81 }
82 
84 BOOLEAN
85 WDFAPI
86 WDFEXPORT(WdfUsbTargetPipeIsOutEndpoint)(
87  __in
89  __in
90  WDFUSBPIPE Pipe
91  )
92 {
93  DDI_ENTRY();
94 
96 
98  Pipe,
100  (PVOID*) &pUsbPipe);
101 
102  return pUsbPipe->IsOutEndpoint();
103 }
104 
107 WDFAPI
108 WDFEXPORT(WdfUsbTargetPipeGetType)(
109  __in
111  __in
112  WDFUSBPIPE Pipe
113  )
114 {
115  DDI_ENTRY();
116 
118 
120  Pipe,
122  (PVOID*) &pUsbPipe);
123 
124  return pUsbPipe->GetType();
125 }
126 
128 VOID
129 WDFAPI
130 WDFEXPORT(WdfUsbTargetPipeSetNoMaximumPacketSizeCheck)(
131  __in
133  __in
134  WDFUSBPIPE Pipe
135  )
136 {
137  DDI_ENTRY();
138 
141 
143  Pipe,
145  (PVOID*) &pUsbPipe,
147 
149  "WDFUSBPIPE %p", Pipe);
150 
152 }
153 
156 NTSTATUS
157 WDFAPI
158 WDFEXPORT(WdfUsbTargetPipeWriteSynchronously)(
159  __in
161  __in
162  WDFUSBPIPE Pipe,
163  __in_opt
164  WDFREQUEST Request,
165  __in_opt
167  __in_opt
169  __out_opt
171  )
172 {
173  DDI_ENTRY();
174 
177  "WDFUSBPIPE %p", Pipe);
178 
180  Pipe,
181  Request,
184  BytesWritten,
185  0);
186 }
187 
190 NTSTATUS
191 WDFAPI
192 WDFEXPORT(WdfUsbTargetPipeFormatRequestForWrite)(
193  __in
195  __in
196  WDFUSBPIPE Pipe,
197  __in
198  WDFREQUEST Request,
199  __in_opt
200  WDFMEMORY WriteMemory,
201  __in_opt
203  )
204 {
205  DDI_ENTRY();
206 
208  "WDFUSBPIPE %p, WDFREQUEST %p, WDFMEMORY %p",
210 
212  Pipe,
213  Request,
214  WriteMemory,
215  WriteOffsets,
216  0);
217 }
218 
221 NTSTATUS
222 WDFAPI
223 WDFEXPORT(WdfUsbTargetPipeReadSynchronously)(
224  __in
226  __in
227  WDFUSBPIPE Pipe,
228  __in_opt
229  WDFREQUEST Request,
230  __in_opt
232  __in_opt
234  __out_opt
236  )
237 {
238  DDI_ENTRY();
239 
241  "WDFUSBPIPE %p", Pipe);
242 
245  Pipe,
246  Request,
249  BytesRead,
251  );
252 }
253 
256 NTSTATUS
257 WDFAPI
258 WDFEXPORT(WdfUsbTargetPipeFormatRequestForRead)(
259  __in
261  __in
262  WDFUSBPIPE Pipe,
263  __in
264  WDFREQUEST Request,
265  __in_opt
266  WDFMEMORY ReadMemory,
267  __in_opt
269  )
270 {
271  DDI_ENTRY();
272 
275  "WDFUSBPIPE %p, WDFREQUEST %p, WDFMEMORY %p",
277 
280  Pipe,
281  Request,
282  ReadMemory,
283  ReadOffsets,
285  );
286 }
287 
290 NTSTATUS
291 WDFAPI
292 WDFEXPORT(WdfUsbTargetPipeConfigContinuousReader)(
293  __in
295  __in
296  WDFUSBPIPE Pipe,
297  __in
299  )
300 {
301  DDI_ENTRY();
302 
306  size_t total;
307 
309  Pipe,
311  (PVOID*) &pUsbPipe,
313 
315 
316  if (Config->Size != sizeof(WDF_USB_CONTINUOUS_READER_CONFIG)) {
318 
320  "Config %p incorrect size %d, expected %d %!STATUS!",
322  status);
323 
324  return status;
325  }
326 
327  if (Config->EvtUsbTargetPipeReadComplete == NULL) {
331  "NULL EvtUsbTargetPipeReadComplete not allowed %!STATUS!", status);
332  return status;
333  }
334 
335  if (Config->TransferLength == 0) {
338  "TransferLength of 0 not allowed %!STATUS!", status);
339  return status;
340  }
341 
342  status = RtlSizeTAdd(Config->HeaderLength,
343  Config->TransferLength,
344  &total);
345 
349  "HeaderLength + TransferLength overflow %!STATUS!", status);
350  return status;
351  }
352 
353  status = RtlSizeTAdd(total,
354  Config->TrailerLength,
355  &total);
356 
357  if (!NT_SUCCESS(status)) {
360  "HeaderLength + TransferLength + TrailerLength overflow %!STATUS!",
361  status);
362  return status;
363  }
364 
365  //
366  // Internally WDF will assign a parent to the memory, so do not allow the driver
367  // to do so.
368  //
370  Config->BufferAttributes,
372  if (!NT_SUCCESS(status)) {
373  return status;
374  }
375 
376  //
377  // Only bulk or interrrupt is allowed for a continous reader
378  //
382 
385  "WDFUSBPIPE %p type %!WDF_USB_PIPE_TYPE!, only bulk or interrupt "
386  "pipes can be configured for continous readers, %!STATUS!",
387  Pipe, pUsbPipe->GetType(), status);
388 
389  return status;
390  }
391 
394 
397  "WDFUSBPIPE %p, wrong direction for continuous reader, %!STATUS!",
398  Pipe, status);
399 
400  return status;
401  }
402 
403  status = pUsbPipe->ValidateTransferLength(Config->TransferLength);
404  if (!NT_SUCCESS(status)) {
407  "TransferLength %I64d not a valid transer length (not integral of max "
408  "packet size %d) %!STATUS!", Config->TransferLength,
410  return status;
411  }
412 
414 
415  return status;
416 }
417 
420 NTSTATUS
421 WDFAPI
422 WDFEXPORT(WdfUsbTargetPipeAbortSynchronously)(
423  __in
425  __in
426  WDFUSBPIPE Pipe,
427  __in_opt
428  WDFREQUEST Request,
429  __in_opt
431  )
432 {
433  DDI_ENTRY();
434 
438 
440  Pipe,
442  (PVOID*) &pUsbPipe,
444 
446 
447  FxSyncRequest request(pFxDriverGlobals, &context, Request);
448 
449  //
450  // FxSyncRequest always succeesds for KM but can fail for UM.
451  //
452  status = request.Initialize();
453  if (!NT_SUCCESS(status)) {
455  "Failed to initialize FxSyncRequest");
456  return status;
457  }
458 
460  "Pipe %p", Pipe);
461 
463  if (!NT_SUCCESS(status)) {
464  return status;
465  }
466 
468  if (!NT_SUCCESS(status)) {
470  "Invalid request options");
471  return status;
472  }
473 
474  status = pUsbPipe->FormatAbortRequest(request.m_TrueRequest);
478  "WDFUSBPIPE %p, WDFREQUEST %p being submitted",
479  Pipe, request.m_TrueRequest->GetTraceObjectHandle());
480 
481  status = pUsbPipe->SubmitSync(request.m_TrueRequest, RequestOptions);
482  }
483 
485  "WDFUSBPIPE %p, %!STATUS!", Pipe, status);
486 
487  return status;
488 }
489 
492 NTSTATUS
493 WDFAPI
494 WDFEXPORT(WdfUsbTargetPipeFormatRequestForAbort)(
495  __in
497  __in
498  WDFUSBPIPE Pipe,
499  __in
500  WDFREQUEST Request
501  )
502 {
503  DDI_ENTRY();
504 
509 
511  Pipe,
513  (PVOID*) &pUsbPipe,
515 
517  "Pipe %p, Request %p", Pipe, Request);
518 
520  Request,
522  (PVOID*) &pRequest);
523 
525 
527  "Pipe %p, Request %p, status %!STATUS!",
528  Pipe, Request, status);
529 
530  return status;
531 }
532 
535 NTSTATUS
536 WDFAPI
537 WDFEXPORT(WdfUsbTargetPipeResetSynchronously)(
538  __in
540  __in
541  WDFUSBPIPE Pipe,
542  __in_opt
543  WDFREQUEST Request,
544  __in_opt
546  )
547 {
548  DDI_ENTRY();
549 
553 
555  Pipe,
557  (PVOID*) &pUsbPipe,
559 
561 
562  FxSyncRequest request(pFxDriverGlobals, &context, Request);
563 
564  //
565  // FxSyncRequest always succeesds for KM but can fail for UM.
566  //
567  status = request.Initialize();
568  if (!NT_SUCCESS(status)) {
570  "Failed to initialize FxSyncRequest");
571  return status;
572  }
573 
575  "WDFUSBPIPE %p reset", Pipe);
576 
578  if (!NT_SUCCESS(status)) {
579  return status;
580  }
581 
583  if (!NT_SUCCESS(status)) {
585  "Invalid request options");
586  return status;
587  }
588 
589  status = pUsbPipe->FormatResetRequest(request.m_TrueRequest);
590 
591  if (NT_SUCCESS(status)) {
594  "WDFUSBPIPE %p, WDFREQUEST %p being submitted",
595  Pipe, request.m_TrueRequest->GetTraceObjectHandle());
596 
598 
599  //
600  // Even if the previous state of the target was stopped let this IO go through by
601  // ignoring target state.
602  //
604  }
605 
607  "WDFUSBPIPE %p reset, %!STATUS!", Pipe, status);
608 
609  return status;
610 }
611 
614 NTSTATUS
615 WDFAPI
616 WDFEXPORT(WdfUsbTargetPipeFormatRequestForReset)(
617  __in
619  __in
620  WDFUSBPIPE Pipe,
621  __in
622  WDFREQUEST Request
623  )
624 {
625  DDI_ENTRY();
626 
631 
633  Pipe,
635  (PVOID*) &pUsbPipe,
637 
639  "Pipe %p, Request %p", Pipe, Request);
640 
642  Request,
644  (PVOID*) &pRequest);
645 
647 
649  "Pipe %p, Request %p = 0x%x",
650  Pipe, Request, status);
651 
652  return status;
653 }
654 
657 NTSTATUS
658 WDFAPI
659 WDFEXPORT(WdfUsbTargetPipeSendUrbSynchronously)(
660  __in
662  __in
663  WDFUSBPIPE Pipe,
664  __in_opt
665  WDFREQUEST Request,
666  __in_opt
668  __in_xcount("union bug in SAL")
669  PURB Urb
670  )
671 {
672  DDI_ENTRY();
673 
678 
680  Pipe,
682  (PVOID*) &pUsbPipe,
684 
686  FxSyncRequest request(pFxDriverGlobals, &context, Request);
687 
688  //
689  // FxSyncRequest always succeesds for KM but can fail for UM.
690  //
691  status = request.Initialize();
692  if (!NT_SUCCESS(status)) {
694  "Failed to initialize FxSyncRequest");
695  return status;
696  }
697 
699  "WDFUSBPIPE %p, Urb %p", Pipe, Urb);
700 
702 
704  if (!NT_SUCCESS(status)) {
705  return status;
706  }
707 
709  if (!NT_SUCCESS(status)) {
710  return status;
711  }
712 
713  buf.SetBuffer(Urb, 0);
714 
716  pUsbPipe,
717  request.m_TrueRequest,
718  &buf,
719  pUsbPipe->GetUrbType(),
721 
722  if (NT_SUCCESS(status)) {
725  "WDFUSBPIPE %p, WDFREQUEST %p being submitted",
726  Pipe, request.m_TrueRequest->GetTraceObjectHandle());
727 
728  status = pUsbPipe->SubmitSync(request.m_TrueRequest, RequestOptions);
729  }
730 
732  "WDFUSBPIPE %p, Urb %p, %!STATUS!",
733  Pipe, Urb, status);
734 
735  return status;
736 }
737 
740 NTSTATUS
741 WDFAPI
742 WDFEXPORT(WdfUsbTargetPipeFormatRequestForUrb)(
743  __in
745  __in
746  WDFUSBPIPE Pipe,
747  __in
748  WDFREQUEST Request,
749  __in
750  WDFMEMORY UrbMemory,
751  __in_opt
753  )
754 {
755  DDI_ENTRY();
756 
763  size_t bufferSize;
764 
766  Pipe,
768  (PVOID*) &pUsbPipe,
770 
772  "Pipe %p, Request %p, Memory %p",
774 
776  UrbMemory,
778  (PVOID*) &pMemory);
779 
781  Request,
783  (PVOID*) &pRequest);
784 
786  if (!NT_SUCCESS(status)) {
787  return status;
788  }
789 
793  }
794 
795  if (bufferSize < sizeof(_URB_HEADER)) {
798  "UrbMemory %p buffer size, %I64d, smaller then "
799  "_URB_HEADER, %!STATUS!", UrbMemory,
801  return status;
802  }
803 
804  buf.SetMemory(pMemory, UrbOffsets);
805 
807  pUsbPipe,
808  pRequest,
809  &buf,
810  pUsbPipe->GetUrbType(),
812 
813  if (NT_SUCCESS(status)) {
814  FxUsbUrbContext* pContext;
815  pContext = (FxUsbUrbContext*) pRequest->GetContext();
816 
818  pContext->m_UsbParameters.Parameters.PipeUrb.Buffer = UrbMemory;
819  }
820 
822  "Pipe %p, Request %p, Memory %p, status %!STATUS!",
824 
825  return status;
826 }
827 
830 WDFAPI
831 WDFEXPORT(WdfUsbTargetPipeWdmGetPipeHandle)(
832  __in
834  __in
835  WDFUSBPIPE UsbPipe
836  )
837 /*++
838 
839 Routine Description:
840  Returns the underlying WDM USBD pipe handle
841 
842 Arguments:
843  UsbPipe - the WDF pipe whose WDM handle will be returned
844 
845 Return Value:
846  valid handle value or NULL on error
847 
848  --*/
849 {
850  DDI_ENTRY();
851 
853 
855  UsbPipe,
857  (PVOID*) &pUsbPipe);
858 
859  return pUsbPipe->WdmGetPipeHandle();
860 }
861 
862 } // extern "C"
FxPointerNotNull(pFxDriverGlobals, PipeInformation)
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesWritten
Definition: wdfiotarget.h:949
#define DDI_ENTRY()
Definition: fxglobalskm.h:56
FxObjectHandleGetPtrAndGlobals(GetFxDriverGlobals(DriverGlobals), Pipe, FX_TYPE_IO_TARGET_USB_PIPE,(PVOID *) &pUsbPipe, &pFxDriverGlobals)
_Must_inspect_result_ NTSTATUS ValidateMemoryOffsets(__in_opt PWDFMEMORY_OFFSET Offsets)
Definition: ifxmemory.hpp:105
_Must_inspect_result_ NTSTATUS FormatAbortRequest(__in FxRequestBase *Request)
Definition: fxusbpipe.cpp:1710
#define _Must_inspect_result_
Definition: no_sal2.h:62
_Must_inspect_result_ __in WDFUSBPIPE __in WDFREQUEST __in_opt WDFMEMORY ReadMemory
_Must_inspect_result_ __in WDFUSBPIPE __in_opt WDFREQUEST Request
_Must_inspect_result_ __in WDFUSBPIPE __in WDFREQUEST __in_opt WDFMEMORY __in_opt PWDFMEMORY_OFFSET ReadOffsets
static _Must_inspect_result_ NTSTATUS _FormatTransfer(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in WDFUSBPIPE Pipe, __in WDFREQUEST Request, __in_opt WDFMEMORY TransferMemory, __in_opt PWDFMEMORY_OFFSET TransferOffsets, __in ULONG Flags)
Definition: fxusbpipe.cpp:1536
#define STATUS_INFO_LENGTH_MISMATCH
Definition: udferr_usr.h:133
_Must_inspect_result_ __in WDFUSBPIPE __in_opt WDFREQUEST __in_opt PWDF_REQUEST_SEND_OPTIONS __in_xcount("union bug in SAL") PURB Urb)
static _Must_inspect_result_ NTSTATUS _SendTransfer(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in WDFUSBPIPE Pipe, __in_opt WDFREQUEST Request, __in_opt PWDF_REQUEST_SEND_OPTIONS RequestOptions, __in_opt PWDF_MEMORY_DESCRIPTOR MemoryDescriptor, __out_opt PULONG BytesTransferred, __in ULONG Flags)
Definition: fxusbpipe.cpp:1625
Definition: http.c:7251
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGIOTARGET, "WDFUSBPIPE %p", Pipe)
FxObjectHandleGetPtr(GetFxDriverGlobals(DriverGlobals), Pipe, FX_TYPE_IO_TARGET_USB_PIPE,(PVOID *) &pUsbPipe)
#define __in_opt
Definition: dbghelp.h:38
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
LONG NTSTATUS
Definition: precomp.h:26
__inline VOID SetNoCheckPacketSize(VOID)
Definition: fxusbpipe.hpp:480
#define USBD_TRANSFER_DIRECTION_IN
Definition: usb.h:160
NTSTATUS status
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
__inline BOOLEAN IsOutEndpoint(VOID)
Definition: fxusbpipe.hpp:531
_Must_inspect_result_ NTSTATUS SubmitSync(__in FxRequestBase *Request, __in_opt PWDF_REQUEST_SEND_OPTIONS Options=NULL, __out_opt PULONG Action=NULL)
_Must_inspect_result_ __in WDFUSBPIPE __in WDFREQUEST __in_opt WDFMEMORY __in_opt PWDFMEMORY_OFFSET WriteOffsets
_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:1331
DriverGlobals
__in WDFUSBPIPE __out PWDF_USB_PIPE_INFORMATION PipeInformation
_Must_inspect_result_ __in WDFUSBPIPE __in_opt WDFREQUEST __in_opt PWDF_REQUEST_SEND_OPTIONS __in_opt PWDF_MEMORY_DESCRIPTOR __out_opt PULONG BytesRead
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesRead
Definition: wdfiotarget.h:859
NTSTATUS __inline FxValidateRequestOptions(_In_ PFX_DRIVER_GLOBALS FxDriverGlobals, _In_ PWDF_REQUEST_SEND_OPTIONS Options, _In_opt_ FxRequestBase *Request=NULL)
FX_URB_TYPE GetUrbType(VOID)
Definition: fxusbpipe.hpp:676
_Must_inspect_result_ __in WDFUSBPIPE __in WDFREQUEST __in_opt WDFMEMORY WriteMemory
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
_Must_inspect_result_ NTSTATUS SubmitSyncRequestIgnoreTargetState(__in FxRequestBase *Request, __in_opt PWDF_REQUEST_SEND_OPTIONS RequestOptions)
_In_ WDFUSBPIPE _Out_ PWDF_USB_PIPE_INFORMATION PipeInformation
Definition: wdfusb.h:1741
#define __out_opt
Definition: dbghelp.h:65
BOOLEAN IsType(__in WDF_USB_PIPE_TYPE Type)
__inline BOOLEAN IsInEndpoint(VOID)
Definition: fxusbpipe.hpp:513
#define FALSE
Definition: types.h:117
#define TRACE_LEVEL_VERBOSE
Definition: storswtr.h:30
#define WDFEXPORT(a)
Definition: fxmacros.hpp:157
size_t BufferOffset
Definition: wdfmemory.h:65
#define WDFAPI
Definition: wdftypes.h:53
VOID SetUsbType(__in WDF_USB_REQUEST_TYPE Type)
#define __out
Definition: dbghelp.h:62
unsigned char BOOLEAN
VOID CancelSentIo(VOID)
_Must_inspect_result_ __in WDFUSBPIPE __in_opt WDFREQUEST __in_opt PWDF_REQUEST_SEND_OPTIONS RequestOptions
size_t bufferSize
_Must_inspect_result_ __in WDFUSBPIPE __in PWDF_USB_CONTINUOUS_READER_CONFIG Config
VOID GetInformation(__out PWDF_USB_PIPE_INFORMATION PipeInformation)
_Must_inspect_result_ __in WDFUSBPIPE __in_opt WDFREQUEST __in_opt PWDF_REQUEST_SEND_OPTIONS __in_opt PWDF_MEMORY_DESCRIPTOR MemoryDescriptor
__drv_maxIRQL(DISPATCH_LEVEL) VOID WDFAPI WDFEXPORT(WdfUsbTargetPipeGetInformation)(__in PWDF_DRIVER_GLOBALS DriverGlobals
__inline NTSTATUS FxVerifierCheckIrqlLevel(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in KIRQL Irql)
Definition: fxverifier.h:158
_Must_inspect_result_ NTSTATUS ValidateTransferLength(__in size_t Length)
Definition: fxusbpipe.hpp:568
FxRequestBuffer buf
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
__in WDFUSBPIPE UsbPipe
_Must_inspect_result_ __in WDFUSBPIPE __in_opt WDFREQUEST __in_opt PWDF_REQUEST_SEND_OPTIONS __in_opt PWDF_MEMORY_DESCRIPTOR __out_opt PULONG BytesWritten
PFX_DRIVER_GLOBALS pFxDriverGlobals
_Must_inspect_result_ NTSTATUS InitContinuousReader(__in PWDF_USB_CONTINUOUS_READER_CONFIG Config, __in size_t TotalBufferLength)
Definition: fxusbpipe.cpp:1463
FxRequest * pRequest
_Must_inspect_result_ _In_ WDFUSBPIPE _In_ WDFREQUEST _In_opt_ WDFMEMORY ReadMemory
Definition: wdfusb.h:1996
WDF_USB_PIPE_TYPE GetType(VOID)
_Must_inspect_result_ NTSTATUS FxValidateObjectAttributes(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PWDF_OBJECT_ATTRIBUTES Attributes, __in ULONG Flags=FX_VALIDATE_OPTION_NONE_SPECIFIED)
_In_ WDFUSBPIPE Pipe
Definition: wdfusb.h:1741
WDF_USB_REQUEST_COMPLETION_PARAMS m_UsbParameters
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
Definition: wdfchildlist.h:474
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
ULONG GetMaxPacketSize(VOID)
Definition: fxusbpipe.hpp:555
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
FxUsbPipe * pUsbPipe
FxSyncRequest request(pFxDriverGlobals, &context, Request)
#define USBD_SHORT_TRANSFER_OK
Definition: usb.h:154
NTSTATUS FxFormatUrbRequest(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxIoTarget *Target, __in FxRequestBase *Request, __in FxRequestBuffer *Buffer, __in FX_URB_TYPE FxUrbType, __drv_when(FxUrbType==FxUrbTypeUsbdAllocated, __in) __drv_when(FxUrbType !=FxUrbTypeUsbdAllocated, __in_opt) USBD_HANDLE UsbdHandle)
Definition: usbutil.cpp:62
IFxMemory * pMemory
Definition: usb.h:529
__inline FxRequestContext * GetContext(VOID)
_In_ WDFUSBPIPE UsbPipe
Definition: wdfusb.h:2572
unsigned int * PULONG
Definition: retypes.h:1
#define NULL
Definition: types.h:112
size_t total
Definition: tftpd.h:85
USBD_PIPE_HANDLE WdmGetPipeHandle(VOID)
Definition: fxusbpipe.hpp:634
FxUsbPipeRequestContext context(FxUrbTypeLegacy)
_Must_inspect_result_ _In_ WDFUSBPIPE _In_ WDFREQUEST _In_opt_ WDFMEMORY WriteMemory
Definition: wdfusb.h:1914
enum _WDF_USB_PIPE_TYPE WDF_USB_PIPE_TYPE
_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:859
_Must_inspect_result_ __in WDFUSBPIPE __in WDFREQUEST __in WDFMEMORY __in_opt PWDFMEMORY_OFFSET UrbOffsets
struct _WDF_USB_REQUEST_COMPLETION_PARAMS::@3691::@3697 PipeUrb
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_ WDFREQUEST _In_ WDFMEMORY UrbMemory
Definition: wdfusb.h:1572
__in WDFUSBPIPE Pipe
_Must_inspect_result_ NTSTATUS FormatResetRequest(__in FxRequestBase *Request)
Definition: fxusbpipe.cpp:1783
__inline PFX_DRIVER_GLOBALS GetFxDriverGlobals(__in PWDF_DRIVER_GLOBALS DriverGlobals)
Definition: fxglobals.h:597
union _WDF_USB_REQUEST_COMPLETION_PARAMS::@3691 Parameters
_Must_inspect_result_ __in WDFUSBPIPE __in WDFREQUEST __in WDFMEMORY UrbMemory
#define __in
Definition: dbghelp.h:35
USBD_HANDLE GetUSBDHandle(VOID)
Definition: fxusbpipe.hpp:668
#define TRACINGIOTARGET
Definition: dbgtrace.h:72
virtual size_t GetBufferSize(VOID)=0
Definition: ps.c:97