SymCleanup Function

Debug Help Library

SymCleanup Function

Deallocates all resources associated with the process handle.

BOOL WINAPI SymCleanup(
  __in          HANDLE hProcess
);

Parameters

hProcess

A handle to the process that was originally passed to the SymInitialize function.

Return Value

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE. To retrieve extended error information, call GetLastError.

Remarks

This function frees all resources associated with the process handle. Failure to call this function causes memory and resource leaks in the calling application

All DbgHelp functions, such as this one, are single threaded. Therefore, calls from more than one thread to this function will likely result in unexpected behavior or memory corruption. To avoid this, call SymInitialize only when your process starts and SymCleanup only when your process ends. It is not necessary for each thread in the process to call these functions.

Example Code

For an example, see Terminating the Symbol Handler.

Requirements

Redistributable

Requires DbgHelp.dll 5.1 or later.

Header

Declared in Dbghelp.h.

Library

Use Dbghelp.lib.

DLL

Requires Dbghelp.dll.

See Also

DbgHelp FunctionsSymInitialize


Send comments about this topic to Microsoft

Build date: 9/25/2007

© 2007 Microsoft Corporation. All rights reserved.