Win32evtlogutil.ReportEvent() - more info please?

Dale Strickland-Clark dale at riverhall.NOTHANKS.co.uk
Fri Jan 25 09:31:47 CET 2002


Mark Hammond <mhammond at skippinet.com.au> wrote:

>Dale Strickland-Clark wrote:
>> P349 of Python Programming on Win32 explains writing to the event log
>> and mentions that win32evtlog.pyd and win32service.pyd include a set
>> of generic messages.
>> 
>> It doesn't seem to explain how to use them.
>> 
>> When I register my message source with
>> Win32evtlogutil.AddSourceToRegistry(), what do I use for the
>> MessageDll?
>
>The path to the DLL that contains your messages.  By default, 
>win32evtlogutil registers the win32evtlog.pyd file as the message source.
>
>> Then how do I use one of these generic messages so that the Event
>> Viewer presents logged messages cleanly?
>
>You should then be able to use win32evtlogutil.ReportEvent(), passing 
>the same appname as you previously registered.
>
>Mark.

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?

If there is such a DLL, what's it called and how do I explore the
message templates and how do I use them?

Cheers.
--
Dale Strickland-Clark
Riverhall Systems Ltd



More information about the Python-list mailing list