Beginners help - Mouse/Key hooking

c++ / delphi package - dll injection and api hooking
Post Reply
Soulprayer
Posts: 1
Joined: Sun Apr 30, 2006 8:21 pm
Location: Cologne, Germany

Beginners help - Mouse/Key hooking

Post by Soulprayer »

Greetings,

First, i want to offer you some information what i want to code making it easier understanding my goal:

I have two screens, the left one with my jabber-messenger PSI and other messaging tools like IRC (my interactive Screen=IS) and on the right is my playing screen (=PS). Because i dislike the 'feature' playing in windowed mode, i try to figure out, if i can switch the mouse layer from game to winxp and back.

So, as an example:
I am just playing 'Tomb Raider 7' when somebody calls me over PSI, if i wanna go to cinema this evening. So I press my configured key (particularly "Scroll Lock") to release my mouse to windows (perhaps with pre-configured x/y coordinates, that i easily get into IS) to respond to my friend.
On PS the game goes on just normally (so - in fact - it isn't minimized!) and i can react on unexpected situations in the game easily by pressing my Scroll Lock again to get back to the game instantly when hostile targets attack.

You see, i wanna try to code this, but i haven't not much experience.
I've build some dotNET stuff to access databases and statistic purposes, but i haven't done anything similar to this project so far.

I like to know two things:

First, is it too much of overkill to hook the event of keypressing?
I mean, would the game run slower when the hook-code of keypressing always evaluates, if i pressed 'Scroll lock' or not (especially in battles) ?

Secondly, is it safe to remove the mouse from a fullscreen game over time so far?
I think, would the game crash or get instable when there is suddenly no mouse pointer in the opengl/directX drawing scene anymore ?!

Like i said, i have little knowledge in this field of application.
I appreciate every help you can provide me.
And, if there are any mistakes in my English, please let me know ;)

Big thanks in advance!
Post Reply