ReactOS 0.4.15-dev-7889-g76290a6
fxforward.hpp File Reference
#include "fxforwardum.hpp"
Include dependency graph for fxforward.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct _FX_DRIVER_GLOBALSPFX_DRIVER_GLOBALS
 

Functions

PVOID FxObjectHandleAlloc (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in POOL_TYPE PoolType, __in size_t Size, __in ULONG Tag, __in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __in USHORT ExtraSize, __in FxObjectType ObjectType)
 

Typedef Documentation

◆ PFX_DRIVER_GLOBALS

Definition at line 7 of file fxforward.hpp.

Function Documentation

◆ FxObjectHandleAlloc()

PVOID FxObjectHandleAlloc ( __in PFX_DRIVER_GLOBALS  FxDriverGlobals,
__in POOL_TYPE  PoolType,
__in size_t  Size,
__in ULONG  Tag,
__in_opt PWDF_OBJECT_ATTRIBUTES  Attributes,
__in USHORT  ExtraSize,
__in FxObjectType  ObjectType 
)

Definition at line 163 of file handleapi.cpp.

195{
196 PVOID blob;
197 size_t totalSize;
199
200 if (Tag == 0) {
201 Tag = FxDriverGlobals->Tag;
202 ASSERT(Tag != 0);
203 }
204
206 //
207 // An internal object might need the debug extension size added to it,
208 // but that's it. No extra size, no FxContextHeader.
209 //
210 if (FxDriverGlobals->IsObjectDebugOn()) {
211 status = RtlSizeTAdd(Size,
213 &totalSize);
214 }
215 else {
216 totalSize = Size;
218 }
219 }
220 else {
221 status = FxCalculateObjectTotalSize(FxDriverGlobals,
222 (USHORT) Size,
223 ExtraSize,
225 &totalSize);
226 }
227
228 if (!NT_SUCCESS(status)) {
229 return NULL;
230 }
231
232 blob = FxPoolAllocateWithTag(FxDriverGlobals, PoolType, totalSize, Tag);
233
234 if (blob != NULL) {
236 FxDriverGlobals,
237 blob,
238 COMPUTE_OBJECT_SIZE((USHORT) Size, ExtraSize),
241 );
242 }
243
244 return blob;
245}
LONG NTSTATUS
Definition: precomp.h:26
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define COMPUTE_OBJECT_SIZE(_rawObjectSize, _extraSize)
Definition: fxhandle.h:107
@ FxObjectDebugExtensionSize
Definition: fxobject.hpp:226
@ FxObjectTypeInternal
Definition: fxobject.hpp:119
NTSTATUS status
Definition: handleapi.cpp:537
PVOID FxObjectAndHandleHeaderInit(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PVOID AllocationStart, __in USHORT ObjectSize, __in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __in FxObjectType ObjectType)
Definition: handleapi.cpp:292
return NULL
Definition: handleapi.cpp:653
_Must_inspect_result_ NTSTATUS FxCalculateObjectTotalSize(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in USHORT RawObjectSize, __in USHORT ExtraSize, __in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out size_t *Total)
Definition: handleapi.cpp:147
#define ASSERT(a)
Definition: mode.c:44
ObjectType
Definition: metafile.c:81
unsigned short USHORT
Definition: pedump.c:61
#define STATUS_SUCCESS
Definition: shellext.h:65
Definition: image.c:134
Definition: ps.c:97
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533

Referenced by FxObject::operator new(), and FxMemoryBuffer::operator new().