Let's say I have this string :

Helo Your name is (here goes the name). Nice to meet you !

Now Is there easy way to add string in to a string ?

I always use the lstrcat metod

First I break the string in two ,than I make a buffer add the first string ,add
the name string and add the second string . But that seems too lame .
Posted on 2004-09-25 02:36:17 by Gangleri

Here is the solution to the problem the API wsprintf

and a small example for others :

buff db 100 dup (0)
string db "Hello %hs man",0
string1 db "Joe",0
lea edi,string1
invoke wsprintf,addr buff,addr string,edi
invoke MessageBox,0,addr buff,0,MB_OK
invoke ExitProcess,0
end start

This time i'm not going to need your help :)
Posted on 2004-09-25 03:13:06 by Gangleri
Be sure to download Win32.hlp to help you out with your API questions. This goes for anybody. Just google for "Win32.hlp".
Posted on 2004-09-25 12:39:56 by yo|dude|mon
PlatformSDK is better - and you can use the online version at http://msdn.microsoft.com if you can't download such a large package.
Posted on 2004-09-25 12:46:43 by f0dder
That is how i found about that API .
I use PlatformSDK .
Posted on 2004-09-25 13:51:20 by Gangleri

.model flat,stdcall
option casemap:none

include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\user32.inc
include \masm32\include\masm32.inc

includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\masm32.lib

msg1 db 'Hello ',0
msg2 db 'Gangleri',0
msg3 db 13,10,'Nice to meet you!',0
caption db 'szMultiCat example',0

buffer db 100 dup(?)

invoke szMultiCat,3,ADDR buffer,ADDR msg1,ADDR msg2,ADDR msg3
invoke MessageBox,0,ADDR buffer,ADDR caption,MB_OK
invoke ExitProcess,0
END start
Posted on 2004-09-25 16:38:38 by Vortex