Skip to content

Latest commit

 

History

History
89 lines (65 loc) · 2.74 KB

nf-winevt-evtopenlog.md

File metadata and controls

89 lines (65 loc) · 2.74 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.EvtOpenLog
EvtOpenLog function (winevt.h)
Gets a handle to a channel or log file that you can then use to get information about the channel or log file.
EvtOpenLog
EvtOpenLog function [EventLog]
wes.evtopenlog
winevt/EvtOpenLog
wes\evtopenlog.htm
wes
1bf81452-2a62-4999-91b1-f1b42e6db91f
12/05/2018
EvtOpenLog, EvtOpenLog function [EventLog], wes.evtopenlog, winevt/EvtOpenLog
winevt.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
Wevtapi.lib
Wevtapi.dll
Windows
19H1
EvtOpenLog
winevt/EvtOpenLog
c++
APIRef
kbSyntax
DllExport
Wevtapi.dll
EvtOpenLog

EvtOpenLog function

-description

Gets a handle to a channel or log file that you can then use to get information about the channel or log file.

-parameters

-param Session [in]

A remote session handle that the EvtOpenSession function returns. Set to NULL to open a channel or log on the local computer.

-param Path [in]

The name of the channel or the full path to the exported log file.

-param Flags [in]

A flag that determines whether the Path parameter points to a log file or channel. For possible values, see the EVT_OPEN_LOG_FLAGS enumeration.

-returns

If successful, the function returns a handle to the file or channel; otherwise, NULL. If NULL, call GetLastError function to get the error code.

-remarks

Relative paths and environment variables cannot be used when specifying a file. A Universal Naming Convention (UNC) path can be used to locate the file. Any relative path and environment variable expansion needs to be done prior to making API calls.

To get information about the channel or log file, call the EvtGetLogInfo function.

-see-also

EvtClearLog

EvtExportLog

EvtGetLogInfo