djhunter
驱动牛犊
驱动牛犊
  • 注册日期2004-07-20
  • 最后登录2004-09-01
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1529回复:2

关于filemon

楼主#
更多 发布于:2004-07-27 14:44
近日也在研究 filemon代码 ,但是源码始终无法编译通过。
无论是用vc6生成exe 还是生成.sys
我的环境设置是 win2kDDK
不知道还需要进行怎样的设置,才能编译通过呢?
急啊,请指点。。。。。。
AthlonxpX86
驱动小牛
驱动小牛
  • 注册日期2002-11-10
  • 最后登录2013-07-17
  • 粉丝0
  • 关注0
  • 积分29分
  • 威望43点
  • 贡献值0点
  • 好评度2点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2004-08-05 14:55
在Wintypes.h中找到#if !NT5DDK改为#if NT5DDK
exe不能编译请帖出错误信息

下面是VC6+2000DDK编译驱动
我介绍一些在WIN2000SP4+2000DDK+VC6SP6环境用VC6编译DDK的例子
1 用makefile方法编译,首先编写makefile文件,假设为build.bat下面是makefile内容“//”为注释不要加入文件

@echo off
echo Function : 开始2000DDK编译环境设置并编译WDM Driver File
echo on
call F:NTDDKbinsetenv.bat F:NTDDK checked //打开编译器环境设置
f:
cd F:编程开发驱动开发我的作品filedisk2003-04-30_FILESRCsys //转到自己代码目录文件夹
build -b -w -nmake /a//编译连接按照你的要求来

2 用VC6建立DDK代码工程,file->new->projects->makefile,设定到好DDK例子所在目录,下一步makefile step1-2对话框 Commandline填写build.bat完成,然后在tool->options->Directories->Executable files添加build.bat文件夹,然后project->Add to project->file添加 .c .h .rc文件,就可以编辑了

3 编译连接,大功告成

用这种方法就可以用VC6来编写驱动,用DDK自己的编译器编译程序在VC的OUTPUT栏中察看编译信息,并根据提示可修改代码,这样基本上就能把VC6和DDK融为一体了

下面是BUILD的命令说明

F:NTDDK>build /?
BUILD: Object root set to: ==> objfre
BUILD: /i switch ignored

BUILD: Version 4.03.2134

Usage: BUILD [-?] display this message
[-3] same as -Z but will add a third pass zero pass
[-a] allows synchronized blocks and drains during link pass
[-b] displays full error message text (doesn't truncate)
[-c] deletes all object files
[-C] deletes all .lib files only
[-D] check dependencies before building (on by default if BUILD_PRODUCT
!= NT)
[-e] generates build.log, build.wrn & build.err files
[-E] always keep the log/wrn/err files (use with -z)
[-f] force rescan of all source and include files
[-F] when displaying errors/warnings to stdout, print the full path
[-G] enables target specific dirs files iff one target
[-i] ignore extraneous compiler warning messages
[-I] do not display thread index if multiprocessor build
[-k] keep (don't delete) out-of-date targets
[-l] link only, no compiles
[-L] compile only, no link phase
[-m] run build in the idle priority class
[-M [n]] Multiprocessor build (for MP machines)
[-o] display out-of-date files
[-O] generate obj_objects.mac file for current directory
[-p] pause' before compile and link phases
[-P] Print elapsed time after every directory
[-q] query only, don't run NMAKE
[-r dirPath] restarts clean build at specified directory path
[-s] display status line at top of display
[-S] display status line with include file line counts
[-t] display the first level of the dependency tree
[-T] display the complete dependency tree
[-$] display the complete dependency tree hierarchically
[-u] display unused BUILD_OPTIONS
[-v] enable include file version checking
[-w] show warnings on screen
[-y] show files scanned
[-z] no dependency checking or scanning of source files -
one pass compile/link
[-Z] no dependency checking or scanning of source files -
two passes
[-why] list reasons for building targets

[-all] same as -386, -axp64, -alpha, and -ia64
[-alpha] build targets for alpha
[-axp64] build targets for axp64
[-386] build targets for i386
[-ia64] build targets for IA64

[-x filename] exclude include file from dependency checks
[-j filename] use 'filename' as the name for log files
[-nmake arg] argument to pass to NMAKE
[-clean] equivalent to '-nmake clean'
Non-switch parameters specify additional source directories
BUILD: Done



 

AthlonxpX86(桃源村)
newkey
驱动小牛
驱动小牛
  • 注册日期2002-10-03
  • 最后登录2013-10-13
  • 粉丝1
  • 关注0
  • 积分45分
  • 威望392点
  • 贡献值1点
  • 好评度90点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2004-08-10 23:26
sdk + ddk

就行了
www.xDrv.com
游客

返回顶部