10#define CROSSNT_DECL(type, dspec, name, args, callargs) \
11typedef type (dspec *ptr##name) args; \
12extern "C" ptr##name CrNt##name; \
13type dspec CrNt##name##_impl args;
15#define CROSSNT_DECL_EX(mod, type, dspec, name, args, callargs) \
16typedef type (dspec *ptr##name) args; \
17extern "C" ptr##name CrNt##name; \
18type dspec CrNt##name##_impl args;
23#ifdef CROSSNT_DECL_STUB
25#define CROSSNT_DECL(type, dspec, name, args, callargs) \
26extern "C" ptr##name CrNt##name = NULL; \
28#define CROSSNT_DECL_EX(mod, type, dspec, name, args, callargs) \
29extern "C" ptr##name CrNt##name = NULL; \
34#ifdef CROSSNT_INIT_STUB
36#define CROSSNT_DECL(type, dspec, name, args, callargs) \
37 KdPrint(("Init " #name " cur %x\n", CrNt##name)); \
39 CrNt##name = (ptr##name)CrNtGetProcAddress(g_hNtosKrnl, #name); \
40 KdPrint((" GetProcAddr(NTOSKRNL.EXE," #name ") = %x\n", CrNt##name)); \
42 CrNt##name = CrNt##name##_impl; \
44 KdPrint((" final %\n", CrNt##name)); \
47#define CROSSNT_DECL_EX(mod, type, dspec, name, args, callargs) \
48 KdPrint(("Init " mod "," #name " cur %x\n", CrNt##name)); \
50 CrNt##name = (ptr##name)CrNtGetProcAddress(CrNtGetModuleBase(mod), #name); \
51 KdPrint((" GetProcAddr(" mod "," #name ") = %x\n", CrNt##name)); \
53 CrNt##name = CrNt##name##_impl; \
55 KdPrint((" final %x\n", CrNt##name)); \