Sorry for taking a week to respond to this but here is my code:
WriteToEventLog (EVENTLOG_ERROR_TYPE, "An error has occurred")
sub WriteToEventLog
{
my ($eventType, $text) = @_;
Win32::EventLog::Message::RegisterSource( "Application", $DisplayName );
my $Event = Win32::EventLog->new( $DisplayName ) || die;
my $Result = $Event->Report(
{
EventID => EVENT_ID,
Strings => $text,
EventType => $eventType,
}
);
$Event->Close();
}
Again the problem is that while the error message does get written to the event log,
only the INFORMATION icon is displayed rather than the ERROR icon. This happens under
NT 4.0 and 2000.
Thanks
Raul Rodriguez
On 12 Apr 2002, Philip Morley wrote:
>
> No. I see the error or warning icons on my
> viewer. Perhaps you should include a
> snippet of the code you use that writes to
> the Event Log...?
>
> Phil Morley
>
>
>
>
> rAuL <[EMAIL PROTECTED]>
> Sent by: To: perl-win32-a-
> [EMAIL PROTECTED]
> <Perl-Win32-admin@listser-
> v.ActiveState.com>
> eState.com cc: Subject:
> EventLog Question
>
> 12/04/02 16:05
>
>
>
>
>
>
> Whenever I use EVENTLOG_ERROR_TYPE or
> EVENTLOG_WARN_TYPE, I do not see a error or
> warning icon in Event Viewer. Is this normal?
>
> _____________________________________________-
> __
> Perl-Win32-Admin mailing list
> [EMAIL PROTECTED] To
> unsubscribe: http://listserv.ActiveState.com/-
> mailman/mysubs
>
>
>
>
>
> _____________________________________________-
> __
> Perl-Win32-Admin mailing list
> [EMAIL PROTECTED] To
> unsubscribe: http://listserv.ActiveState.com/-
> mailman/mysubs
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs