EventLogWrappers v1.08 A collection
of C++ classes to encapsulate the Windows Event Log
Welcome to EventLogWrappers, a collection of freeware C++ classes to encapsulate
the new Event Log API available in Windows Vista or later.
The classes provided are as follows:
- 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 enclosed zip file contains the
source code and a simple VC 2017 console based application which exercises the classes.
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.
Updates
v1.08 (21 May 2024)
- Updated copyright details
- Fixed an issue in EventLog::GetExtendedStatus where the returned
string could have a null character as the last character. Thanks to Snorri
Kristjánsson for reporting this issue.
- Fixed an issue in CChannelEnumerator::Next where the returned string
could have a null character as the last character. Thanks to Snorri
Kristjánsson for reporting this issue.
- Fixed an issue in CPublisher::FormatMessage where the returned string
could have a null character as the last character. Thanks to Snorri
Kristjánsson for reporting this issue.
- Fixed an issue in CPublisherEnumerator::Next where the returned string
could have a null character as the last character. Thanks to Snorri
Kristjánsson for reporting this issue.
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)