Anybody got any code samples?
Posted on 2008-01-03 15:17:58 by mrgone
Well, I did a hotkey editor that converted a VKEY to a string...

GetVKeyString proc uses edi KeyData:DWORD
LOCAL buffer[32] :BYTE

; KeyData holds a virtual key code returned from HKM_GETHOTKEY

mov eax,KeyData

mov KeyCode,al
mov ModCode,ah

movzx eax,KeyCode
.IF eax >= VK_PRIOR && eax <= VK_HELP
mov ExtKey,1
mov ExtKey,0

invoke MapVirtualKeyEx,eax,0,hKBLayout
mov ah,ExtKey
movzx edx,ax
shl edx,16
invoke GetKeyNameText,edx,ADDR buffer,32

mov edi,OFFSET VKeyName
mov ,BYTE PTR "V"
mov ,BYTE PTR "K"
mov ,BYTE PTR "_"
mov ,BYTE PTR 0

invoke lstrcat,OFFSET VKeyName,ADDR buffer

GetVKeyString endp

It's in MASM so it's got to be pretty old but it's an example of usage.

Posted on 2008-01-03 15:53:42 by donkey
  Hey thanks Donkey!  :D I will save the code. Good to see you around. Does Nan get in here anymore? Hey, Happy New Year!
Posted on 2008-01-04 17:18:12 by mrgone
Happy new year to you too mrgone, haven't heard from NaN for a bit but I think he still pops in from time to time.

Posted on 2008-01-05 04:36:38 by donkey

Does Nan get in here anymore? Hey, Happy New Year!

Within my last communications with NaN, he is almost entirely out of the assembly scene now as he is busy with other life related things.

Posted on 2008-01-05 11:35:03 by madprgmr
He'll be back. He will wake up one night in cold sweats with code racing through his head from the program he was sleep writing. That he will moan & bewail how he misses arguing with fodder.

Sorry fodder, I just used you because you love to engage an open debate.
Posted on 2008-01-06 19:14:23 by mrgone