flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tommy 28 Mar 2005, 07:18
if "dword [ecx+4]" is a pointer to a string, use "%s" instead of "%d"... btw: have you passed the argument(s) correctly to showmsg?
|
|||
![]() |
|
coconut 28 Mar 2005, 11:37
yes it is in fact a callback function, so i can assume the parameters will always be correct. lparam holds a structure of dword values, the second member is the one i want to convert to a string and display. perhaps i can just use a dwtoa function?
|
|||
![]() |
|
mike.dld 28 Mar 2005, 12:26
lparam is actually an EQU like EBP+???, but when you call showmsg, ebp value is changed so [lparam] isn't what you expect. You better try to mov lparam to ecx inside wndproc
![]() |
|||
![]() |
|
f0dder 28 Mar 2005, 16:14
Also, remember that the return value of wsprintf is the number of characters written to the buffer, so the msgbox call on the next line will not do what you expect it to. a "dwtoa" or "itoa" function would indeed do the trick, and most likely be faster. If you want hexadecimal output, such a routine can be made very fast.
|
|||
![]() |
|
coconut 28 Mar 2005, 17:35
well actually its a standard windows hook callback, gets called whenever certain mouse/keyboard events occur so i think ebp will be ok. in this case im trying to display a messagebox of the virtual keycode pressed. the KBDLLHOOKSTRUCT.vkCode is at [lparam+4]
f0dder do you have an example of dwtoa or itoa? |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.