ReactOS  0.4.15-dev-3456-g4a17d4b
FxMemoryBufferPreallocated Class Reference

#include <fxmemorybufferpreallocated.hpp>

Inheritance diagram for FxMemoryBufferPreallocated:
Collaboration diagram for FxMemoryBufferPreallocated:

Public Member Functions

 FxMemoryBufferPreallocated (_In_ PFX_DRIVER_GLOBALS FxDriverGlobals, _Pre_notnull_ _Pre_writable_byte_size_(BufferSize) PVOID Buffer, _In_ size_t BufferSize)
 
virtual PVOID GetBuffer (VOID)
 
VOID UpdateBuffer (_Pre_notnull_ _Pre_writable_byte_size_(BufferSize) PVOID Buffer, _In_ size_t BufferSize)
 
_Must_inspect_result_ NTSTATUS QueryInterface (__inout FxQueryInterfaceParams *Params)
 
- Public Member Functions inherited from FxMemoryObject
virtual size_t GetBufferSize (VOID)
 
virtual PMDL GetMdl (VOID)
 
virtual WDFMEMORY GetHandle (VOID)
 
virtual PFX_DRIVER_GLOBALS GetDriverGlobals (VOID)
 
virtual ULONG AddRef (__in PVOID Tag, __in LONG Line, __in_opt PSTR File)
 
virtual ULONG Release (__in PVOID Tag, __in LONG Line, __in_opt PSTR File)
 
virtual VOID Delete (VOID)
 
virtual USHORT GetFlags (VOID)
 
- Public Member Functions inherited from FxObject
PVOID GetCOMWrapper ()
 
void SetCOMWrapper (__drv_aliasesMem PVOID Wrapper)
 
 FxObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
 
virtual ~FxObject (VOID)
 
PVOID __inline operator new (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObjectType Type)
 
PVOID __inline operator new (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __in USHORT ExtraSize=0)
 
VOID operator delete (__in PVOID Memory)
 
VOID SetNoContextHeader (VOID)
 
PVOID __inline GetObjectHandle (VOID)
 
__inline FxContextHeaderGetContextHeader (VOID)
 
__inline PFX_DRIVER_GLOBALS GetDriverGlobals (VOID)
 
WDFTYPE GetType (VOID)
 
USHORT GetObjectSize (VOID)
 
LONG GetRefCnt (VOID)
 
FxTagTrackerGetTagTracker (VOID)
 
CfxDeviceGetDevice (VOID)
 
CfxDeviceBaseGetDeviceBase (VOID)
 
VOID SetDeviceBase (__in CfxDeviceBase *DeviceBase)
 
__inline VOID CallCleanup (VOID)
 
ULONG __inline AddRef (__in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual ULONG Release (__in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual ULONG AddRefOverride (__in WDFOBJECT_OFFSET Offset, __in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual ULONG ReleaseOverride (__in WDFOBJECT_OFFSET Offset, __in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual _Must_inspect_result_ NTSTATUS QueryInterface (__in FxQueryInterfaceParams *Params)
 
VOID MarkTraceState (VOID)
 
BOOLEAN __inline IsTraceState (VOID)
 
VOID __inline TraceDroppedEvent (__in FxObjectDroppedEvent Event)
 
VOID MarkPassiveDispose (__in FxObjectLockState State=ObjectLock)
 
VOID MarkPassiveCallbacks (__in FxObjectLockState State=ObjectLock)
 
VOID MarkForceDisposeThread (__in FxObjectLockState State=ObjectLock)
 
BOOLEAN IsPassiveCallbacks (__in BOOLEAN AcquireLock=TRUE)
 
BOOLEAN IsPassiveDispose (__in BOOLEAN AcquireLock=TRUE)
 
BOOLEAN IsForceDisposeThread (__in BOOLEAN AcquireLock=TRUE)
 
VOID MarkCommitted (VOID)
 
BOOLEAN IsCommitted (VOID)
 
VOID MarkDisposeOverride (__in FxObjectLockState State=ObjectLock)
 
VOID MarkNoDeleteDDI (__in FxObjectLockState State=ObjectLock)
 
BOOLEAN IsNoDeleteDDI (VOID)
 
_Must_inspect_result_ NTSTATUS Commit (__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out_opt WDFOBJECT *ObjectHandle, __in_opt FxObject *Parent=NULL, __in BOOLEAN AssignDriverAsDefaultParent=TRUE)
 
VOID DeleteFromFailedCreate (VOID)
 
VOID ClearEvtCallbacks (VOID)
 
BOOLEAN EarlyDispose (VOID)
 
virtual VOID DeleteObject (VOID)
 
virtual BOOLEAN Dispose (VOID)
 
_Must_inspect_result_ NTSTATUS AssignParentObject (__in FxObject *ParentObject)
 
_Must_inspect_result_ NTSTATUS AddContext (__in FxContextHeader *Header, __in PVOID *Context, __in PWDF_OBJECT_ATTRIBUTES Attributes)
 
_Must_inspect_result_ NTSTATUS RemoveParentAssignment (VOID)
 
_Must_inspect_result_ FxObjectGetParentObjectReferenced (__in PVOID Tag)
 
BOOLEAN IsDisposed (VOID)
 
- Public Member Functions inherited from IFxMemory
_Must_inspect_result_ NTSTATUS ValidateMemoryOffsets (__in_opt PWDFMEMORY_OFFSET Offsets)
 
_Must_inspect_result_ NTSTATUS CopyFromPtr (__in_opt PWDFMEMORY_OFFSET DestinationOffsets, __in_bcount(SourceBufferLength) PVOID SourceBuffer, __in size_t SourceBufferLength, __in_opt PWDFMEMORY_OFFSET SourceOffsets)
 
_Must_inspect_result_ NTSTATUS CopyToPtr (__in_opt PWDFMEMORY_OFFSET SourceOffsets, __out_bcount(DestinationBufferLength) PVOID DestinationBuffer, __in size_t DestinationBufferLength, __in_opt PWDFMEMORY_OFFSET DestinationOffsets)
 
_Must_inspect_result_ NTSTATUS ValidateMemoryOffsets (__in_opt PWDFMEMORY_OFFSET Offsets)
 
_Must_inspect_result_ NTSTATUS CopyFromPtr (__in_opt PWDFMEMORY_OFFSET DestinationOffsets, __in_bcount(SourceBufferLength) PVOID SourceBuffer, __in size_t SourceBufferLength, __in_opt PWDFMEMORY_OFFSET SourceOffsets)
 
_Must_inspect_result_ NTSTATUS CopyToPtr (__in_opt PWDFMEMORY_OFFSET SourceOffsets, __out_bcount(DestinationBufferLength) PVOID DestinationBuffer, __in size_t DestinationBufferLength, __in_opt PWDFMEMORY_OFFSET DestinationOffsets)
 

Protected Member Functions

 FxMemoryBufferPreallocated (__in USHORT ObjectSize, __in PFX_DRIVER_GLOBALS Globals)
 
 FxMemoryBufferPreallocated (_In_ PFX_DRIVER_GLOBALS FxDriverGlobals, _In_ USHORT ObjectSize, _Pre_notnull_ _Pre_writable_byte_size_(BufferSize) PVOID Buffer, _In_ size_t BufferSize)
 
 ~FxMemoryBufferPreallocated ()
 
- Protected Member Functions inherited from FxMemoryObject
 FxMemoryObject (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in USHORT ObjectSize, __in size_t BufferSize)
 
- Protected Member Functions inherited from FxObject
 FxObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObjectType ObjectType)
 
FxObjectDebugExtensionGetDebugExtension (VOID)
 
BOOLEAN IsDebug (VOID)
 
VOID AllocateTagTracker (__in WDFTYPE Type)
 
virtual VOID SelfDestruct (VOID)
 
PVOID __inline GetObjectHandleUnchecked (VOID)
 
VOID __inline DestroyChildren (VOID)
 
VOID DeleteEarlyDisposedObject (VOID)
 

Protected Attributes

PVOID m_pBuffer
 
- Protected Attributes inherited from FxMemoryObject
size_t m_BufferSize
 
- Protected Attributes inherited from FxObject
union {
   CfxDeviceBase *   m_DeviceBase
 
   CfxDevice *   m_Device
 
}; 
 

Additional Inherited Members

- Static Public Member Functions inherited from FxMemoryObject
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)
 
- Static Public Member Functions inherited from FxObject
static FxObject_FromDisposeEntry (__in PSINGLE_LIST_ENTRY Entry)
 
static FxObject_GetObjectFromHandle (__in WDFOBJECT Handle, __inout PWDFOBJECT_OFFSET ObjectOffset)
 
static PVOID __inline _ToHandle (__in FxObject *Object)
 
static VOID __inline _ReferenceActual (__in WDFOBJECT Object, __in_opt PVOID Tag, __in LONG Line, __in PSTR File)
 
static VOID __inline _DereferenceActual (__in WDFOBJECT Object, __in_opt PVOID Tag, __in LONG Line, __in PSTR File)
 
static PVOID _GetDebugBase (__in FxObject *Object)
 
static PFX_POOL_HEADER _CleanupPointer (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObject *Object)
 
static _Must_inspect_result_ NTSTATUS _GetEffectiveLock (__in FxObject *Object, __in_opt IFxHasCallbacks *Callbacks, __in BOOLEAN AutomaticLocking, __in BOOLEAN PassiveCallbacks, __out FxCallbackLock **CallbackLock, __out_opt FxObject **CallbackLockObject)
 
static _Must_inspect_result_ NTSTATUS _ObjectQuery (_In_ FxObject *Object, _In_ CONST GUID *Guid, _In_ ULONG QueryBufferLength, _Out_writes_bytes_(QueryBufferLength) PVOID QueryBuffer)
 
- Static Protected Member Functions inherited from FxObject
static PVOID _GetBase (__in FxObject *Object)
 
- Static Protected Member Functions inherited from IFxMemory
static _Must_inspect_result_ NTSTATUS _CopyPtrToPtr (__in_bcount(SourceBufferLength) PVOID SourceBuffer, __in size_t SourceBufferLength, __in_opt PWDFMEMORY_OFFSET SourceOffsets, __out_bcount(DestinationBufferLength) PVOID DestinationBuffer, __in size_t DestinationBufferLength, __in_opt PWDFMEMORY_OFFSET DestinationOffsets)
 
static _Must_inspect_result_ NTSTATUS _CopyPtrToPtr (__in_bcount(SourceBufferLength) PVOID SourceBuffer, __in size_t SourceBufferLength, __in_opt PWDFMEMORY_OFFSET SourceOffsets, __out_bcount(DestinationBufferLength) PVOID DestinationBuffer, __in size_t DestinationBufferLength, __in_opt PWDFMEMORY_OFFSET DestinationOffsets)
 

Detailed Description

Definition at line 24 of file fxmemorybufferpreallocated.hpp.

Constructor & Destructor Documentation

◆ FxMemoryBufferPreallocated() [1/3]

FxMemoryBufferPreallocated::FxMemoryBufferPreallocated ( _In_ PFX_DRIVER_GLOBALS  FxDriverGlobals,
_Pre_notnull_ _Pre_writable_byte_size_(BufferSize) PVOID  Buffer,
_In_ size_t  BufferSize 
)

Definition at line 26 of file fxmemorybufferpreallocated.cpp.

30  :
31  FxMemoryObject(FxDriverGlobals, sizeof(*this), BufferSize),
33 /*++
34 
35 Routine Description:
36  Contstructor for this object. Stores off all the pointers and sizes passed
37  in by the caller.
38 
39 Arguments:
40  Buffer - Buffer to associate with this object
41 
42  BufferSize - Size of Buffer in bytes
43 
44 Return Value:
45  None
46 
47  --*/
48 {
49 }
Definition: bufpool.h:45
FxMemoryObject(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in USHORT ObjectSize, __in size_t BufferSize)
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:251

◆ FxMemoryBufferPreallocated() [2/3]

FxMemoryBufferPreallocated::FxMemoryBufferPreallocated ( __in USHORT  ObjectSize,
__in PFX_DRIVER_GLOBALS  Globals 
)
protected

Definition at line 80 of file fxmemorybufferpreallocated.cpp.

83  : FxMemoryObject(FxDriverGlobals, ObjectSize, 0), m_pBuffer(NULL)
84 /*++
85 
86 Routine Description:
87  Contstructor for this object. Stores off all the pointers and sizes passed
88  in by the caller.
89 
90 Arguments:
91  ObjectSize - Size of the derived object.
92 
93 Return Value:
94  None
95 
96  --*/
97 {
98 }
FxMemoryObject(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in USHORT ObjectSize, __in size_t BufferSize)
#define NULL
Definition: types.h:112

◆ FxMemoryBufferPreallocated() [3/3]

FxMemoryBufferPreallocated::FxMemoryBufferPreallocated ( _In_ PFX_DRIVER_GLOBALS  FxDriverGlobals,
_In_ USHORT  ObjectSize,
_Pre_notnull_ _Pre_writable_byte_size_(BufferSize) PVOID  Buffer,
_In_ size_t  BufferSize 
)
protected

Definition at line 51 of file fxmemorybufferpreallocated.cpp.

56  :
57  FxMemoryObject(FxDriverGlobals, ObjectSize, BufferSize),
59 /*++
60 
61 Routine Description:
62  Contstructor for this object. Stores off all the pointers and sizes passed
63  in by the caller.
64 
65 Arguments:
66  ObjectSize - Size of the derived object
67 
68  Buffer - Buffer to associate with this object
69 
70  BufferSize - Size of Buffer in bytes
71 
72 Return Value:
73  None
74 
75  --*/
76 {
77 }
Definition: bufpool.h:45
FxMemoryObject(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in USHORT ObjectSize, __in size_t BufferSize)
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:251

◆ ~FxMemoryBufferPreallocated()

FxMemoryBufferPreallocated::~FxMemoryBufferPreallocated ( )
protected

Definition at line 100 of file fxmemorybufferpreallocated.cpp.

114 {
115 }

Member Function Documentation

◆ GetBuffer()

virtual PVOID FxMemoryBufferPreallocated::GetBuffer ( VOID  )
inlinevirtual

Implements IFxMemory.

Reimplemented in FxRequestMemory.

Definition at line 35 of file fxmemorybufferpreallocated.hpp.

38  {
39  return m_pBuffer;
40  }

Referenced by FxUsbDevice::CreateIsochUrb(), and FxUsbDevice::CreateUrb().

◆ QueryInterface()

_Must_inspect_result_ NTSTATUS FxMemoryBufferPreallocated::QueryInterface ( __inout FxQueryInterfaceParams Params)
virtual

Reimplemented from FxMemoryObject.

Definition at line 119 of file fxmemorybufferpreallocated.cpp.

122 {
123  if (Params->Type == FX_TYPE_MEMORY_PREALLOCATED) {
124  *Params->Object = (FxMemoryBufferPreallocated*) this;
125  return STATUS_SUCCESS;
126  }
127  else {
128  return FxMemoryObject::QueryInterface(Params); // __super call
129  }
130 }
_In_ WDFIOTARGET _In_ PWDF_REQUEST_COMPLETION_PARAMS Params
Definition: wdfrequest.h:306
#define STATUS_SUCCESS
Definition: shellext.h:65
virtual _Must_inspect_result_ NTSTATUS QueryInterface(__inout FxQueryInterfaceParams *Params)

Referenced by FxRequestMemory::QueryInterface().

◆ UpdateBuffer()

VOID FxMemoryBufferPreallocated::UpdateBuffer ( _Pre_notnull_ _Pre_writable_byte_size_(BufferSize) PVOID  Buffer,
_In_ size_t  BufferSize 
)

Definition at line 133 of file fxmemorybufferpreallocated.cpp.

153 {
154  m_pBuffer = Buffer;
156 }
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
#define BufferSize
Definition: mmc.h:75

Member Data Documentation

◆ m_pBuffer

PVOID FxMemoryBufferPreallocated::m_pBuffer
protected

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