如何开发winnt下的驱动,ddk的使用和vc这样结合?

cziy122 2004-08-01 12:19:59
如何开发winnt下的驱动,ddk的使用和vc这样结合?
能在那里找到与驱动开发有关的资料。最好是详细一点。
...全文
199 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
redguardtoo 2004-08-26
  • 打赏
  • 举报
回复
www.osr.com
不需要使用任何软件

BTW:
只要英文好,会使用google,这些问题都易如反掌。
cziy122 2004-08-03
  • 打赏
  • 举报
回复
感谢你的帮助,我本谢谢了。
会思考的草 2004-08-02
  • 打赏
  • 举报
回复
恩还有不支持wmi,呵呵。
会思考的草 2004-08-02
  • 打赏
  • 举报
回复
安装driverstudio,有一个source to dsp converter。把source文件生成dsp和dsw文件,在vc里头编辑。用driverstudio菜单下的build with ddk BUILD.exe 进行编译。
书推荐《Programming windows driver model》。网上有中文版,最最经典的驱动入门书籍。虽然windows nt不是用wdm,但是windows nt/2000系列的驱动都是非常类似,windows nt用的是kdm,Kernel Driver Model,和WDM相比,仅仅是去掉了电源管理和pnp,其他的,一样。
AthlonxpX86 2004-08-02
  • 打赏
  • 举报
回复
现在谁还用WINNT??
我介绍一下我在WIN2000下开发驱动的方法。

在vc的tools-->options...中设置ddk的标准路经即可,当然了最好把ddk的头文件路径放在第一个位置,至于驱动开发,可以到driverdevelop驱动网上找资料
========================================================
这样不行,还需要设置很多环进变量,即便如此,还是无法使用

装一个driver studio和vc配合使用,非常方便.
===========================================
但是这样编写DDK的例子可能还是有些问题的


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

@echo off
echo Function : 开始2000DDK编译环境设置并编译WDM Driver File
echo on
call F:\NTDDK\bin\setenv.bat F:\NTDDK checked //打开编译器环境设置
f:
cd F:\编程开发\驱动开发\我的作品\filedisk\2003-04-30_FILESRC\sys //转到自己代码目录文件夹
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文件夹,

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

落入凡间的猪 2004-08-01
  • 打赏
  • 举报
回复
http://www.driverdevelop.com/index.php

驱动开发网,里面的论坛非常不错,你可以看看
howtotell 2004-08-01
  • 打赏
  • 举报
回复
装一个driver studio和vc配合使用,非常方便.
flyelf 2004-08-01
  • 打赏
  • 举报
回复
在vc的tools-->options...中设置ddk的标准路经即可,当然了最好把ddk的头文件路径放在第一个位置,至于驱动开发,可以到driverdevelop驱动网上找资料

2,644

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 硬件/系统
社区管理员
  • 硬件/系统社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧