views:

305

answers:

2

I have a pretty generic 64bit driver based on bulkusb.sys in WDK. It's been working for years with an embedded program, but now it is needed to work on Vista 64. From all the documentation I've tried to look through there doesn't seem to be anything affecting it, except compiling it for the 64bit environment, and yet when I compile it with the AMD64 build environment, I get "driver not intended for this platform" error message when it's trying to open the sys.

What could be the solution for this?

Update: What exactly do you mean by "trying to open the sys"? In the log, when it tries to run the sys file of the driver(not error in the inf) it fails. What WDK version are you using? 7600.16385.0

Are both building and trying to deploy on the same Vista x64 machine? No, I'm building on 32bit xp, but I don't see how it matters, since I use the correct build environment.

Is your driver signed with a cross-signed certificate? No, I've tried enabling unsigned drivers, and it didn't help, but I'm also not sure what will be going on with this subject at all, and if you can give me some info on that as well, it will be welcome.

Is the right build environment chosen (chk/fre/amd64/win2k)? I've used chk-vista-amd64. Since it's for vista 64bit...

A: 

If your code are based on bulkusb.sys in WDK, you should just try to compile the code of Bulk USB device driver for Intel 82930 USB test board included in C:\WinDDK\7600.16385.1\src\usb\usbsamp\sys of WinDDK. Then if it could be started in your environment, try to compare the code from WinDDK which you used (for yeas) as a template of your driver with the current version of usbsamp from WinDDK 7600.16385.1. You will see which changes where made in usbsamp. Probably the same changes you should do in your program.

I could not give more exact answer, because I am trying to find an error in a code which I don't see. It seems to me not easy.

Oleg
A: 

Make sure that you're removing the copy of the driver in

%WinDir%\System32\DriverStore

Because otherwise newer versions of the driver that you try to install on the system won't be used. There are 2 ways to do this:

1) Plug-in your device and install the incorrect driver, and remove using Device manager, but when removing, use the mouse-menu and not the delete key, and check the box about "removing the driver"

2) Locate the OEM##.inf file corresponding to your driver in %WinDir%\Inf. using an elevated command line windows (i.e. Run as Admin) use

pnputil -d oem##.inf

Now you can install the new version of your driver.

SurDin