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 .
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 .
:-D
Here is the solution to the problem the API wsprintf
and a small example for others :
.data
buff db 100 dup (0)
string db "Hello %hs man",0
string1 db "Joe",0
.code
start:
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 :)
Here is the solution to the problem the API wsprintf
and a small example for others :
.data
buff db 100 dup (0)
string db "Hello %hs man",0
string1 db "Joe",0
.code
start:
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 :)
Be sure to download Win32.hlp to help you out with your API questions. This goes for anybody. Just google for "Win32.hlp".
PlatformSDK is better - and you can use the online version at http://msdn.microsoft.com if you can't download such a large package.
That is how i found about that API .
I use PlatformSDK .
I use PlatformSDK .
.386
.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
.data
msg1 db 'Hello ',0
msg2 db 'Gangleri',0
msg3 db 13,10,'Nice to meet you!',0
caption db 'szMultiCat example',0
.data?
buffer db 100 dup(?)
.code
start:
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