You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment variables in general should probably be checked a bit closer. GetEnvironmentVariableW might behave slightly differently on old Windows versions.
MSDN VC6:
If the function succeeds, the return value is the number of characters stored into the buffer pointed to by lpBuffer, not including the terminating null character.
If the specified environment variable name was not found in the environment block for the current process, the return value is zero.
If the buffer pointed to by lpBuffer is not large enough, the return value is the buffer size, in characters, required to hold the value string and its terminating null character.
MSDN 2005:
If the function succeeds, the return value is the number of characters stored in the buffer pointed to by lpBuffer, not including the terminating null character.
If lpBuffer is not large enough to hold the data, the return value is the buffer size, in characters, required to hold the string and its terminating null character.
If the function fails, the return value is zero. If the specified environment variable was not found in the environment block, GetLastError returns ERROR_ENVVAR_NOT_FOUND.
It might be that ERROR_ENVVAR_NOT_FOUND didn't exist yet. On NT 3.51, HOME/USERPROFILE didn't exist yet, but HOMEDRIVE (only drive letter) and HOMEPATH do.
The text was updated successfully, but these errors were encountered:
Environment variables in general should probably be checked a bit closer.
GetEnvironmentVariableW
might behave slightly differently on old Windows versions.MSDN VC6:
MSDN 2005:
It might be that
ERROR_ENVVAR_NOT_FOUND
didn't exist yet. On NT 3.51,HOME
/USERPROFILE
didn't exist yet, butHOMEDRIVE
(only drive letter) andHOMEPATH
do.The text was updated successfully, but these errors were encountered: