hi all, could someone explain the differeces between these 3 sintaxes ? Heve these routines the same functions inside ? Where can i get some documents ? THX
angelo, sprintf is the 'classic' C run time library routine, which was the first, then windows 3.1 appeared, and it wasn't compatible, with windows 16 bit code (it got upset by the fact memory could move around, they caused all sorts of nightmares in Windows 3.1, so MS invented HANDLES to memory instead of addresses, this is why we still have handles today, but they are used in a different way) so wsprintf was created to be compatible. _sprintf - I don't know to be honest, I would guess that it's so you can call an ANSI routine from UNICODE programs... if you want, most operations seem to have _... methods umbongo
Hi! _sprintf and sprintf are standard C functions (they came from the standard lib), while wsprintf is Win32 specific, since its exported by kernel32.dll. wsprintf is useful, because if you are working in asm, you cannot use sprintf, and since sprintf is a very useful function, you can import wsprintf from kernel32. You can get some info by looking at msdn, there you'll find everything. Bye! Quake2
_sprintf is a decorated name, usually anything with an underscore before it is a decorated C name, don't use it yourself, MASM will put it in if you declare a PROC (or PROTO) as language C. So _sprintf, and sprintf are identical. wsprintf is the same as sprintf execept it can convert to and from UNICODE strings. It is also provided as a part of the API, so you don't have to statically link it to your program. Mirno
THANX TO ALL seems that wsprintf is not the same of sprintf: with sprintf i'm using "%f" format (floating) but in wsprintf help i can't see this "f" format. Is that wsprint can't translate to floating ?