ReactOS 0.4.15-dev-5672-gf73ac17
fxiotargetum.hpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft. All rights reserved.
4
5Module Name:
6
7 FxIoTargetUm.hpp
8
9Abstract:
10
11Author:
12
13
14
15Environment:
16
17
18Revision History:
19
20--*/
21
22#ifndef _FXIOTARGETUM_H_
23#define _FXIOTARGETUM_H_
24
25__inline
27 VOID
28 ) :
30 m_OtherMemory(NULL),
31 m_RestoreState(FALSE)
32{
33 ZeroMemory(&m_OriginalBufferInfo, sizeof(m_OriginalBufferInfo));
34}
35
36__inline
38 VOID
39 )
40{
41}
42
43__inline
44VOID
47 )
48{
49 FxIrp* irp = NULL;
50
51 irp = Request->GetSubmitFxIrp();
52
53 if (m_RestoreState) {
54 irp->GetIoIrp()->RestoreCurrentBuffer(&m_OriginalBufferInfo);
56 }
57
58 //
59 // Release the 2ndary buffer if we have an outstanding reference
60 //
61 if (m_OtherMemory != NULL) {
62 m_OtherMemory->RELEASE(this);
64 }
65
66 //
67 // Release the other buffer and all __super related fields
68 //
70}
71
72__inline
73VOID
76 )
77{
78 switch (m_MajorFunction) {
79 case IRP_MJ_WRITE:
82 break;
83
84 case IRP_MJ_READ:
87 break;
88
90 case UMINT::WdfRequestInternalIoctl:
91 m_CompletionParams.Parameters.Ioctl.Output.Length =
93 break;
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108 default:
109 FX_VERIFY(INTERNAL, CHECK("Non Io Irp passed to CopyParameters", FALSE));
110 }
111}
112
113__inline
114VOID
117 _In_ ULONG NewInputBufferCb,
118 _In_reads_bytes_opt_(NewInputBufferCb) PVOID NewInputBuffer,
119 _In_ ULONG NewOutputBufferCb,
120 _In_reads_bytes_opt_(NewOutputBufferCb) PVOID NewOutputBuffer
121 )
122{
123 FxIrp* irp = NULL;
124
125 irp = Request->GetSubmitFxIrp();
126
128 irp->GetIoIrp()->SwapCurrentBuffer(
129 true,
130 NewInputBufferCb,
131 NewInputBuffer,
132 NewOutputBufferCb,
133 NewOutputBuffer,
134 &m_OriginalBufferInfo
135 );
136}
137
138__inline
141 VOID
142 )
143{
144
145
146
147
148
149
150 return TRUE;
151}
152
153__inline
154VOID
157 )
158{
159 Forward(Irp);
160}
161
162#endif // _FXIOTARGETUM_H_
unsigned char BOOLEAN
BOOLEAN HasValidStackSize(VOID)
virtual VOID Send(_In_ MdIrp Irp)
virtual VOID Forward(__in MdIrp Irp)
Definition: fxiotarget.hpp:699
Definition: fxirp.hpp:28
IWudfIoIrp * GetIoIrp(VOID)
Definition: fxirpum.cpp:1777
_In_ PIRP Irp
Definition: csq.h:116
#define __in
Definition: dbghelp.h:35
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
FxIrp * irp
#define _In_
Definition: ms_sal.h:308
#define _In_reads_bytes_opt_(size)
Definition: ms_sal.h:322
IWudfIrp * MdIrp
Definition: mxum.h:103
#define CHECK(type, val, base, expected)
#define IRP_MJ_READ
Definition: rdpdr.c:46
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
virtual ~FxIoContext(VOID)
FxIoContext(VOID)
VOID SwapIrpBuffer(_In_ FxRequestBase *Request, _In_ ULONG NewInputBufferCb, _In_reads_bytes_opt_(NewInputBufferCb) PVOID NewInputBuffer, _In_ ULONG NewOutputBufferCb, _In_reads_bytes_opt_(NewOutputBufferCb) PVOID NewOutputBuffer)
UCHAR m_MajorFunction
Definition: fxiotarget.hpp:114
BOOLEAN m_RestoreState
Definition: fxiotarget.hpp:113
IFxMemory * m_OtherMemory
Definition: fxiotarget.hpp:115
virtual VOID ReleaseAndRestore(__in FxRequestBase *Request)
VOID CopyParameters(__in FxRequestBase *Request)
virtual VOID ReleaseAndRestore(__in FxRequestBase *Request)
WDF_REQUEST_COMPLETION_PARAMS m_CompletionParams
struct _WDF_REQUEST_COMPLETION_PARAMS::@3681::@3683 Read
struct _WDF_REQUEST_COMPLETION_PARAMS::@3681::@3682 Write
union _WDF_REQUEST_COMPLETION_PARAMS::@3681 Parameters
struct _WDF_REQUEST_COMPLETION_PARAMS::@3681::@3684 Ioctl
uint32_t ULONG
Definition: typedefs.h:59
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
#define ZeroMemory
Definition: winbase.h:1670