lstrcpy  1TNGP6V 

The lstrcpy function copies a string to a buffer.

LPTSTR lstrcpy(

    LPTSTR lpString1,

// address of buffer

    LPCTSTR lpString2

// address of string to copy

   );

 

 

Parameters

lpString1

Points to a buffer to receive the contents of the string pointed to by the lpString2 parameter. The buffer must be large enough to contain the string, including the terminating null character.

lpString2

Points to the null-terminated string to be copied.

 

Return Values

If the function succeeds, the return value is a pointer to the buffer.

If the function fails, the return value is NULL. To get extended error information, call GetLastError11C2VS7.

Remarks

With a double-byte character set (DBCS) version of Windows, this function can be used to copy a DBCS string.

See Also

lstrcat, lstrcmp, lstrcmpi, lstrlen