Group: Shell Lightweight Utility APIs -- string functions - Library: shlwapi
StrDup returns a pointer to the duplicate of a source VFP string
Using Common Controls: the Header Control
LPTSTR StrDup(
LPCTSTR lpsz
);
DECLARE INTEGER StrDup IN shlwapi;
STRING lpsz
lpsz [in] Pointer to a constant null-terminated character string.
Returns the address of the string that was copied, or NULL if the string cannot be copied.
MSDN: this function uses LocalAlloc to allocate storage space for the copy of the string. The calling application must free this memory by calling the LocalFree function on the pointer returned by the call to StrDup.
StrDup will allocate storage the size of the original string. If storage allocation is successful, the original string is copied to the duplicate string.