I would like to ask you, if there is any possibility of simulating keypress through assembler?
I've read lots of stuff on the net, but didn't found any code. I've heard of something like INT16 interrupt, but never wrote any code in assembler. (Just some stupid /add/ calls)
...? ;want to do a keypress here, but how?
The reason why I need to use assembler calls is that keyb_event() function is being ignored by GameGuards (or maybe it's because of DirectInput in games?).
Please, give me some hints. Can't sleep before I'm done
I guess calling int 16h interrupt won't work on 32 bit system/compiler.
Is there any way around to do the 16h interrupt under VS? I'm thinking also about the MASM compiler and writing my windows hook there.
Or maybe there is another way to simulate keypress on the lowest possible level?
I agree to S_M_A that hooking actually may not even be required here and would have thought of somthing like SendInput() in the first place too.
Also, provided you actually need hooking, that can be done pretty well in C++ without the need to use assembly language at all. If, however, for some reason you really want assembly language, here's a thread discussing recording and playback of keystrokes using jounal hooks in assembly language: http://forums.codeguru.com/showthread.php?t=513274. The Windows programms in there are pure assembly language without any C or C++ components, but at least they should illustrate the underlying idea.
As to INT 16h, if that is of any use under 32-bit Windows at all, it would at best be useful for keyboard drivers. But actually, I think, not even those can use it in a reasonable way since it's legacy 16-bit stuff. And, for completeness, note that in order to simulate keystrokes you wouldn't call that interrupt, instead you would override it, which actually is somewhat similar to Windows hooks.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.