nt: put parentheses around parameter list in X macro
This commit is contained in:
parent
8520557b03
commit
6a92d5e905
11
src/nt.c
11
src/nt.c
@ -3,8 +3,8 @@
|
||||
#include "nt.h"
|
||||
#include "win.h"
|
||||
|
||||
#define X(return_type, declarators, name, ...) \
|
||||
return_type(declarators* name)(__VA_ARGS__) = NULL;
|
||||
#define X(return_type, declarators, name, parameters) \
|
||||
return_type(declarators* name) parameters = NULL;
|
||||
NTDLL_IMPORT_LIST(X)
|
||||
#undef X
|
||||
|
||||
@ -15,10 +15,9 @@ int nt_initialize() {
|
||||
if (ntdll == NULL)
|
||||
return -1;
|
||||
|
||||
#define X(return_type, declarators, name, ...) \
|
||||
name = \
|
||||
(return_type(declarators*)(__VA_ARGS__)) GetProcAddress(ntdll, #name); \
|
||||
if (name == NULL) \
|
||||
#define X(return_type, declarators, name, parameters) \
|
||||
name = (return_type(declarators*) parameters) GetProcAddress(ntdll, #name); \
|
||||
if (name == NULL) \
|
||||
return -1;
|
||||
NTDLL_IMPORT_LIST(X)
|
||||
#undef X
|
||||
|
||||
32
src/nt.h
32
src/nt.h
@ -18,23 +18,23 @@ typedef VOID(NTAPI* PIO_APC_ROUTINE)(PVOID ApcContext,
|
||||
PIO_STATUS_BLOCK IoStatusBlock,
|
||||
ULONG Reserved);
|
||||
|
||||
#define NTDLL_IMPORT_LIST(X) \
|
||||
X(NTSTATUS, \
|
||||
NTAPI, \
|
||||
NtDeviceIoControlFile, \
|
||||
HANDLE FileHandle, \
|
||||
HANDLE Event, \
|
||||
PIO_APC_ROUTINE ApcRoutine, \
|
||||
PVOID ApcContext, \
|
||||
PIO_STATUS_BLOCK IoStatusBlock, \
|
||||
ULONG IoControlCode, \
|
||||
PVOID InputBuffer, \
|
||||
ULONG InputBufferLength, \
|
||||
PVOID OutputBuffer, \
|
||||
ULONG OutputBufferLength)
|
||||
#define NTDLL_IMPORT_LIST(X) \
|
||||
X(NTSTATUS, \
|
||||
NTAPI, \
|
||||
NtDeviceIoControlFile, \
|
||||
(HANDLE FileHandle, \
|
||||
HANDLE Event, \
|
||||
PIO_APC_ROUTINE ApcRoutine, \
|
||||
PVOID ApcContext, \
|
||||
PIO_STATUS_BLOCK IoStatusBlock, \
|
||||
ULONG IoControlCode, \
|
||||
PVOID InputBuffer, \
|
||||
ULONG InputBufferLength, \
|
||||
PVOID OutputBuffer, \
|
||||
ULONG OutputBufferLength)) \
|
||||
|
||||
#define X(return_type, declarators, name, ...) \
|
||||
extern return_type(declarators* name)(__VA_ARGS__);
|
||||
#define X(return_type, declarators, name, parameters) \
|
||||
extern return_type(declarators* name) parameters;
|
||||
NTDLL_IMPORT_LIST(X)
|
||||
#undef X
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user