The GetEnvironmentStrings function returns the address of the environment block for the current process. This function replaces the GetDOSEnvironment function.
LPVOID GetEnvironmentStrings(VOID)
Parameters
This function has no parameters.
Return Values
The return value is a pointer to an environment block for the current process.
Remarks
Do not use the return value of GetEnvironmentStrings to get or set environment variables. Instead, use the GetEnvironmentVariable and SetEnvironmentVariable functions to access the environment variables within this block. When the block is no longer needed, it should be freed by calling FreeEnvironmentStrings.
A process can use this function's return value to specify the environment address used by the CreateProcess function.
See Also
CreateProcess, GetEnvironmentVariable, SetEnvironmentVariable, FreeEnvironmentStrings