Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Port 32-Bit Windows driver to 64-Bit Windows

Since our applications run in fullscreen mode, we have developed a keyboard hooking driver to disable user input for keys like ALT+F4, CTRL+ALT+DEL and so forth.

The driver is developed in C using the Windows Driver Kit.

Compiling for 32-Bit works and it loads the driver on Windos 7 32-Bit and it works as expected.

Compiling for 64-Bit works and it just doesn't load the driver on Windows 7 64-bit (but is signed and listed in the keyboard drivers).

Following are our SetEnv settings:

setenv c:\WinDDK\7600.16385.1 fre x64

Is there anything I'm missing?

Do I need to make specific changes to the code to make it work on 64-Bit?

like image 448
Faizan S. Avatar asked Jul 05 '10 13:07

Faizan S.


1 Answers

The build option looks correct. You wouldn't need to make changes to the code unless the code makes assumptions about things like the size of pointers, integers etc. Scripts that "install" drivers by mucking with the registry etc. may not work.

Drivers in Win7 64 bit need to be either WHQL test signed by Microsoft, test signed by yourself, or signed with a trusted certificate.

The first just installs. The second requires booting with the test signing configuration option. The third will display a warning when you install asking you whether or not you trust the provider.

Normally during development you'd test sign the driver: MSDN instructions on test signing a driver package

like image 173
Guy Sirton Avatar answered Oct 03 '22 08:10

Guy Sirton