Hi,

Im stuck doing something that seems it should be working fine.

Im writing to the event log and trying to get the "Event ID not found" error to go away. For this I need to use a Message File (resource dll).

I have done the following:

I log the Event under a specific Source name (eg. MySource)
It shows up in the event log successfully.

I have created a Resource.mc file that looks something like this

Code:
MessageIdTypedef=WORD
MessageId=0x1
SymbolicName=FOO_ERROR
Language=English %1
.
I compile this into a rc file with MC.exe.
I then get a RES file.
this I include in my DLL project and compile into a resource dll.
All good so far

I then update the registry to contain the source named (MySource) and specify the MessageFile here.

eg.
Code:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\Application\MySource
EventMessageFile REG_EXPAND_SZ C:\MyResource.dll
TypesSupported REG_DWORD 7
Now when I view the event log, I still get the following text in the description:

Descciption for event ID cannot be found.....
the message resource is present but the message is not found in the string/message table

My logging command within delphi source

Code:
f FEventLog = 0 then
    FEventLog := RegisterEventSource(nil, PChar('MySource'));
  ReportEvent(FEventLog, 1, 0, 1, nil, 1, 0, @P, nil);
Any help in this regard would be awesome. I've been googling a lot and it all comes down to the above steps - but in my case without success.
thanks in advance