Event Viewer Message File

So I’ve seen this question asked in the past, but so far have not seen any answers as to how it can be resolved.

From within a console or service application when I write to the log:

System.Log(System.LogLevelInformation, "Service Started")

The event is shown in the Windows Application log. The issue is the beginning of the log entry states the following:

The description for Event ID 1000 from source DebugTestDebugWindowsService cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

I have created my own event message file following the directions found here:

My simple message file contains the following:

;// Header


;// Messages
Task Information: %1

I successfully compiled this into an event message file DLL, using the following commands:

mc.exe xojo_msgfile.mc
rc.exe /r xojo_msgfile.rc
link -dll -noentry -out:xojo_msgfile.dll xojo_msgfile.res

After creating the message file dll, I created the following registry entry for my service application that is running as DebugTestDebugWindowsService:


The EventMessageFile above actually points to the proper locatoin of the DLL created above. The key is supposed to be of type REG_EXPAND_SZ, which causes the export to contain hex.

When running the service and writing to the log, it appears to be using the correct event message dll since it does not allow me to delete the message file dll unless I close the event viewer because it in use when viewing the log entry.

I have tried many different combinations to try to get this to work, including setting the MessageId to both 1000 and 0x1000, as well as compiling the message file with and without the -c switch (mc.exe -c).

Multiple applications can use the same event message file, and it seems if we can figure out the correct way to create it, anyone using Xojo could use this message DLL since Xojo always creates the log entries with the ID of 1000. It would be nice if this generic message file could be included with Xojo so that others would not run into this issue.

I’m wondering if anyone here has ever been able to resolve this issue or has any idea of what I might be doing wrong. I know @Wayne_Golding has a lot of knowledge with Windows services, and I have watched and read his available content - but have not come across the answer to this Windows Event Log issue.

Thanks for any help you might be able to offer.