问个关于DDK的问题
如果我要开发2000 和 xp的驱动,是不是必须安装2000 和 xp的两套DDK? 问题点数:20、回复次数:4Top
1 楼BLUETUNE(蓝色旋律)回复于 2006-03-06 10:54:18 得分 5
安装 Windows Server 2003 SP1 DDK ,版本3790.1830, 最新的Windows DDK环境. 包含了2000,XP,2003 以及64-bit系统的驱动开发环境Top
2 楼Featured(我握着爱情的门票静静排队……)回复于 2006-03-09 12:25:39 得分 10
直接回答楼主的问题:
单单安装Win2000的DDK,开发出来的程序必定兼容WinXP的;
单单安装WinXP的DDK,程序中只要没有用到XP的新的NativeAPI,程序也必定兼容于Win2000的。
这里的兼容指的是二进制兼容,也就是文件直接考过去就能用
这些信息来自于WinXPsp1DDK的ReleaseNotes。在安装目录下有。
C:\WINDDK\2600.1106\relnote.htm
部分字段如下:
Building Binary Compatible Drivers
Drivers should typically be built in the build environment of the earliest operating system that the drivers will support. Therefore, a driver that will need to run on Windows 2000 and Windows XP should typically be built within the Windows 2000 build environment.
Some drivers, however, may wish to use additional features that are available on the newer operating system, when they run on that operating system. Such drivers may do this by carefully utilizing functions such as IoIsWdmVersionAvailable() and MmGetSystemRoutineAddress(), or similar technology specific functions.
Extreme care and thorough testing will be required to determine if a driver built for a later operating system will work properly on an earlier operating system. This may not always be possible.
One problem that you may encounter when building a driver in the Windows XP Checked Build Environment, and running that driver on Windows 2000, concerns functions that are only exported by the Windows XP or Windows XP Service Pack 1 version of NTOSKRNL. If your driver calls one of these functions, it may crash or fail to load when run on any platform other than Windows XP or Windows XP Service Pack 1. The Free Build of your driver is not typically affected, as these newly exported functions typically resolve to intrinsics when optimizations are enabled in the Free Build. This problem may be avoided by defining the value USE_LIBCNTPR=1 in your driver's sources file.
Top
3 楼TimiXu(迷途小书僮)回复于 2006-03-09 12:31:08 得分 2
最好还是在不同的BUILD环境下编译。。。Top
4 楼sterrys(sterrys)回复于 2006-03-09 17:08:06 得分 3
为了节省开发费用,通常用2000DDK开发,兼容性交给Microsoft处理了Top




