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. |
|
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 |
|
|
|
|
|
|
Closes an open handle.
An open event handle to close.
Return code/value | Description |
---|---|
|
The function succeeded |
|
The function failed. To get the error code, call the GetLastError function. |
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.