Evgenios1 Δημοσ. 16 Δεκεμβρίου 2009 Δημοσ. 16 Δεκεμβρίου 2009 Πως γινετε να αλλαξω τα κουμπια απο το πληκτρολογιο, για ενα συγκεκριμενο προγραμμα. Πχ να παταω το "T" και το προγρμμα να λαμβανει το "Q". Τωρα εχω κανει μια προχειρη δουλεια με hooking, αλλα το θεμα ειναι οτι οταν παταω πχ το "T" με το hooking το μονο που καταφερνω ειναι το προγραμμα να λαβει "T" και μετα "Q".
bxenos Δημοσ. 16 Δεκεμβρίου 2009 Δημοσ. 16 Δεκεμβρίου 2009 (ψαχτήρι κωδικών ξάχνεις ) http://support.microsoft.com/kb/33690 NOTE: In the discussion below, ignore the references to the WH_CALLWNDPROC hook for Win32-based applications. Win32 does not allow an application to change the message in a CallWndProc, as 16-bit Windows does. To change the value of wParam (and hence the character message that is received by the window with the focus), you must install the WM_GETMESSAGE and WH_CALLWNDPROC hooks. The WH_GETMESSAGE hook traps all messages retrieved via GetMessage() or PeekMessage(). This is the way actual keyboard events are received: the message is placed in the queue by Windows and the application retrieves it via GetMessage() or PeekMessage(). However, because applications can send keyboard messages with SendMessage(), it is best to also install the WH_CALLWNDPROC hook. This hook traps messages sent to a window via SendMessage(). These hooks pass you the address of the message structure so you can change it. In Windows 3.0, when you return DefHookProc() within a WH_GETMESSAGE or WH_CALLWNDPROC hook procedure, you are passing the address of the (potentially altered) contents of the message structure on to the next hook function in the chain. In Windows 3.1 and Win32, you should use the CallNextHookEx() function to pass the hook information to the next hook function. If you alter the wParam before passing on the message, this will change the character message eventually received by the application with the focus. NOTE: For Windows 3.0, keep in mind that the hook callback procedure must be placed in a DLL with fixed code so that it will be below the EMS line and thus will always be present. If the hook callback procedure is not in a fixed code segment, it could be banked out when it is called, and this would crash the system. System-wide hooks in Windows 3.1 and in Win32, however, must still reside in a DLL.
zozeo Δημοσ. 16 Δεκεμβρίου 2009 Δημοσ. 16 Δεκεμβρίου 2009 Οπως ειπε και ο φιλος bxenos αυτο δεν θα το καταφερεις. Θα χρειαστεί να πας σε πιο low level λυσεις οπως καπιο exploit για να παρεις την διευθηνση στην μνημη του param και να αλλαξεις την τιμή του.
Evgenios1 Δημοσ. 16 Δεκεμβρίου 2009 Μέλος Δημοσ. 16 Δεκεμβρίου 2009 (ψαχτήρι κωδικών ξάχνεις ) Οχι. Εξαλλου αν ειναι να ψαξω καποιο κωδιακο, η λυση ειναι μια. RAW socket!!! Το θελω για ενα παιχνιδι (DotA)
Προτεινόμενες αναρτήσεις
Αρχειοθετημένο
Αυτό το θέμα έχει αρχειοθετηθεί και είναι κλειστό για περαιτέρω απαντήσεις.