I have a requirement to modify a simple windows service written in win32 C (not c++).
Is there a library I can use to write event log entries to the windows event log without using eventcreate.exe? Or do I have to modify it to be compiled as a c++ program?
Yes, see the function ReportEvent and its example.
The event provider source file with .mc extension looks like this:
The .mc file is compiled into a .res file which is linked into a .dll:
To compile the message text file, use the following command:
To compile the resources that the message compiler generated, use the following command:
To create the resource-only DLL that contains the message table string resources, use the following command (you can run the command from a Visual Studio Command Prompt):
…