CompuServe Messages

GetEnvString() prob.

    09-Aug-93 08:21:19
Fm: Arun Rele 71155,321
To: Lee Hart [Microsoft] 76150,2536
I use GetEnvironmentString() to be able to show the user what special options for the program are set, since there are 50+ different variables that may or may not be set. It would be nice to be able to display all currently set variables without having to use brute force and test each one individually. The values of the environment variables are not obtained from the GetEnvironmentString() call; I use getenv() to do that. Basically, I would like a way to display the table of all currently set environment variables under Win32s and NT. GetEnvironmentString() seems to be the only API call that fits the bill, but as I stated earlier, it does not seem to be functioning correctly under Win32s. Variables that are supposedly not present according to the table returned by GetEnvironmentString() are in fact set by checking their values with getenv(). This leads me to believe there is a problem with this API call. Would using SetEnvironmentVariable() possibly help any, or does getenv() simply map to this? TIA, Arun.