flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tommy
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
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
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
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
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.