FreeEnvironmentStrings function
Applies to: desktop apps only
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 |
|---|---|
|
Minimum supported server | Windows Server 2003 |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names | FreeEnvironmentStringsW (Unicode) and FreeEnvironmentStringsA (ANSI) |
See also
Send comments about this topic to Microsoft
Build date: 3/7/2012