用VC6.0编译驱动程序的工程设置方法

用VC6.0编译驱动程序的工程设置方法
 

VC6.0编译驱动程序的工程设置

一、编译NT式驱动

1>     建立一个win32应用程序工程。

2>     修改工程属性。Project --Setting-C/C++中的Project Options内容替换成

/nologo /Gz /MLd /W3 /WX /Z7 /Od /D WIN32=100 /D _X86_=1 /D WINVER=0x500 /D      DBG=1 /Fo"MyDriver_Check/" /Fd"MyDriver_Check/" /FD /c

3>     修改Link选项卡,将原来的Project Options内容替换成

ntoskrnl.lib /nologo /base:"0x10000" /stack:0x400000,0x1000 /entry:"DriverEntry" /subsystem:console /incremental:no /pdb:"MyDriver_Check/HelloDDK.pdb" /map:"MyDriver_Check/HelloDDK.map" /debug /machine:I386 /nodefaultlib /out:"MyDriver_Check/HelloDDK.sys" /pdbtype:sept /subsystem:native /driver /SECTION:INIT,D /RELEASE /IGNORE:4078

4>     修改VC的lib目录和include目录

(DDK安装在F:/WINDDK/3790.1830)

    Include files  中添加:F:/WINDDK/3790.1830/INC/W2K

                                       F:/WINDDK/3790.1830/INC/DDK/W2K

                                       F:/WINDDK/3790.1830/INC/CRT

 并将它放入最前即可

二、编译WDM式驱动

1> 建立一个win32应用程序工程。

2> 修改工程属性。Project --Setting-C/C++中的Project Options内容替换成

/nologo /Gz /MLd /W3 /WX /Z7 /Od /D WIN32=100 /D _X86_=1 /D WINVER=0x500 /D DBG=1 /Fo"MyDriver_Check/" /Fd"MyDriver_Check/" /FD /c

       3> 修改Link选项卡,将原来的Project Options内容替换成

wdm.lib /nologo /base:"0x10000" /stack:0x400000,0x1000 /entry:"DriverEntry" /subsystem:console /incremental:no /pdb:"MyDriver_Check/HelloWDM.pdb" /debug /machine:I386 /nodefaultlib /out:"MyDriver_Check/HelloWDM.sys" /pdbtype:sept /subsystem:native /driver /SECTION:INIT,D /RELEASE /IGNORE:4078

4> 修改VC的lib目录和include目录

(DDK安装在F:/WINDDK/3790.1830)

    Include files  中添加:F:/WINDDK/3790.1830/INC/DDK/WDM/W2K

F:/WINDDK/3790.1830/INC/W2K

                                       F:/WINDDK/3790.1830/INC/DDK/W2K

                                       F:/WINDDK/3790.1830/INC/CRT

并将它放入最前即可

你可能感兴趣的:(include,X86,DDK)