ResUtilExpandEnvironmentStrings function (resapi.h)
Expands strings containing unexpanded references to environment variables. The PRESUTIL_EXPAND_ENVIRONMENT_STRINGS type defines a pointer to this function.
Syntax
LPWSTR ResUtilExpandEnvironmentStrings(
[in] LPCWSTR pszSrc
);
Parameters
[in] pszSrc
Pointer to a null-terminated Unicode string containing unexpanded references to environment variables (an expandable string).
Return value
If the operation succeeds, the function returns a pointer to the expanded string (REG_EXPAND_SZ). The function allocates the necessary memory with LocalAlloc. To prevent memory leaks, be sure to release the memory with LocalFree.
If the operation fails, the function returns NULL. For more information, call GetLastError.
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows Server 2008 Enterprise, Windows Server 2008 Datacenter |
Target Platform | Windows |
Header | resapi.h |
Library | ResUtils.lib |
DLL | ResUtils.dll |