ReactOS 0.4.15-dev-8135-g1bc6c90
FxUsbPipeRequestContext Struct Reference

#include <fxusbpipe.hpp>

Inheritance diagram for FxUsbPipeRequestContext:
Collaboration diagram for FxUsbPipeRequestContext:

Public Member Functions

 FxUsbPipeRequestContext (__in FX_URB_TYPE FxUrbType)
 
 ~FxUsbPipeRequestContext (VOID)
 
__checkReturn NTSTATUS AllocateUrb (__in USBD_HANDLE USBDHandle)
 
virtual VOID Dispose (VOID)
 
VOID SetInfo (__in WDF_USB_REQUEST_TYPE Type, __in USBD_PIPE_HANDLE PipeHandle, __in USHORT Function)
 
VOID SetInfo (__in WDF_USB_REQUEST_TYPE Type, __in WINUSB_INTERFACE_HANDLE WinUsbHandle, __in UCHAR PipeId, __in USHORT Function)
 
USBD_STATUS GetUsbdStatus (VOID)
 
- Public Member Functions inherited from FxUsbRequestContext
 FxUsbRequestContext (__in FX_REQUEST_CONTEXT_TYPE Type)
 
virtual USBD_STATUS GetUsbdStatus (VOID)=0
 
virtual VOID CopyParameters (__in FxRequestBase *Request)
 
VOID SetUsbType (__in WDF_USB_REQUEST_TYPE Type)
 
VOID __inline InitUsbParameters (VOID)
 
- Public Member Functions inherited from FxRequestContext
 FxRequestContext (__in FX_REQUEST_CONTEXT_TYPE Type)
 
virtual ~FxRequestContext (VOID)
 
virtual VOID Dispose (VOID)
 
virtual VOID StoreAndReferenceMemory (__in FxRequestBuffer *Buffer)
 
virtual VOID ReleaseAndRestore (__in FxRequestBase *Request)
 
__inline BOOLEAN IsType (__in FX_REQUEST_CONTEXT_TYPE Type)
 
virtual VOID CopyParameters (__in FxRequestBase *Request)
 
VOID FormatWriteParams (__in_opt IFxMemory *WriteMemory, __in_opt PWDFMEMORY_OFFSET WriteOffsets)
 
VOID FormatReadParams (__in_opt IFxMemory *ReadMemory, __in_opt PWDFMEMORY_OFFSET ReadOffsets)
 
VOID FormatOtherParams (__in FxInternalIoctlParams *InternalIoctlParams)
 
- Public Member Functions inherited from FxStump
PVOID operator new (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
 
PVOID operator new (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in POOL_TYPE PoolType)
 
VOID operator delete (__in PVOID pointer)
 
PVOID operator new[] (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
 
VOID operator delete[] (__in PVOID pointer)
 

Public Attributes

_URB_PIPE_REQUEST m_UrbLegacy
 
_URB_PIPE_REQUESTm_Urb
 
- Public Attributes inherited from FxUsbRequestContext
WDF_USB_REQUEST_COMPLETION_PARAMS m_UsbParameters
 
UMURB m_UmUrb
 
- Public Attributes inherited from FxRequestContext
WDF_REQUEST_COMPLETION_PARAMS m_CompletionParams
 
IFxMemorym_RequestMemory
 
FX_REQUEST_CONTEXT_TYPE m_RequestType
 

Private Attributes

USBD_HANDLE m_USBDHandle
 

Additional Inherited Members

- Protected Member Functions inherited from FxRequestContext
VOID __inline InitCompletionParams (VOID)
 
- Protected Member Functions inherited from FxStump
 FxStump (VOID)
 
- Static Protected Member Functions inherited from FxRequestContext
static VOID _StoreAndReferenceMemoryWorker (__in PVOID Tag, __deref_out_opt IFxMemory **PPMemory, __in FxRequestBuffer *Buffer)
 

Detailed Description

Definition at line 123 of file fxusbpipe.hpp.

Constructor & Destructor Documentation

◆ FxUsbPipeRequestContext()

FxUsbPipeRequestContext::FxUsbPipeRequestContext ( __in FX_URB_TYPE  FxUrbType)

Definition at line 964 of file fxusbpipe.cpp.

966 :
968{
970
971 if (FxUrbType == FxUrbTypeLegacy) {
973 }
974 else {
975 m_Urb = NULL;
976 }
977}
#define NULL
Definition: types.h:112
@ FX_RCT_USB_PIPE_REQUEST
@ FxUrbTypeLegacy
Definition: fxusbdevice.hpp:27
USBD_HANDLE m_USBDHandle
Definition: fxusbpipe.hpp:167
_URB_PIPE_REQUEST m_UrbLegacy
Definition: fxusbpipe.hpp:170
_URB_PIPE_REQUEST * m_Urb
Definition: fxusbpipe.hpp:175

◆ ~FxUsbPipeRequestContext()

FxUsbPipeRequestContext::~FxUsbPipeRequestContext ( VOID  )

Definition at line 979 of file fxusbpipe.cpp.

982{
983 if (m_Urb && (m_Urb != &m_UrbLegacy)) {
985 }
986 m_Urb = NULL;
988}
Definition: usb.h:529
VOID USBD_UrbFree(_In_ USBD_HANDLE USBDHandle, _In_ PURB Urb)
Definition: usbstubum.cpp:33

Member Function Documentation

◆ AllocateUrb()

__checkReturn NTSTATUS FxUsbPipeRequestContext::AllocateUrb ( __in USBD_HANDLE  USBDHandle)

Definition at line 992 of file fxusbpipe.cpp.

995{
997
998 if (m_Urb) {
1000 goto Done;
1001 }
1002
1003 status = USBD_UrbAllocate(USBDHandle, (PURB*)&m_Urb);
1004
1005 if (!NT_SUCCESS(status)) {
1006 goto Done;
1007 }
1008
1009 m_USBDHandle = USBDHandle;
1010
1011Done:
1012 return status;
1013}
LONG NTSTATUS
Definition: precomp.h:26
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
Definition: ps.c:97
#define STATUS_INVALID_DEVICE_STATE
Definition: udferr_usr.h:178
NTSTATUS USBD_UrbAllocate(_In_ USBD_HANDLE USBDHandle, _Outptr_result_bytebuffer_(sizeof(URB)) PURB *Urb)
Definition: usbstubum.cpp:46

Referenced by FxUsbPipe::FormatAbortRequest(), and FxUsbPipe::FormatResetRequest().

◆ Dispose()

VOID FxUsbPipeRequestContext::Dispose ( VOID  )
virtual

Reimplemented from FxRequestContext.

Definition at line 1016 of file fxusbpipe.cpp.

1019{
1020 if (m_Urb && (m_Urb != &m_UrbLegacy)){
1022 m_Urb = NULL;
1024 }
1025}

◆ GetUsbdStatus()

USBD_STATUS FxUsbPipeRequestContext::GetUsbdStatus ( VOID  )
virtual

Implements FxUsbRequestContext.

Definition at line 1043 of file fxusbpipe.cpp.

1046{
1047 return m_Urb->Hdr.Status;
1048}
struct _URB_HEADER Hdr
Definition: usb.h:315

◆ SetInfo() [1/2]

VOID FxUsbPipeRequestContext::SetInfo ( __in WDF_USB_REQUEST_TYPE  Type,
__in USBD_PIPE_HANDLE  PipeHandle,
__in USHORT  Function 
)

Definition at line 1028 of file fxusbpipe.cpp.

1033{
1034 RtlZeroMemory(m_Urb, sizeof(*m_Urb));
1035 m_Urb->Hdr.Length = sizeof(*m_Urb);
1036 m_Urb->Hdr.Function = Function;
1038
1040}
Type
Definition: Type.h:7
_In_ CDROM_SCAN_FOR_SPECIAL_INFO _In_ PCDROM_SCAN_FOR_SPECIAL_HANDLER Function
Definition: cdrom.h:1156
static HANDLE PipeHandle
Definition: dhcpcsvc.c:22
VOID SetUsbType(__in WDF_USB_REQUEST_TYPE Type)
USBD_PIPE_HANDLE PipeHandle
Definition: usb.h:316
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262

Referenced by FxUsbPipe::FormatAbortRequest(), and FxUsbPipe::FormatResetRequest().

◆ SetInfo() [2/2]

VOID FxUsbPipeRequestContext::SetInfo ( __in WDF_USB_REQUEST_TYPE  Type,
__in WINUSB_INTERFACE_HANDLE  WinUsbHandle,
__in UCHAR  PipeId,
__in USHORT  Function 
)

Definition at line 13 of file fxusbpipeum.cpp.

19{
20 RtlZeroMemory(&m_UmUrb, sizeof(m_UmUrb));
21
22 m_UmUrb.UmUrbPipeRequest.Hdr.InterfaceHandle = WinUsbHandle;
23 m_UmUrb.UmUrbPipeRequest.Hdr.Function = Function;
25
26 m_UmUrb.UmUrbPipeRequest.PipeID = PipeId;
27
29}
struct _UMURB_PIPE_REQUEST UmUrbPipeRequest
Definition: umusb.h:186

Member Data Documentation

◆ m_Urb

◆ m_UrbLegacy

◆ m_USBDHandle

USBD_HANDLE FxUsbPipeRequestContext::m_USBDHandle
private

The documentation for this struct was generated from the following files: