
please wait
A sure fire way would be to write a Virtual Device Driver (VxD) that inserts key strokes directly into the keyboard buffer, fooling DirectInput. Another way, like you said, is to write a DLL that injects code into the DirectInput memory space. Looking through the Microsoft DDK, there are examples of custom VxD files. Under keyb\samples\Vkxd\ there is an example of an easy keyboard emulation VxD. But that might be outdated. DirectInput deals directly with the keyboard buffer (and other devices) and completely ignores all input that has been passed through windows and converted into WM_* messages. So any sort of WM_* simulation will not work. |