SHExpandEnvironmentStringsAlloc

Go to Home Page

Allocates memory and expands environment strings into it

Syntax

HRESULT WINAPI SHExpandEnvironmentStringsAlloc (
    LPCWSTR pwszExpandableString,
    LPWSTR* ppwszExpanded
)

Parameters

pwszExpandableString
Wide string containing environment variables to expand
ppwszExpanded
A pointer to a pointer that receives the expanded string. The pointer must be freed with CoTaskMemFree when no longer required.

Return Value

S_OK on success, HRESULT_FROM_WIN32(GetLastError()) on failure

Remarks

This function is also known as _SHExpandEnvironmentStringsAlloc@8.