EvtClose function

Closes an open handle.

Syntax


BOOL WINAPI EvtClose(
  _In_ EVT_HANDLE Object
);

Parameters

Object [in]

An open event handle to close.

Return value

Return code/valueDescription
TRUE

The function succeeded

FALSE

The function failed. To get the error code, call the GetLastError function.

 

Remarks

You cannot use the handle after the handle is closed. When you close a parent handle, any opened handles that were created using the handle are also closed. For example, if you query for events, the query result contains a handle for each event that matches the query. Best practice suggests that you close each event handle when you are done with the event but if you do not, when you close the query handle, all event handles are also closed.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

WinEvt.h

Library

Wevtapi.lib

DLL

Wevtapi.dll

 

 

Show: