The FreeEnvironmentStrings function frees a block of environment strings.
BOOL FreeEnvironmentStrings(
LPTSTR lpszEnvironmentBlock // pointer to a block of environment
// strings
);
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero To get extended error information, call GetLastError.
When GetEnvironmentStrings is called, it allocates memory for a block of environment strings. When the block is no longer needed, it should be freed by calling FreeEnvironmentStrings.
Windows NT: Requires version 3.5 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winbase.h.
Import Library: Use kernel32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
Processes and Threads Overview, Process and Thread Functions, GetEnvironmentStrings