A try to make a program which send mouse and keyboard events to a game under DirectX.

For keyboard it's okay but i cant do the same thing for mouse.
I used sendmessage, postthreadmessage and setwindowshookex without result.

Somebody could help me ?

Posted on 2001-10-08 10:17:30 by hal
Maybe they are using DirectInput for the mouse :tongue: (we do)

If they get the mouse in exclusive mode you can do nothing about it....

Only a VxD or a Interface patch in memory can help you there ...
Posted on 2001-10-10 17:01:13 by BogdanOntanu
Thanks for your reply !

Do you know where i could find this kind of vxd ?

And could you help me about this program ?

Posted on 2001-10-11 02:50:50 by hal
there are very good VxD tutorials at Iczelion's site

i can help you if you get into problems, but i will not do your work :)
Posted on 2001-10-11 14:07:46 by BogdanOntanu
Thanks for all.

I already download tutorial from this site.
But i have no idea of which service to hook, and which vxd.
I work on patching this game.
I have found the part of code controling mouse event : (DIdevice->getstate or something like this sorry i havent directx sdk ;-) ). Results are returned in a struct like this :

Long X
Long Y
Array [0 .. 3] Of Byte.

I have already code a process dynamic patching (with a very unusual method, my own method i'am very proud ;-) ).

So it's nearly finished.
But i will try to make my own VxD later, i would have more time.
Question VxD are for 9x/ME and 2000 ?
Under NT what is the way to do the same thing ?

Thanks a lot.


I apologies for my porr english, but it's not my fault i'am french ;-)
Posted on 2001-10-12 02:06:52 by hal
Under NT/2k/XP, you'll have to write a Kernel Mode Driver, which
is basically a PE file that uses different imports than usually, and
are loaded in a different way :).
Posted on 2001-10-12 11:45:42 by f0dder