| 
					阅读:1832回复:13
				 简单的问题,大家来看看
					错误在NTDDK.H中了
 --------------------Configuration: Minimal - Win32 Debug-------------------- Compiling... Driver.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(824) : error C2146: syntax error : missing \';\' before identifier \'KSPIN_LOCK\' E:\\NTDDK\\INC\\DDK\\NTDDK.h(824) : fatal error C1004: unexpected end of file found Unicode.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(824) : error C2146: syntax error : missing \';\' before identifier \'KSPIN_LOCK\' E:\\NTDDK\\INC\\DDK\\NTDDK.h(824) : fatal error C1004: unexpected end of file found Error executing cl.exe. Minimal.SYS - 10 error(s), 0 warning(s) 这样解决?? :mad: | |
| 沙发#发布于:2003-01-22 16:19 
					这是你用vc来编译导致的错误,如果你用console编译的话,就不会有着问题了:)
 vc下就要让系统优先搜索ddk\\inc的路径了 | |
| 
 | 
| 板凳#发布于:2003-01-21 12:07 
					怎么给分呢?
 我是新手,不知道怎么把分给大家呀! | |
| 地板#发布于:2003-01-21 12:05 
					谢谢大家,
 环境出现了问题 | |
| 地下室#发布于:2003-01-20 19:37 错误在NTDDK.H中了 将你的tools->options中的director中的include和library 中的所有ddk有关的项拖曳到最上边...就可以了... 这样解决?? | |
| 5楼#发布于:2003-01-20 16:27 
					代码是没问题的,是你的环境设置错误。				 | |
| 
 | 
| 6楼#发布于:2003-01-20 02:30 
					我编译了,代码没问题,至少编译连接没问题,发到信箱里了。
 如果错误是偶然出现的,就不管它,再来一次。 如果每次都如此,你的系统有问题了。 | |
| 7楼#发布于:2003-01-19 18:29 
					typedef struct _KDPC {
 CSHORT Type; UCHAR Number; UCHAR Importance; LIST_ENTRY DpcListEntry; PKDEFERRED_ROUTINE DeferredRoutine; PVOID DeferredContext; PVOID SystemArgument1; PVOID SystemArgument2; PULONG_PTR Lock; } KDPC, *PKDPC, *RESTRICTED_POINTER PRKDPC; 这个结构是NTDDK.H中的一个结构声明,我在编译的时候 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 大侠帮忙哟,我实在找不出错误的地方了 我把我的源码放在了luozideyouxiang@etang.com中了,邮箱密码:laoluozi 谢谢了! :D | |
| 8楼#发布于:2003-01-19 14:36 
					在包含头文件是最好这样
 #ifdef __Cpluspkus extern \"C\" { #endif #include \"wdm.h\" 或 #include \"ntddk.h\" #ifdef __cplusplus } #endif | |
| 9楼#发布于:2003-01-19 12:37 
					你编的是wdm还是nt驱动?可能包含了不恰当的头文件,另外看一下你的source文件drivertype,targettype是否正确				 | |
| 
 | 
| 10楼#发布于:2003-01-19 12:01 
					沉下心来,一步一个脚印,HH,会成功的				 | |
| 11楼#发布于:2003-01-19 11:56 
					同一楼上的话,仔细查一下你的代码
 | |
| 
 | 
| 12楼#发布于:2003-01-19 11:15 
					听着,DDK的头文件不会有问题,看看你在包含这个头文件前,干了什么。				 | |
| 13楼#发布于:2003-01-19 09:28 
					不是语法错误吗?掉了分号,还有大扩号,PULONG_PTR和Lock没有在指定的类型中说明,仔细检查检查吧!
 BTW:你的头像很拽嘛!和ZN的一模一样! :D | |
| 
 | 
 
							
 
				 
				