DeleteLogByHandle function

Marks the specified log for deletion. The log is actually deleted when all handles, marshaling areas, and read contexts to the log are closed. If the log is a physical log, its underlying containers are deleted.

When a log is marked for deletion, requests to open new client log streams fail.

Note  This function differs from DeleteLogFile, because it takes a valid open handle to the log object instead of the log name.

Syntax


BOOL WINAPI DeleteLogByHandle(
  _In_  HANDLE hLog
);

Parameters

hLog [in]

A handle to an open log that is obtained by a successful call to CreateLogFile. The log must have been created with DELETE access or you cannot delete the log.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero (0). To get extended error information, call GetLastError. The following list identifies the possible error codes:

ERROR_ACCESS_DENIED
ERROR_INVALID_HANDLE
ERROR_INVALID_PARAMETER

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 R2 [desktop apps only]

Header

Clfsw32.h

Library

Clfsw32.lib

DLL

Clfsw32.dll

See also

Common Log File System Functions
CreateLogFile
DeleteLogFile

 

 

Community Additions

ADD
Show:
© 2014 Microsoft