Group: System Information - Library: kernel32
Converting path to original case
One more way to retrieve environment strings
DWORD ExpandEnvironmentStrings(
LPCTSTR lpSrc, // string with envir.variables
LPTSTR lpDst, // string with expanded strings
DWORD nSize // max. characters in expanded string
);
DECLARE INTEGER ExpandEnvironmentStrings IN kernel32;
STRING lpSrc,;
STRING @ lpDst,;
INTEGER nSize
lpSrc [in] Pointer to a null-terminated string that contains environment-variable strings of the form: %variableName%.
lpDst [out] Pointer to a buffer to receive a copy of the source buffer after all environment-variable name substitutions have been performed.
nSize [in] Specifies the maximum number of TCHARs that can be stored in the buffer pointed to by the lpDst parameter, including the terminating null character.
If the function succeeds, the return value is the number of TCHARs stored in the destination buffer, including the terminating null character.
See also GetEnvironmentStrings, GetSystemInfo.