This allows the code to give a last chance for expanding the string.
And if it still fails, we bail out as expected and the caller will
take appropriate actions.
As a by-product, this commit (together with the previous one e2960914)
fixes the regression CORE-14981 (Quick-Launch bar couldn't be opened
in LiveCD).
- Fix a regression introduced in r65415 (1795a3bf) where the directory
paths stored in "Windows\CurrentVersion\Explorer\User Shell Folders"
were stored in expanded format instead of in unexpanded format:
_SHGetDefaultValue() *MUST* return unexpanded paths by design!!
- Augment _SHExpandEnvironmentStrings() and _SHGetUserShellFolderPath()
to take a user token handle to be able to correctly resolve/expand
user-specific directory paths.
- Fix _SHExpandEnvironmentStrings() so that it always retrieve the
correct current user / all-users directory paths by calling userenv
functions, instead of hardcoding a broken logic. As a result this
removes the "C:\Documents and Settings\SYSTEM" ghost directory we got
during ReactOS installation.
- Delimit the changes with respect to Wine by #if(n)def __REACTOS__ .
on 32bit builds CSIDL_PROGRAM_FILESX86 is treated as CSIDL_PROGRAM_FILES and on wow64 builds CSIDL_PROGRAM_FILES gets treated as CSIDL_PROGRAM_FILESX86