ibsekhar has asked for the wisdom of the Perl Monks concerning the following question:

Hi All, I would like to know how to access windows event logs using win32::API perl module. In particular I have to access "Application" event log in windows and also want to filter out the events by some "xyz" selection. Could any one help me out regarding this? Regards Satya
  • Comment on Access Windows Events log using win32::API

Replies are listed 'Best First'.
Re: Access Windows Events log using win32::API
by syphilis (Archbishop) on Sep 19, 2009 at 09:07 UTC
    I would like to know how to access windows event logs using win32::API

    Usually, one would be using Win32::EventLog. Do you really need to use Win32::API ?

    Cheers,
    Rob
      Hi Rob, yes your are correct. By any way (by using Win32::Eventlog) also is it possible to get Windows Application event logs? I tried couple of times to get Windows Application event logs using Win32::EventLog also but no luck :-( Satya

        Did you read the documentation for Win32::Eventlog? There are working examples there. You tell us you've tried and had 'no luck', unless you show us what you tried and the error message you receive, how can we help?

        Update: Also see How do I post a question effectively?.

        Martin

        The synopsis of Win32::EventLog says:
        use Win32::EventLog $handle=Win32::EventLog->new("Application");
        That alone should answer the question.