GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Join GitHub todaySign up
Help with any Keylogger. I made 3 versions. posted in Programming: Hello everybody i am tryng to make a keylogg. I got a lot of prototypes but no one works for different problems. I start to think that C is Trolling me. Trying to intercept (by Hex number) all the keys pressed. Permition denied?
Find file Copy path
Cannot retrieve contributors at this time
I'm trying to handle the WM_XBUTTONUP message which is from the extra mouse buttons on some mice. The SDK documentation states that the low word of wParam holds the virtual key information and that the high word holds which button was pressed. I understand how this works in 32bit code, however in 64bit code the wParam is a 64bit unsigned integer. I've seen code that uses Lo(msg.wparam) and Hi(msg.wparam). Does this code still work in 64bits or does something have to change? In other words, does the definition of 'high word' change from 32bit to 64bit?
MarkFMarkF
2 Answers
Any code that uses
Lo() and Hi() is wrong because those functions return the low and high order bytes of a Word .
The MSDN documentation says the following:
Use the following code to get the information in the wParam parameter:
These macros are defined in the header files as:
In turn,
LOWORD and HIWORD are defined as follows:
These macros are designed to perform the correct task when compiled into both 32 bit and 64 bit code.
In Delphi, the David HeffernanDavid Heffernan
Windows unit contains translations of LoWord and HiWord that perform the same tasks, albeit implemented in a somewhat different manner. So I would implement the following functions:
528k3535 gold badges861861 silver badges12521252 bronze badges
You should have shown the code.
Lo and Hi return the low byte and the high byte of a 16-bit value, respectively, so they wouldn't work with 32-bit code, either. Perhaps you meant LoWord and HiWord .
In 64-bit code, you can typecast a 64-bit integer value to
Int64Rec :
case Int64Rec(Msg.WParam).Lo of ...
35.2k22 gold badges5151 silver badges114114 bronze badges
Not the answer you're looking for? Browse other questions tagged delphi32bit-64bit or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |