Hi,
I have a legacy kernel-mode device driver which I’m attempting to port to Windows 64-bit. It’s a legacy driver, and was originally built with an older NTDDK. Despite this, it ran nicely under Windows Vista (32-bit) all the way down to Windows 2000.
In order to compile a 64-bit driver, we downloaded the latest ‘public’ DDK that we could find. (We no longer have an MSDN subscription to get the Vista DDK, unfortunately) So this is the Windows 2003 DDK available on MSDN’s site.
After eliminating all the new warnings and dependency issues, we got a 64-bit compilation of the driver. The problem is that the driver won’t start. This is confirmed through System Information utility, and Event Log viewer. I can’t figure out why. The Event Log viewer doesn’t provide much detail. It simply says that the driver failed to start.
Any ideas? Any suggestions on where to start looking?
I’m building the driver through SOURCES and SETENV.BAT set to WNET AMD64 – my first question is if using WNET would actually compile a driver that was usable under Vista? I tried passing WXP AMD64 instead, but this wouldn’t compile, since this version of the DDK does not provide AMD64 libs for WXP. (My second question would be: why is that? Do I need the Vista DDK for that?)
I read somewhere that newer versions of Windows were picky about legacy NT API calls. And so “link /dump /imports mydriver.sys” reports that there is nothing of the sort.
Also, I read that if certain libraries were linked into the driver (such as ntdll.lib) that 64-bit Vista would refuse to load the driver because of this. But SOURCES has TARGETTYPE set to DRIVER, and so the only libs that get linked are the standard ntoskrnl.lib, hal.lib, and wmilib.lib. A “link /dump /depedents mydriver.sys” shows that the only dependency is ntoskrnl.exe. I tried removing that dependency, but found out (real quick) that including that lib was definitely a necesscity. (Removing hal.lib and wmilib.lib made no difference)
Next, I compiled the driver as a regular 32-bit binary with SETENV.BAT set to W2K alone. I did this just to see if the 32-bit driver still worked with the new version of the DDK. And so it does, but at this point I’m not sure where to start looking next.
Any ideas?