syntax error : '__stdcall'
小曦子 2010-08-04 08:15:11 #ifdef __cplusplus
#define DLL_API extern "C" __declspec (dllexport)
#else
#define DLL_API __declspec (dllexport)
#endif
typedef NTSTATUS (NTAPI *NTALLOCATEVIRTUALMEMORY)(IN HANDLE ProcessHandle,
IN OUT PVOID *BaseAddress,
IN ULONG_PTR ZeroBits,
IN OUT PSIZE_T RegionSize,
IN ULONG AllocationType,
IN ULONG Protect
);
DLL_API NTALLOCATEVIRTUALMEMORY NtAllocateVirtualMemoryOrig;
上面是写在C++的DLL文件里面
然后编译的时候出现如下错误:
error C2059: syntax error : '__stdcall'
error C2091: function returns function
error C2146: syntax error : missing ';'
before identifier 'NtAllocateVirtualMemoryOrig'
fatal error C1004: unexpected end of file found
其它地方没错,就这里报错,好象是调用规则问题,但不知道要怎么写才不会出错,想请教一下论坛上谁写过这样的