首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 嵌入开发 > 驱动开发 >

这异常让小弟我很纠结,求解

2012-03-17 
这错误让我很纠结,求解!C/C++ code#include wdm.h#include ntdef.hVOID UnLoad(PDRIVER_OBJECT Driver

这错误让我很纠结,求解!

C/C++ code
#include <wdm.h>#include <ntdef.h>VOID UnLoad(PDRIVER_OBJECT DriverObject){    KdPrint("xxxx");}NTSTATUSDriverEntry(    IN PDRIVER_OBJECT  DriverObject,    IN PUNICODE_STRING RegistryPath    ){   /* NTSTATUS status;*/    DriverObject->DriverUnload = UnLoad;    return 1;}


source 

C/C++ code
TARGETNAME=wdmTARGETPATH=objTARGETTYPE=DRIVERSOURCES= firstwdm.c


错误

C/C++ code
E:\DDK>buildpath contains nonexistant c:\program files (x86)\amd app\bin\x86, removingBUILD: Compile and Link for IA64BUILD: Loading e:\winddk\7600.16385.1\build.dat...BUILD: Computing Include file dependencies:BUILD: Start time: Sat Dec 17 20:59:02 2011BUILD: Examining e:\ddk directory for files to compile.BUILD: Saving e:\winddk\7600.16385.1\build.dat...BUILD: Compiling and Linking e:\ddk directoryCompiling - firstwdm.c1>errors in directory e:\ddk1>e:\ddk\firstwdm.c(7) : error C2143: syntax error : missing ';' before 'string'Linking Executable - objchk_win7_ia64\ia64\wdm.sys1>link : error LNK1181: cannot open input file 'e:\ddk\objchk_win7_ia64\ia64\firstwdm.obj'BUILD: Finish time: Sat Dec 17 20:59:03 2011BUILD: Done    3 files compiled - 2 Warnings - 1 Error    1 executable built - 1 ErrorE:\DDK>


初学DDK,理论学了很多,一编译就卡起了。纠结中。。。

[解决办法]
这句有错
KdPrint("xxxx");
应该为
KdPrint(("xxxx"));
看一下KdPrint的宏定义就知道了。

热点排行