Sample code for my related blog post
- VS2017 or higher
- Microsoft Message Analyzer (if you want to capture the test output.)
- Open the Solution and build the project. This will create an executable called
etw_hello_world.exe
. - Edit helloworldmetric.man in a text editor and update
resourceFileName
andmessageFileName
with the full path to the builtetw_hello_world.exe
then save the file. - Open an Administrator command prompt and
cd
into the projectsrc
directory. - Run
wevtutil im helloworldmetric.man
to install the manifest. The exe file must be built and the path to it must be correct for this to work. - Now you can open Microsoft Message Analyzer or whatever tool and you should be able to add the
Hello World Metric Provider
system provider. - Run
etw_hello_world.exe
to log the messages.
You must have the manifest file you used to register in order to unregister the provider.
- Open an Administrator command prompt and
cd
into the projectsrc
directory. - Run
wevtutil um helloworldmetric.man
to uninstall the manifest.