SHLocalStrDupA function

Makes a copy of a string in newly allocated memory.

Syntax

HRESULT SHLocalStrDupA(
  PCSTR psz,
  PSTR  *ppsz
);

Parameters

psz

Type: PCTSTR

A pointer to a null-terminated, Unicode string to be copied.

ppsz

Type: PTSTR*

The address of a pointer to an allocated string that, when this function returns successfully, receives the result. SHLocalStrDup allocates memory for this string with LocalAlloc. You should free the string with LocalFree when it is no longer needed.

Return Value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

   
Windows version Windows Vista [desktop apps only] Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shlwapi.h