Modify

Opened 17 years ago

Closed 17 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 17 years ago.

Download all attachments as: .zip

Change History (4)

by anonymous, 17 years ago

Attachment: crash.jpg added

comment:1 by Jos, 17 years ago

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

in reply to:  1 comment:2 by anonymous, 17 years ago

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 by Gary, 17 years ago

Resolution: Works For Me
Status: newclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.