阅读:1135回复:0
关于DriverStudio的使用问题:
用过DriverWorks的朋友知道,一般DriverWorks Wizard向导会生成两个工程,一个是.sys,一个是.exe,我现在的.sys工程已经顺利通过编译并生成.sys,我已在2000下将其安装好。但用于测试.sys的exe工程,在编译时却碰到一些问题,编译器提示:#error NTVERSION symbol must be defined to one of the following: 400, \'WDM\',编译器提示NTVERSION的定义在vdw.h文件中,我打开这个文件,发现有关NTVERSION的定义如下:
#error NTVERSION symbol must be defined to one of the following: 400, \'WDM\',错误出在vdw.h,我打开vdw.h看到有几行关于NTVERSION的: #ifdef _IA64_ extern \"C\" void __cdecl __mf(void); #pragma intrinsic(__mf) #endif #ifndef __VDW_VERSION__ #define __VDW_VERSION__ 250 #ifndef NTVERSION #error NTVERSION symbol must be defined to one of the following: 400, \'WDM\' #endif #define _WDM_ (NTVERSION == \'WDM\') #define _NT400_ (NTVERSION == 400) 于是我在这个头文件中加上一行#define NTVERSION 400,再编译,但发现编译器报更多地错误: --------------------Configuration: Test_RegSample - Win32 Release-------------------- Compiling... RegSampleDevice.cpp E:\\NTDDK\\INC\\DDK\\ntddk.h(370) : error C2146: syntax error : missing \';\' before identifier \'Lock\' E:\\NTDDK\\INC\\DDK\\ntddk.h(370) : error C2501: \'PULONG_PTR\' : missing storage-class or type specifiers E:\\NTDDK\\INC\\DDK\\ntddk.h(370) : error C2501: \'Lock\' : missing storage-class or type specifiers E:\\NTDDK\\INC\\DDK\\ntddk.h(7914) : error C2146: syntax error : missing \';\' before identifier \'InterruptTime\' E:\\NTDDK\\INC\\DDK\\ntddk.h(7914) : error C2501: \'InterruptTime\' : missing storage-class or type specifiers E:\\NTDDK\\INC\\DDK\\ntddk.h(7928) : error C2146: syntax error : missing \';\' before identifier \'SystemTime\' E:\\NTDDK\\INC\\DDK\\ntddk.h(7928) : error C2086: \'KSYSTEM_TIME\' : redefinition E:\\NTDDK\\INC\\DDK\\ntddk.h(7928) : error C2501: \'SystemTime\' : missing storage-class or type specifiers E:\\NTDDK\\INC\\DDK\\ntddk.h(7935) : error C2146: syntax error : missing \';\' before identifier \'TimeZoneBias\' E:\\NTDDK\\INC\\DDK\\ntddk.h(7935) : error C2086: \'KSYSTEM_TIME\' : redefinition E:\\NTDDK\\INC\\DDK\\ntddk.h(7935) : error C2501: \'TimeZoneBias\' : missing storage-class or type specifiers E:\\NTDDK\\INC\\DDK\\ntddk.h(9101) : error C2146: syntax error : missing \';\' before identifier \'ContextRecord\' E:\\NTDDK\\INC\\DDK\\ntddk.h(9101) : error C2501: \'PCONTEXT\' : missing storage-class or type specifiers E:\\NTDDK\\INC\\DDK\\ntddk.h(9101) : error C2501: \'ContextRecord\' : missing storage-class or type specifiers E:\\NTDDK\\INC\\DDK\\ntddk.h(10051) : error C2146: syntax error : missing \';\' before identifier \'KeTickCount\' E:\\NTDDK\\INC\\DDK\\ntddk.h(10051) : fatal error C1004: unexpected end of file found Error executing cl.exe. Test_RegSample.exe - 16 error(s), 0 warning(s) 不知是何故,不知有没有朋友碰到类似的问题,请指教。 我用的是DriverSuites2.7+Win2000DDK, |
|