ReactOS 0.4.15-dev-8145-ga541a46
fxrequestbuffer.hpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft. All rights reserved.
4
5Module Name:
6
7 FxRequestBuffer.hpp
8
9Abstract:
10
11Author:
12
13
14
15Environment:
16
17 Both kernel and user mode
18
19Revision History:
20
21--*/
22
23#ifndef _FXREQUESTBUFFER_H_
24#define _FXREQUESTBUFFER_H_
25
28 FxRequestBufferMemory, // framework managed memory
31 FxRequestBufferReferencedMdl, // MDL belonging to a FxMemoryObject
32};
33
37};
38
40public:
42
45 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
47 __in ULONG Flags = 0x0
48 );
49
50 VOID
54 );
55
56 VOID
57 SetMdl(
60 );
61
62 __inline
63 VOID
67 )
68 {
70 u.Buffer.Buffer = Buffer;
71 u.Buffer.Length = Length;
72 }
73
74 __inline
77 VOID
78 )
79 {
80 return (DataType == FxRequestBufferMdl ||
82 }
83
84 ULONG
86 VOID
87 );
88
93 );
94
98 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
100 __inout PMDL* MdlToFree,
101 __inout PBOOLEAN UnlockWhenFreed,
103 __in BOOLEAN ReuseMdl = FALSE,
104 __inout_opt size_t* SizeOfMdl = NULL
105 );
106
109 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
111 __in BOOLEAN * ReuseMdl,
114 __inout size_t* SizeOfMdl,
115 __in BOOLEAN UnlockWhenFreed,
116 __deref_out_opt PMDL* MdlToFree
117 );
118
119 VOID
121 __deref_out_opt PVOID* PPBuffer,
122 __deref_out_opt PMDL* PPMdl,
124 );
125
126public:
128
129 union {
130 struct {
134 struct {
138 struct {
142 struct {
145 PMDL Mdl;
147 } u;
148};
149
150#if ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
151#include "fxrequestbufferkm.hpp"
152#elif ((FX_CORE_MODE)==(FX_CORE_USER_MODE))
153#include "fxrequestbufferum.hpp"
154#endif
155
156
157#endif // _FXREQUESTBUFFER_H_
static ULONG SizeOfMdl(VOID)
Definition: NtReadFile.c:36
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
Definition: bufpool.h:45
#define __inout_opt
Definition: dbghelp.h:53
#define __in
Definition: dbghelp.h:35
#define __deref_out
Definition: dbghelp.h:26
#define __inout
Definition: dbghelp.h:50
#define __out
Definition: dbghelp.h:62
#define __deref_out_opt
Definition: dbghelp.h:29
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
FP_OP Operation
Definition: fpcontrol.c:150
return pMemory GetBuffer()
FxValidateMemoryDescriptorFlags
@ MemoryDescriptorNullAllowed
@ MemoryDescriptorNoBufferAllowed
FxRequestBufferType
@ FxRequestBufferUnspecified
@ FxRequestBufferMemory
@ FxRequestBufferBuffer
@ FxRequestBufferReferencedMdl
@ FxRequestBufferMdl
#define _Must_inspect_result_
Definition: ms_sal.h:558
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
long LONG
Definition: pedump.c:60
DataType
Definition: simd.h:252
struct FxRequestBuffer::@4820::@4824 RefMdl
ULONG GetBufferLength(VOID)
__inline BOOLEAN HasMdl(VOID)
VOID SetMemory(__in IFxMemory *Memory, __in PWDFMEMORY_OFFSET Offsets)
NTSTATUS GetOrAllocateMdlWorker(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __deref_out PMDL *Mdl, __in BOOLEAN *ReuseMdl, __in LONG Length, __in PVOID Buffer, __inout size_t *SizeOfMdl, __in BOOLEAN UnlockWhenFreed, __deref_out_opt PMDL *MdlToFree)
VOID AssignValues(__deref_out_opt PVOID *PPBuffer, __deref_out_opt PMDL *PPMdl, __out PULONG BufferLength)
VOID SetMdl(__in PMDL Mdl, __in ULONG Length)
union FxRequestBuffer::@4820 u
PWDFMEMORY_OFFSET Offsets
FxRequestBufferType DataType
NTSTATUS ValidateMemoryDescriptor(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PWDF_MEMORY_DESCRIPTOR Descriptor, __in ULONG Flags=0x0)
_Must_inspect_result_ NTSTATUS GetOrAllocateMdl(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __deref_out_opt PMDL *Mdl, __inout PMDL *MdlToFree, __inout PBOOLEAN UnlockWhenFreed, __in LOCK_OPERATION Operation, __in BOOLEAN ReuseMdl=FALSE, __inout_opt size_t *SizeOfMdl=NULL)
__inline VOID SetBuffer(__in PVOID Buffer, __in ULONG Length)
uint32_t * PULONG
Definition: typedefs.h:59
unsigned char * PBOOLEAN
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3771
_In_ WDFDEVICE _In_ PVOID _In_opt_ PMDL Mdl
_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
_Must_inspect_result_ _In_ WDFIORESLIST _In_ PIO_RESOURCE_DESCRIPTOR Descriptor
Definition: wdfresource.h:342
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
enum _LOCK_OPERATION LOCK_OPERATION