Win32evtlogutil.ReportEvent() - more info please?

Mark Hammond mhammond at skippinet.com.au
Fri Jan 25 11:42:19 CET 2002


Dale Strickland-Clark wrote:
> Mark Hammond <mhammond at skippinet.com.au> wrote:
>>Dale Strickland-Clark wrote:

> Thanks but you haven't really enlightened me further.
> 
> What DLL do I supply to AddSourceToRegistry()? Do I have to start
> writing C code to make a message DLL? I got the impression that there
> was a general purpose DLL containing template messages?

Have a look at win32evtlogutil.py.  AddSourceToRegistry has:

   if msgDLL is None:
     msgDLL = win32evtlog.__file__

So win32evtlog.pyd is such a DLL.  pythonservice.exe is also such a 
file.  win32evtlog.pyd has simply lots of "%1" messages - ie, no text at 
all.  See 
http://www.pythonpros.com/cgi-bin/cvsweb.cgi/PyWin32/win32/src/win32evtlog_messages.mc. 
  pythonservice.exe has a few service related messages too - see 
http://www.pythonpros.com/cgi-bin/cvsweb.cgi/PyWin32/win32/src/PythonServiceMessages.mc

You can build you own DLL using the message compiler (mc.exe) from msvc.

Mark.




More information about the Python-list mailing list