Skip to content

Latest commit

 

History

History
99 lines (86 loc) · 2.17 KB

nf-winevt-evtclose.md

File metadata and controls

99 lines (86 loc) · 2.17 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:winevt.EvtClose
EvtClose function (winevt.h)
Closes an open handle.
EvtClose
EvtClose function [EventLog]
wes.evtclose
winevt/EvtClose
wes\evtclose.htm
wes
c4b82d7b-508d-45bf-b990-04e90e846525
12/05/2018
EvtClose, EvtClose function [EventLog], wes.evtclose, winevt/EvtClose
winevt.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
Wevtapi.lib
Wevtapi.dll
Windows
19H1
EvtClose
winevt/EvtClose
c++
APIRef
kbSyntax
DllExport
Wevtapi.dll
Ext-MS-Win-WEvtAPI-EventLog-L1-1-0.dll
Ext-MS-Win-WEvtAPI-EventLog-L1-1-1.dll
Ext-MS-Win-WEvtAPI-EventLog-L1-1-2.dll
EvtClose

EvtClose function

-description

Closes an open handle.

-parameters

-param Object [in]

An open event handle to close.

-returns

Return code/value Description
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.