Jump to content

Garbage in _EventLog__Report


ant2ne
 Share

Recommended Posts

Directly from the help file

_Main()
Func _Main()
    Local $hEventLog, $aData[4]=[3, 1, 2, 3]

    $hEventLog = _EventLog__Open("", "Application")
    _EventLog__Report($hEventLog, 4, 0, 1002, "Administrator", "AutoIt3 generated event", $aData)
    _EventLog__Close ($hEventLog)

EndFunc  ;==>_Main

Generates the event

Event Type: Information

Event Source: Application

Event Category: None

Event ID: 1002

Date: 2/19/2009

Time: 4:00:52 PM

User: A116-01\Administrator

Computer: A116-01

Description:

The description for Event ID ( 1002 ) in Source ( Application ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: AutoIt3 generated event.

Data:

0000: 01 02 03 ...

How do I trim off all of that garbage about "The description blah blah" and just leave the part that I want that says 'AutoIt3 generated event'

Thanks

Link to comment
Share on other sites

Directly from the help file

_Main()
Func _Main()
    Local $hEventLog, $aData[4]=[3, 1, 2, 3]

    $hEventLog = _EventLog__Open("", "Application")
    _EventLog__Report($hEventLog, 4, 0, 1002, "Administrator", "AutoIt3 generated event", $aData)
    _EventLog__Close ($hEventLog)

EndFunc ;==>_Main

Generates the event

How do I trim off all of that garbage about "The description blah blah" and just leave the part that I want that says 'AutoIt3 generated event'

Thanks

You get that any time you use an invalid EventID for the selected source type. Previous topic on this.

There was an additional solution posted involving downloading and installing .dll file (didn't try that one).

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...