_lstrcpyn

include vmm.inc

cld
VMMCall _lstrcpyn, <OFFSET32 pszDst, OFFSET32 pszSrc, dwBufSize> 
mov     pszDst, eax
mov     cbUnused, ecx
mov     pszNull, edx
 

Copies a zero-terminated ASCII string to a sized buffer. Uses the C calling convention. Uses EAX, ECX, EDX, and Flags. The direction flag must be clear.

EAX Address of the destination buffer.
ECX Number of unused bytes in the buffer, not including the terminating null character.
EDX Address of the terminating null byte in the destination buffer.

pszDst
Address of destination buffer.
pszSrc
Address of source buffer.
dwBufSize
Size, in bytes, of the destination buffer. Set this parameter to – 1 if the size is unlimited.

If the destination buffer is larger than the source string, the unused portion of the buffer is not padded with null characters. If the destination buffer is smaller than the source string (dwBufSize - 1), characters from the source string are copied, followed by a (premature) terminating null character. If dwBufSize is set to zero, no bytes are copied to the destination buffer.

Setting pszSrc to zero is equivalent to specifying a null source string. This service accesses only bytes from pszSrc that are copied. If the destination buffer fills before the end of the source buffer is reached, the remaining bytes of the source buffer are not accessed.

The source and destination buffers must not overlap. This is an asynchronous service.