阅读:1815回复:2
MmGetSystemAddressForMdlSafe的引用就不让我加载驱动
除了2000上要叫MmGetSystemAddressForMdlSafe,98上要叫MmGetSystemAddressForMdl,两个function不同以外,其它的function都相同,如果写一个if去判别在哪种系统之下的话
if (2000) MmGetSystemAddressForMdlSafe(…) Else if (98) MmGetSystemAddressForMdl(…) 又不行,因为98 ntkern.vxd只要一看到有MmGetSystemAddressForMdlSafe的引用就不让我加载驱动。 如果分开编译,则两个os都可以加载驱动。 但是这样我就要维护两个几乎是一模一样源码的驱动 请问我有什么方法可以避免呢? |
|
沙发#
发布于:2004-09-06 16:08
除了2000上要叫MmGetSystemAddressForMdlSafe,98上要叫MmGetSystemAddressForMdl,两个function不同以外,其它的function都相同,如果写一个if去判别在哪种系统之下的话 那你就使用MmGetSystemAddressForMdl好了 |
|
|
板凳#
发布于:2004-09-06 16:26
in ddk
---------------------------------------------------------- The MmGetSystemAddressForMdl routine is obsolete for Microsoft? Windows? 2000 and later, and for Windows Me. It is supported only for WDM drivers that must run on Windows 98. Otherwise use MmGetSystemAddressForMdlSafe. ---------------------------------------------------------- so i think we should use "MmGetSystemAddressForMdlSafe" Thanks for your kindly answer, I had set the answering points to you. My problem had been solved, since i chang the IO method to "IO_BUFFER_IO". |
|