EventLogWrappers v1.07
Welcome to EventLogWrappers, A collection of freeware C++ classes to encapsulate the
new Event Log API available in Windows Vista or later.
Usage
- Depending on the classes you want to use, you include "EventLogClient.h"
or "EventLogProvider.h" in
which ever module requires it in your project.
- The classes are designed for VC 2017 or later. They will not
compile on earlier releases of VC.
- The sample app included in the download is a VC 2017 console app which
demonstrates all the various classes functionality.
- The code is UNICODE enabled and build configurations are provided for in the
sample app.
Copyright
- You are allowed to include the source code in any product (commercial, shareware,
freeware or otherwise) when your product is released in binary form.
- You are allowed to modify the source code in any way you want except you
cannot modify the copyright details at the top of each module.
- If you want to distribute source code with your application, then you are
only allowed to distribute versions released by the author. This is to maintain
a single distribution point for the source code.
History
v1.07 (15 May 2023)
- Updated copyright details
- Updated modules to indicate that it needs to be compiled using
/std:c++17. Thanks to Martin Richter for reporting this issue.
v1.06 (17 March 2022)
- Updated the code to use C++ uniform initialization for all variable
declarations.
- Updated the code to use std::vector::data method throughout. This means
that the code must now be compiled using /std:c++17.
v1.05 (29 January 2022)
- Updated copyright details.
- Fixed more static code analysis warnings in Visual Studio 2022.
v1.04 (18 March 2020)
- Updated copyright details.
- Fixed more Clang-Tidy static code analysis warnings in the code.
v1.03 (3 October 2019)
- Fixed a number of compiler warnings when the code is compiled with VS
2019 Preview
v1.02 (21 April 2019)
- Updated copyright details
- Updated the code to clean compile on VC 2019
v1.01 (25 November 2018)
- Updated copyright details
- Fixed a number of C++ core guidelines compiler warnings. These changes
mean that the code will now only compile on VC 2017 or later.
v1.0 (19 June 2016)
API Reference
- There are 13 main classes included. All the classes are in the namespace
"EventLog". They are:
CBookmark provides a class
based encapsulation of the handle as returned from the API
"EvtCreateBookmark".
CChannelConfig provides a class
based encapsulation of the handle as returned from the API
"EvtOpenChannelConfig".
CChannelEnumerator provides a
class based encapsulation of the handle as returned from the API
"EvtOpenChannelEnum".
CEvent provides a class based
encapsulation of the handle as returned from the API "EvtNext".
CEventEnumerator
provides a class based encapsulation of the handle as returned from the API
"EvtOpenEventMetadataEnum".
CEventMetaData provides a
class based encapsulation of the handle as returned from the API
"EvtNextEventMetadata".
CHandle provides a class based
encapsuation of any Event log handle (EVT_HANDLE) .
CLog
provides a class based encapsulation of the handle as returned from the API
"EvtOpenLog".
CProvider provides a class based
encapsulation of the handle as returned from the API "EventRegister".
CPublisher provides a class based encapsulation of the
handle as returned from the API "EvtOpenPublisherMetadata".
CPublisherEnumerator
provides a class based encapsulation of the handle as returned from the API
"EvtOpenPublisherEnum".
CResultSet provides a class
based encapsulation of the handle as returned from the APIs
"EvtQuery" or "EvtSubscribe".
CSession provides a class
based encapsulation of the handle as returned from the API
"EvtOpenSession" or the implicit session handle for the local machine.
- The classes provide a simple wrapping over their SDK equivalents and you
should refer to the MSDN documentation for further details.
Contacting the Author
PJ Naughter
Email: pjna@naughter.com
Web: http://ww.naughter.com
15 May 2023