Platform SDK: DLLs, Processes, and Threads |
The GetEnvironmentStrings function retrieves the environment block for the current process.
LPVOID GetEnvironmentStrings(VOID);
This function has no parameters.
The return value is a pointer to an environment block for the current process.
The GetEnvironmentStrings function returns a pointer to the environment block of the calling process. This should be treated as a read-only block; do not modify it directly. Instead, use the GetEnvironmentVariable and SetEnvironmentVariable functions to retrieve or change 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.
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Kernel32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.
Processes and Threads Overview, Process and Thread Functions, CreateProcess, GetEnvironmentVariable, SetEnvironmentVariable, FreeEnvironmentStrings