FreeEnvironmentStrings function
Frees a block of environment strings.
Syntax
BOOL WINAPI FreeEnvironmentStrings( _In_ LPTCH lpszEnvironmentBlock );
Parameters
- lpszEnvironmentBlock [in]
-
A pointer to a block of environment strings. The pointer to the block must be obtained by calling the GetEnvironmentStrings function.
Return value
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.
Remarks
If you used the ANSI version of GetEnvironmentStrings, be sure to use the ANSI version of FreeEnvironmentStrings. Similarly, if you used the Unicode version of GetEnvironmentStrings, be sure to use the Unicode version of FreeEnvironmentStrings.
Examples
For an example, see Changing Environment Variables.
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
FreeEnvironmentStringsW (Unicode) and FreeEnvironmentStringsA (ANSI) |
See also