Search code examples
c++visual-studiovisual-c++etw

ERROR_EVT_EVENT_TEMPLATE_NOT_FOUND with Windows EWT


I am attempting to print a very simple log to Windows event viewer. When I call EventWrite() in my .cpp file, I get error code 15003 ERROR_EVT_EVENT_TEMPLATE_NOT_FOUND in the event viewer and my message is not displayed. I think the problem that I am having is that the .rc file that is generated when I compile my manifest is not being compiled along with the project even though I have dragged it into the resource folder in the solution explorer.

When I registered my manifest with wevtutil.exe I get the following warning: Publisher ExampleProvider resources are not accessible.When I ask for details on this error, I receive this output: Failed to open metadata for publisher ExampleProvider. Access is denied.

I have already looked at Access is denied while register provider (wevtutil) and it did not resolve the issue.


Solution

  • I figured out that it was a permission issue just like in Access is denied while register provider (wevtutil). I corrected this by placing my project at the root of my C drive.