开发者

Upgrading driver from XP to W7

开发者 https://www.devze.com 2023-03-09 21:01 出处:网络
I\'ve got a driver for a custom PCI card, which builds and runs fine on XP. I\'m trying to use this custom hardware on W7, and am trying to build and run my driver.

I've got a driver for a custom PCI card, which builds and runs fine on XP. I'm trying to use this custom hardware on W7, and am trying to build and run my driver.

I've got the latest DDK from Microsoft, and build my driver for XP using Windows XP "x86 Free Build Environment". Everything installs & works fine. (Build using a DDK "build" command)

If I use the Windows 7 "x86 Free Build Environment" build environment, everything builds fine. I run it through the PREfast and staticdv code checkers, no errors from either. ( I get a couple of warnings about "The dispatch function 'FooFnc' does not have any __drv_dispatchType annotations" - are these likely to be the issue? )

开发者_StackOverflow中文版

When I install, the install starts OK (standard error about drivers not being signed), but gets to a certain point and then hangs, then fails with a timeout error. The device then shows up in device manager as installed. At this point the PC won't shutdown or boot, but hangs indefinitely. I'm forced to boot into Safe Mode and uninstall the driver from there.

So my question(s) are:

  1. If there has been a change in the driver model between XP and W7, what's the best way to find it? I can't see anything on MSDN.

  2. How would I go about debugging the driver? The box doesn't start, so it's not like I can run up WinDBG.

  3. Any specific W7 driver gotchas that are hidden away?

I've tried to keep this as generic as possible, but if more detail would be helpful I'll provide more


AFAIK, the biggest changes have been made in video and network drivers. Other drivers retain backward compatibility and can be run on W7 even with no recompiling.

Run your driver under driver verifier and turn on generating crash dumps with a keyboard (very helpful in case of system hangs, you can manually generate crashdump, analyze it and find what was wrong).

Hope this helps!

0

精彩评论

暂无评论...
验证码 换一张
取 消