Replaces several folder names in a fully qualified path with their associated system environment string.
Syntax
BOOL WINAPI PathUnExpandEnvStringsForUserW (
HANDLE hUserToken,
LPCWSTR pwszPath,
LPWSTR pwszBuf,
UINT cchBuf
)
Parameters
- hUserToken
- Token for the user, it must have TOKEN_IMPERSONATE and TOKEN_QUERY access.
- pwszPath
- A null terminated path to be unexpanded
- pwszBuf
- A pointer to a buffer that receives the unexpanded string
- cchBuf
- The number of characters in pwszBuf
Return Value
Returns TRUE if successful, FALSE if not.
Remarks
If hUserToken is NULL, the function behaves exactly as PathUnExpandEnvStrings.
This function is the same as PathUnExpandEnvStrings except that it only unexpands variables in the users environment block (those expanded by ExpandEnvironmentStringsForUser(hUserToken, ...)).
This function is also known as _PathUnExpandEnvStringsForUserW@16.