EvtClose function (winevt.h)
Closes an open handle.
Syntax
BOOL EvtClose(
[in] EVT_HANDLE Object
);
Parameters
[in] Object
An open event handle to close.
Return value
Return code/value | Description |
---|---|
|
The function succeeded |
|
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
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | winevt.h |
Library | Wevtapi.lib |
DLL | Wevtapi.dll |
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: Under hela 2024 kommer vi att fasa ut GitHub-problem som feedbackmekanism för innehåll och ersätta det med ett nytt feedbacksystem. Mer information finns i:Skicka och visa feedback för