ReactOS  0.4.15-dev-3187-ge372f2b
fxmacros.hpp File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define WDF_FX_VF_SECTION_NAME   PAGEWdfV
 
#define QUOTE_EXPANSION(tok)   #tok
 
#define FX_VF_SECTION_NAME_QUOTED(tok)   QUOTE_EXPANSION(tok)
 
#define FX_VF_PAGING   __declspec(code_seg(FX_VF_SECTION_NAME_QUOTED(WDF_FX_VF_SECTION_NAME)))
 
#define FX_VF_NAME_TO_IMP_NAME(fnName)   Vf_##fnName
 
#define FX_VF_NAME_TO_SCOPED_IMP_NAME(classname, fnName)   classname::Vf_##fnName
 
#define FX_VF_QF_VOID
 
#define FX_VF_QF_NTSTATUS   _Must_inspect_result_
 
#define FX_VF_DEFAULT_RT_VOID
 
#define FX_VF_DEFAULT_RT_NTSTATUS   STATUS_SUCCESS
 
#define FX_VF_FUNCTION_PROTOTYPE(qf, rt, fnName, ...)
 
#define FX_VF_METHOD(classname, fnName)
 
#define FX_VF_FUNCTION(fnName)
 
#define FX_VF_GLOBAL_CHECK_SCOPE(rt, rtDef, fnName, params)
 
#define FX_VF_STUB(qf, rt, rtDef, fnName)
 
#define FX_DECLARE_VF_FUNCTION_EX(qf, rt, rtDef, fnName)
 
#define FX_DECLARE_VF_FUNCTION(rt, fnName)   FX_DECLARE_VF_FUNCTION_EX( FX_VF_QF_ ## rt, rt, FX_VF_DEFAULT_RT_ ## rt, fnName )
 
#define FX_VF_STUB_P1(qf, rt, rtDef, fnName, at1)
 
#define FX_DECLARE_VF_FUNCTION_P1_EX(qf, rt, rtDef, fnName, at1)
 
#define FX_DECLARE_VF_FUNCTION_P1(rt, fnName, at1)   FX_DECLARE_VF_FUNCTION_P1_EX( FX_VF_QF_ ## rt, rt, FX_VF_DEFAULT_RT_ ## rt, fnName, at1 )
 
#define FX_VF_STUB_P2(qf, rt, rtDef, fnName, at1, at2)
 
#define FX_DECLARE_VF_FUNCTION_P2_EX(qf, rt, rtDef, fnName, at1, at2)
 
#define FX_DECLARE_VF_FUNCTION_P2(rt, fnName, at1, at2)   FX_DECLARE_VF_FUNCTION_P2_EX( FX_VF_QF_ ## rt, rt, FX_VF_DEFAULT_RT_ ## rt, fnName, at1, at2 )
 
#define FX_VF_STUB_P3(qf, rt, rtDef, fnName, at1, at2, at3)
 
#define FX_DECLARE_VF_FUNCTION_P3_EX(qf, rt, rtDef, fnName, at1, at2, at3)
 
#define FX_DECLARE_VF_FUNCTION_P3(rt, fnName, at1, at2, at3)   FX_DECLARE_VF_FUNCTION_P3_EX( FX_VF_QF_ ## rt, rt, FX_VF_DEFAULT_RT_ ## rt, fnName, at1, at2, at3 )
 
#define FX_VF_STUB_P4(qf, rt, rtDef, fnName, at1, at2, at3, at4)
 
#define FX_DECLARE_VF_FUNCTION_P4_EX(qf, rt, rtDef, fnName, at1, at2, at3, at4)
 
#define FX_DECLARE_VF_FUNCTION_P4(rt, fnName, at1, at2, at3, at4)   FX_DECLARE_VF_FUNCTION_P4_EX( FX_VF_QF_ ## rt, rt, FX_VF_DEFAULT_RT_ ## rt, fnName, at1, at2, at3, at4 )
 
#define FX_TAG   'rDxF'
 
#define WDFEXPORT(a)   imp_ ## a
 
#define VFWDFEXPORT(a)   imp_Vf ## a
 
#define ARRAY_SIZE(_x)   (sizeof((_x))/sizeof((_x)[0]))
 
#define FXVERIFY(_globals, exp)
 
#define FX_ALIGN_SIZE_DOWN_CONSTANT(Length, AlignTo)   ((Length) & ~((AlignTo) - 1))
 
#define FX_ALIGN_SIZE_UP_CONSTANT(Length, AlignTo)   FX_ALIGN_SIZE_DOWN_CONSTANT((Length) + (AlignTo) - 1, (AlignTo))
 
#define DEFINE_EMBEDDED_OBJECT_HANDLE(_type, _fieldname)
 
#define EMBEDDED_OBJECT_SIZE(_owningClass, _embeddedFieldName)
 
#define DO_NOTHING()   (0)
 
#define WHILE(constant)   __pragma(warning(suppress: 4127)) while(constant)
 
#define TRAP()
 
#define COVERAGE_TRAP()
 
#define FxPointerNotNull(FxDriverGlobals, Ptr)
 
#define FX_MAKE_WSTR_WORKER(x)   L ## #x
 
#define FX_MAKE_WSTR(x)   FX_MAKE_WSTR_WORKER(x)
 
#define FX_LITERAL_WORKER(a)   # a
 
#define FX_LITERAL(a)   FX_LITERAL_WORKER(a)
 
#define FX_ASSERT_AND_ASSUME_FOR_PREFAST(b)
 
#define WDF_VERIFY_KM_ONLY_CODE()   Mx::MxAssertMsg("Unexpected invocation in user mode", FALSE);
 
#define MAX(x, y)   ((x) > (y) ? (x) : (y))
 
#define MIN(x, y)   ((x) < (y) ? (x) : (y))
 
#define SAFE_RELEASE(p)   if( NULL != p ) { ( p )->Release(); p = NULL; }
 

Macro Definition Documentation

◆ ARRAY_SIZE

#define ARRAY_SIZE (   _x)    (sizeof((_x))/sizeof((_x)[0]))

Definition at line 161 of file fxmacros.hpp.

◆ COVERAGE_TRAP

#define COVERAGE_TRAP ( )

Definition at line 246 of file fxmacros.hpp.

◆ DEFINE_EMBEDDED_OBJECT_HANDLE

#define DEFINE_EMBEDDED_OBJECT_HANDLE (   _type,
  _fieldname 
)
Value:
#define DECLSPEC_ALIGN(x)
Definition: ntbasedef.h:251
#define MEMORY_ALLOCATION_ALIGNMENT
Definition: ntbasedef.h:90

Definition at line 209 of file fxmacros.hpp.

◆ DO_NOTHING

#define DO_NOTHING ( )    (0)

Definition at line 223 of file fxmacros.hpp.

◆ EMBEDDED_OBJECT_SIZE

#define EMBEDDED_OBJECT_SIZE (   _owningClass,
  _embeddedFieldName 
)
Value:
(FIELD_OFFSET(_owningClass, _embeddedFieldName ## Context) - \
FIELD_OFFSET(_owningClass, _embeddedFieldName))
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255

Definition at line 217 of file fxmacros.hpp.

◆ FX_ALIGN_SIZE_DOWN_CONSTANT

#define FX_ALIGN_SIZE_DOWN_CONSTANT (   Length,
  AlignTo 
)    ((Length) & ~((AlignTo) - 1))

Definition at line 188 of file fxmacros.hpp.

◆ FX_ALIGN_SIZE_UP_CONSTANT

#define FX_ALIGN_SIZE_UP_CONSTANT (   Length,
  AlignTo 
)    FX_ALIGN_SIZE_DOWN_CONSTANT((Length) + (AlignTo) - 1, (AlignTo))

Definition at line 196 of file fxmacros.hpp.

◆ FX_ASSERT_AND_ASSUME_FOR_PREFAST

#define FX_ASSERT_AND_ASSUME_FOR_PREFAST (   b)
Value:
{ \
ASSERT(b); \
}
GLboolean GLboolean GLboolean b
Definition: glext.h:6204

Definition at line 284 of file fxmacros.hpp.

◆ FX_DECLARE_VF_FUNCTION

#define FX_DECLARE_VF_FUNCTION (   rt,
  fnName 
)    FX_DECLARE_VF_FUNCTION_EX( FX_VF_QF_ ## rt, rt, FX_VF_DEFAULT_RT_ ## rt, fnName )

Definition at line 75 of file fxmacros.hpp.

◆ FX_DECLARE_VF_FUNCTION_EX

#define FX_DECLARE_VF_FUNCTION_EX (   qf,
  rt,
  rtDef,
  fnName 
)
Value:
FX_VF_FUNCTION_PROTOTYPE( qf, rt, fnName ) \
FX_VF_STUB( qf, rt, rtDef, fnName )
#define FX_VF_FUNCTION_PROTOTYPE(qf, rt, fnName,...)
Definition: fxmacros.hpp:38

Definition at line 71 of file fxmacros.hpp.

◆ FX_DECLARE_VF_FUNCTION_P1

#define FX_DECLARE_VF_FUNCTION_P1 (   rt,
  fnName,
  at1 
)    FX_DECLARE_VF_FUNCTION_P1_EX( FX_VF_QF_ ## rt, rt, FX_VF_DEFAULT_RT_ ## rt, fnName, at1 )

Definition at line 94 of file fxmacros.hpp.

◆ FX_DECLARE_VF_FUNCTION_P1_EX

#define FX_DECLARE_VF_FUNCTION_P1_EX (   qf,
  rt,
  rtDef,
  fnName,
  at1 
)
Value:
FX_VF_FUNCTION_PROTOTYPE( qf, rt, fnName, at1 ) \
FX_VF_STUB_P1( qf, rt, rtDef, fnName, at1 )
#define FX_VF_FUNCTION_PROTOTYPE(qf, rt, fnName,...)
Definition: fxmacros.hpp:38

Definition at line 89 of file fxmacros.hpp.

◆ FX_DECLARE_VF_FUNCTION_P2

#define FX_DECLARE_VF_FUNCTION_P2 (   rt,
  fnName,
  at1,
  at2 
)    FX_DECLARE_VF_FUNCTION_P2_EX( FX_VF_QF_ ## rt, rt, FX_VF_DEFAULT_RT_ ## rt, fnName, at1, at2 )

Definition at line 113 of file fxmacros.hpp.

◆ FX_DECLARE_VF_FUNCTION_P2_EX

#define FX_DECLARE_VF_FUNCTION_P2_EX (   qf,
  rt,
  rtDef,
  fnName,
  at1,
  at2 
)
Value:
FX_VF_FUNCTION_PROTOTYPE( qf, rt, fnName, at1, at2 ) \
FX_VF_STUB_P2( qf, rt, rtDef, fnName, at1, at2 )
#define FX_VF_FUNCTION_PROTOTYPE(qf, rt, fnName,...)
Definition: fxmacros.hpp:38

Definition at line 108 of file fxmacros.hpp.

◆ FX_DECLARE_VF_FUNCTION_P3

#define FX_DECLARE_VF_FUNCTION_P3 (   rt,
  fnName,
  at1,
  at2,
  at3 
)    FX_DECLARE_VF_FUNCTION_P3_EX( FX_VF_QF_ ## rt, rt, FX_VF_DEFAULT_RT_ ## rt, fnName, at1, at2, at3 )

Definition at line 132 of file fxmacros.hpp.

◆ FX_DECLARE_VF_FUNCTION_P3_EX

#define FX_DECLARE_VF_FUNCTION_P3_EX (   qf,
  rt,
  rtDef,
  fnName,
  at1,
  at2,
  at3 
)
Value:
FX_VF_FUNCTION_PROTOTYPE( qf, rt, fnName, at1, at2, at3) \
FX_VF_STUB_P3( qf, rt, rtDef, fnName, at1, at2, at3 )
#define FX_VF_FUNCTION_PROTOTYPE(qf, rt, fnName,...)
Definition: fxmacros.hpp:38

Definition at line 127 of file fxmacros.hpp.

◆ FX_DECLARE_VF_FUNCTION_P4

#define FX_DECLARE_VF_FUNCTION_P4 (   rt,
  fnName,
  at1,
  at2,
  at3,
  at4 
)    FX_DECLARE_VF_FUNCTION_P4_EX( FX_VF_QF_ ## rt, rt, FX_VF_DEFAULT_RT_ ## rt, fnName, at1, at2, at3, at4 )

Definition at line 151 of file fxmacros.hpp.

◆ FX_DECLARE_VF_FUNCTION_P4_EX

#define FX_DECLARE_VF_FUNCTION_P4_EX (   qf,
  rt,
  rtDef,
  fnName,
  at1,
  at2,
  at3,
  at4 
)
Value:
FX_VF_FUNCTION_PROTOTYPE( qf, rt, fnName, at1, at2, at3, at4 ) \
FX_VF_STUB_P4( qf, rt, rtDef, fnName, at1, at2, at3, at4 )
#define FX_VF_FUNCTION_PROTOTYPE(qf, rt, fnName,...)
Definition: fxmacros.hpp:38

Definition at line 146 of file fxmacros.hpp.

◆ FX_LITERAL

#define FX_LITERAL (   a)    FX_LITERAL_WORKER(a)

Definition at line 267 of file fxmacros.hpp.

◆ FX_LITERAL_WORKER

#define FX_LITERAL_WORKER (   a)    # a

Definition at line 266 of file fxmacros.hpp.

◆ FX_MAKE_WSTR

#define FX_MAKE_WSTR (   x)    FX_MAKE_WSTR_WORKER(x)

Definition at line 264 of file fxmacros.hpp.

◆ FX_MAKE_WSTR_WORKER

#define FX_MAKE_WSTR_WORKER (   x)    L ## #x

Definition at line 263 of file fxmacros.hpp.

◆ FX_TAG

#define FX_TAG   'rDxF'

Definition at line 155 of file fxmacros.hpp.

◆ FX_VF_DEFAULT_RT_NTSTATUS

#define FX_VF_DEFAULT_RT_NTSTATUS   STATUS_SUCCESS

Definition at line 36 of file fxmacros.hpp.

◆ FX_VF_DEFAULT_RT_VOID

#define FX_VF_DEFAULT_RT_VOID

Definition at line 35 of file fxmacros.hpp.

◆ FX_VF_FUNCTION

#define FX_VF_FUNCTION (   fnName)
Value:
#define FX_VF_NAME_TO_IMP_NAME(fnName)
Definition: fxmacros.hpp:31

Definition at line 47 of file fxmacros.hpp.

◆ FX_VF_FUNCTION_PROTOTYPE

#define FX_VF_FUNCTION_PROTOTYPE (   qf,
  rt,
  fnName,
  ... 
)
Value:
FX_VF_FUNCTION( fnName )( _In_ PFX_DRIVER_GLOBALS, ##__VA_ARGS__ );
#define FX_VF_FUNCTION(fnName)
Definition: fxmacros.hpp:47
#define _In_
Definition: ms_sal.h:308
struct _FX_DRIVER_GLOBALS * PFX_DRIVER_GLOBALS
Definition: fxforward.hpp:7

Definition at line 38 of file fxmacros.hpp.

◆ FX_VF_GLOBAL_CHECK_SCOPE

#define FX_VF_GLOBAL_CHECK_SCOPE (   rt,
  rtDef,
  fnName,
  params 
)
Value:
{ \
if( FxDriverGlobals->FxVerifierOn ) { \
return FX_VF_NAME_TO_IMP_NAME( fnName ) params; \
} \
else { \
return rtDef; \
} \
}
#define FX_VF_NAME_TO_IMP_NAME(fnName)
Definition: fxmacros.hpp:31
GLenum const GLfloat * params
Definition: glext.h:5645

Definition at line 51 of file fxmacros.hpp.

◆ FX_VF_METHOD

#define FX_VF_METHOD (   classname,
  fnName 
)
Value:
WCHAR classname[128]
Definition: startup.c:15
#define FX_VF_NAME_TO_SCOPED_IMP_NAME(classname, fnName)
Definition: fxmacros.hpp:32

Definition at line 43 of file fxmacros.hpp.

◆ FX_VF_NAME_TO_IMP_NAME

#define FX_VF_NAME_TO_IMP_NAME (   fnName)    Vf_##fnName

Definition at line 31 of file fxmacros.hpp.

◆ FX_VF_NAME_TO_SCOPED_IMP_NAME

#define FX_VF_NAME_TO_SCOPED_IMP_NAME (   classname,
  fnName 
)    classname::Vf_##fnName

Definition at line 32 of file fxmacros.hpp.

◆ FX_VF_PAGING

Definition at line 28 of file fxmacros.hpp.

◆ FX_VF_QF_NTSTATUS

#define FX_VF_QF_NTSTATUS   _Must_inspect_result_

Definition at line 34 of file fxmacros.hpp.

◆ FX_VF_QF_VOID

#define FX_VF_QF_VOID

Definition at line 33 of file fxmacros.hpp.

◆ FX_VF_SECTION_NAME_QUOTED

#define FX_VF_SECTION_NAME_QUOTED (   tok)    QUOTE_EXPANSION(tok)

Definition at line 17 of file fxmacros.hpp.

◆ FX_VF_STUB

#define FX_VF_STUB (   qf,
  rt,
  rtDef,
  fnName 
)
Value:
__inline \
qf \
rt \
fnName( _In_ PFX_DRIVER_GLOBALS FxDriverGlobals ) \
FX_VF_GLOBAL_CHECK_SCOPE( rt, rtDef, fnName, ( FxDriverGlobals ) )
#define _In_
Definition: ms_sal.h:308

Definition at line 64 of file fxmacros.hpp.

◆ FX_VF_STUB_P1

#define FX_VF_STUB_P1 (   qf,
  rt,
  rtDef,
  fnName,
  at1 
)
Value:
__inline \
qf \
rt \
fnName( _In_ PFX_DRIVER_GLOBALS FxDriverGlobals, at1 a1 ) \
FX_VF_GLOBAL_CHECK_SCOPE( rt, rtDef, fnName, (FxDriverGlobals, a1 ))
#define _In_
Definition: ms_sal.h:308
static const struct update_accum a1
Definition: msg.c:578

Definition at line 81 of file fxmacros.hpp.

◆ FX_VF_STUB_P2

#define FX_VF_STUB_P2 (   qf,
  rt,
  rtDef,
  fnName,
  at1,
  at2 
)
Value:
__inline \
qf \
rt \
fnName( _In_ PFX_DRIVER_GLOBALS FxDriverGlobals, at1 a1, at2 a2 ) \
FX_VF_GLOBAL_CHECK_SCOPE( rt, rtDef, fnName, (FxDriverGlobals, a1, a2 ))
#define _In_
Definition: ms_sal.h:308
static const struct update_accum a2
Definition: msg.c:586
static const struct update_accum a1
Definition: msg.c:578

Definition at line 100 of file fxmacros.hpp.

◆ FX_VF_STUB_P3

#define FX_VF_STUB_P3 (   qf,
  rt,
  rtDef,
  fnName,
  at1,
  at2,
  at3 
)
Value:
__inline \
qf \
rt \
fnName( _In_ PFX_DRIVER_GLOBALS FxDriverGlobals, at1 a1, at2 a2, at3 a3 ) \
FX_VF_GLOBAL_CHECK_SCOPE( rt, rtDef, fnName, (FxDriverGlobals, a1, a2, a3))
static const struct update_accum a3
Definition: msg.c:600
#define _In_
Definition: ms_sal.h:308
static const struct update_accum a2
Definition: msg.c:586
static const struct update_accum a1
Definition: msg.c:578

Definition at line 119 of file fxmacros.hpp.

◆ FX_VF_STUB_P4

#define FX_VF_STUB_P4 (   qf,
  rt,
  rtDef,
  fnName,
  at1,
  at2,
  at3,
  at4 
)
Value:
__inline \
qf \
rt \
fnName( _In_ PFX_DRIVER_GLOBALS FxDriverGlobals, at1 a1, at2 a2, at3 a3, at4 a4 ) \
FX_VF_GLOBAL_CHECK_SCOPE( rt, rtDef, fnName, (FxDriverGlobals, a1, a2, a3, a4))
static const struct update_accum a3
Definition: msg.c:600
static const struct update_accum a4
Definition: msg.c:2285
#define _In_
Definition: ms_sal.h:308
static const struct update_accum a2
Definition: msg.c:586
static const struct update_accum a1
Definition: msg.c:578

Definition at line 138 of file fxmacros.hpp.

◆ FxPointerNotNull

#define FxPointerNotNull (   FxDriverGlobals,
  Ptr 
)
Value:
FX_VERIFY_WITH_NAME(DRIVER(BadArgument, TODO), CHECK_NOT_NULL(Ptr), \
FxDriverGlobals->Public.DriverName)
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
FX_VERIFY_WITH_NAME(DRIVER(BadArgument, TODO), CHECK(ERROR_STRING_HW_ACCESS_NOT_ALLOWED,(pDevice->IsDirectHardwareAccessAllowed()==TRUE)), DriverGlobals->DriverName)
#define TODO
Definition: SAX2.c:49

Definition at line 253 of file fxmacros.hpp.

◆ FXVERIFY

#define FXVERIFY (   _globals,
  exp 
)
Value:
{ \
if (!(exp)) { \
RtlAssert( #exp, __FILE__, __LINE__, NULL );\
} \
}
#define NULL
Definition: types.h:112
DWORD exp
Definition: msg.c:16033

Definition at line 170 of file fxmacros.hpp.

◆ MAX

#define MAX (   x,
  y 
)    ((x) > (y) ? (x) : (y))

Definition at line 308 of file fxmacros.hpp.

◆ MIN

#define MIN (   x,
  y 
)    ((x) < (y) ? (x) : (y))

Definition at line 312 of file fxmacros.hpp.

◆ QUOTE_EXPANSION

#define QUOTE_EXPANSION (   tok)    #tok

Definition at line 16 of file fxmacros.hpp.

◆ SAFE_RELEASE

#define SAFE_RELEASE (   p)    if( NULL != p ) { ( p )->Release(); p = NULL; }

Definition at line 316 of file fxmacros.hpp.

◆ TRAP

#define TRAP ( )

Definition at line 236 of file fxmacros.hpp.

◆ VFWDFEXPORT

#define VFWDFEXPORT (   a)    imp_Vf ## a

Definition at line 158 of file fxmacros.hpp.

◆ WDF_FX_VF_SECTION_NAME

#define WDF_FX_VF_SECTION_NAME   PAGEWdfV

Definition at line 15 of file fxmacros.hpp.

◆ WDF_VERIFY_KM_ONLY_CODE

#define WDF_VERIFY_KM_ONLY_CODE ( )    Mx::MxAssertMsg("Unexpected invocation in user mode", FALSE);

Definition at line 298 of file fxmacros.hpp.

◆ WDFEXPORT

#define WDFEXPORT (   a)    imp_ ## a

Definition at line 157 of file fxmacros.hpp.

◆ WHILE

#define WHILE (   constant)    __pragma(warning(suppress: 4127)) while(constant)

Definition at line 226 of file fxmacros.hpp.