I'm writing an API hooking utility. It allows me to hook any API within any running process. Currently it only displays a message indicating that the API was invoked. However, I want to display the API parameters, which means displaying values from the call stack.

My problem is how exactly do I display a 32-bit number in an editbox, given that the editbox is designed for displaying ASCII characters ?

Now I've worked out that a single digit number (i.e. 7) can be converted to its ASCII equivalent (i.e. "7") by adding the decimal value 48. However, writing a routine to do this for an entire dword doesn't sound like a fun way to spend a Friday night !

Are there any cunning shortcut ways of doing this convertion, perhaps a nice little API ?

justAnotherLostSoul :)
Posted on 2003-02-28 14:34:35 by JustanotherLostSoul
you can find all this stuff in masm32 package
just donload it!(if you don't already haven't it)
In masm32 installation directory are folder m32lib, there are the routines you want...
Posted on 2003-02-28 14:55:02 by Hurtado
wsprintf maybe?

Or you can use the functions in masm32.lib like the previous poster said.
Posted on 2003-02-28 15:05:03 by Will
Look around for dwtoa functions on the algorithm sections of the forums.
Posted on 2003-03-01 06:35:31 by roticv
Posted on 2003-03-06 15:23:50 by JustanotherLostSoul
when using C calling convention routines don't forget to adjust your stack pointer,wsprintf is such a routine.

so you'd need

Posted on 2003-03-06 15:26:37 by Hiroshimator