Modify

Opened 15 years ago

Closed 15 years ago

#717 closed Bug (Works For Me)

_EventLog__Report is crashing script

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: 3.2.12.1 Severity: None
Keywords: Cc:

Description

AutoIT script is crashing when trying to send event to eventlog (UDF).
Env: WinXP32Bit SP2
AutoIT_v3.2.12.1
Script ran from interpreter (autoit3.exe, not precomiled).

Code:

Func sendToEventLog ($message,$type=4)

Local $hEventLog, $aData[4]=[3, 1, 2, 3]

$hEventLog = _EventLogOpen("", "Application")

msgbox(0,"text","test")

_EventLogReport($hEventLog, $type, 0, 1000, "Administrator", $message, $aData)
_EventLog
Close ($hEventLog)

EndFunc

msgbox is shown fine, after that crash.

Attachments (1)

crash.jpg (17.3 KB) - added by anonymous 15 years ago.

Download all attachments as: .zip

Change History (4)

Changed 15 years ago by anonymous

comment:1 follow-up: Changed 15 years ago by Jos

Doesn't look you are using the UDFs from the standard installer.
This works fine for me:

#Include <EventLog.au3>
sendToEventLog("test")

Func sendToEventLog($message, $type = 4)
	Local $hEventLog, $aData[4] = [3, 1, 2, 3]
	$hEventLog = _EventLog__Open("", "Application")
	MsgBox(0, "text", "test")
	_EventLog__Report($hEventLog, $type, 0, 1000, "Administrator", $message, $aData)
	_EventLog__Close($hEventLog)
EndFunc   ;==>sendToEventLog

Jos

comment:2 in reply to: ↑ 1 Changed 15 years ago by anonymous

Replying to Jos:

Doesn't look you are using the UDFs from the standard installer.
This works fine for me:

Thanks for your feedback.
I use a copy of the AutoIt - Self Extracting Archive, no installer at all.
Is there a dependency on the installer ?

Due to time pressure i had to go back to a VB- Helperscript to handle eventlog.

comment:3 Changed 15 years ago by Gary

  • Resolution set to Works For Me
  • Status changed from new to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.