ReactOS  0.4.15-dev-3207-ga415bd4
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

enum FxObjectType UINT32 enum FxWmiInstanceAction UINT32 enum FxDriverObjectUmFlags USHORT enum FxWakeInterruptEvents UINT32 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()

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,
224  Attributes,
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),
239  Attributes,
240  ObjectType
241  );
242  }
243 
244  return blob;
245 }
ObjectType
Definition: metafile.c:80
Definition: image.c:133
LONG NTSTATUS
Definition: precomp.h:26
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
const DWORD * blob
Definition: effect.c:980
#define COMPUTE_OBJECT_SIZE(_rawObjectSize, _extraSize)
Definition: fxhandle.h:107
#define ASSERT(a)
Definition: mode.c:44
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
_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
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4061
unsigned short USHORT
Definition: pedump.c:61
return NULL
Definition: handleapi.cpp:653
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
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3810
#define STATUS_SUCCESS
Definition: shellext.h:65
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
Definition: ps.c:97

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