I need help again

I try to use this : invoke lstrcat, ADDR buffer, ADDR zrstr

In the buffer "Fernand" and i try to insert a zero terminator at the end of Fernand :tongue:
Posted on 2003-01-28 12:53:23 by Fernand
is buffer NUL terminated? If not, then it will fail because lstrcat searches for the NUL terminator to find the end of the string.
Posted on 2003-01-28 13:02:12 by stormix
Straight off the top of my head, you zero the buffer first.


mov esi, offset buffer
mov DWORD PTR [esi], 0

Then you can append what you like to the end of it as long as each string is zero terminated.

Regards,

hutch@movsd.com
Posted on 2003-01-29 04:38:18 by hutch--
geez. you're an assembly coder and you do wasteful code like that?
"mov byte ptr , 0" will suffice for ASCIZ strings.
Posted on 2003-01-29 06:22:00 by f0dder
f0dder, hutch-- and Cie thanks for your help....

I know, my code is wasteful but I try to learn it....I am just a beginner in asm...:confused:
Posted on 2003-01-29 08:49:39 by Fernand
fernand I was poking hutch, not you :)
Posted on 2003-01-29 08:53:06 by f0dder
Fernand,

You can try also my example for strcat.

http://www.asmcommunity.net/board/index.php?topic=10389&highlight=strcat

Regards,

Vortex
Posted on 2003-01-29 09:51:45 by Vortex
Never mind Fernand, I am used to f0dder's effervescent wit.

Regards,

hutch@movsd.com
Posted on 2003-01-30 01:51:13 by hutch--
:)
Posted on 2003-01-30 01:53:07 by f0dder