Jump to content

Recommended Posts

Posted (edited)

#include <EventLog.au3>
_EventLog__Report($hEventLog, $iType, $iCategory, $iEventID, $sUserName, $sDesc, $aData)

In the parameters section for $aData, it just says,

  Quote

Data array formated as follows:

[0] - Number of bytes in array

[1] - Byte 1

[2] - Byte 2

[n] - Byte n

Can someone help me understand what it's for?

EDIT: Damnit... I thought I clicked General Help & Support...

Edited by Mechaflash
  Reveal hidden contents

 

Posted (edited)

I see... I noticed where they get put in the event log but just didn't know what their purpose was. Started noticing that some events don't have them as you stated.

Just passed $aData[1] = [0] to it.

Another question about this function if you're willing to answer it:

No matter what value I set for $iEventID, I get an error reporting that the source doesn't contain information on that eventID. I understand that it's event IDs created inside a "source" which allows the event viewer to report these in the event log. Is there a way to just bypass it and only include a general description?

If not, how do I create my own eventID information for a unique source?

EDIT: Found the answer to the strike-through question

http://stackoverflow.com/questions/446691/how-to-create-windows-eventlog-source-from-command-line

Still want to know if it can just be bypassed however. Make it easier.

pfft nvm. It's the same as just creating an event.

Edited by Mechaflash
  Reveal hidden contents

 

Posted

What resources have you added to the exe? I'm guessing none.

You may want to have a look at this example: http://msdn.microsoft.com/en-us/library/windows/desktop/aa363680.aspx

Just be warned that what you are doing was not designed with languages like AutoIt in mind. I once did a lot of work on message tables in AutoIt. I'll see what I can dig out.

Posted

Because of its complexity and my uneasiness to have to deal with this on every machine I want to run the program on, I think I'll just stick with a basic text-based log file. Easier to manage anyways.

  Reveal hidden contents

 

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
  • Recently Browsing   0 members

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