Access/VBA Library

lstrcpy

Copies a string to a buffer.

See also: https://msdn.microsoft.com/en-us/library/windows/desktop/ms647490(v=vs.85).aspx

Syntax

lstrcpy( lpString1, lpString2 )
Parameters
Name Type Description
lpString1 Any Required. 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 Any Required. The null-terminated string to be copied.
Return value

Long : If the function succeeds, the return value is a pointer to the buffer.If the function fails, the return value is NULL.

Code
Declare Function lstrcpy Lib "kernel32" (ByVal lpString1 As Any, ByVal lpString2 As Any) As Long

See also

  • CopyStringToClipboard