DestroyEnvironmentBlock function

Frees environment variables created by the CreateEnvironmentBlock function.

Syntax

BOOL DestroyEnvironmentBlock(
  LPVOID lpEnvironment
);

Parameters

lpEnvironment

Type: LPVOID

Pointer to the environment block created by CreateEnvironmentBlock. The environment block is an array of null-terminated Unicode strings. The list ends with two nulls (\0\0).

Return Value

Type: BOOL

TRUE if successful; otherwise, FALSE. To get extended error information, call GetLastError.

Requirements

   
Windows version Windows 2000 Professional [desktop apps only] Windows 2000 Server [desktop apps only]
Target Platform Windows
Header userenv.h
Library Userenv.lib
DLL Userenv.dll

See Also

CreateEnvironmentBlock

User Profiles Overview

User Profiles Reference