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)
_EventLogClose ($hEventLog)
EndFunc
msgbox is shown fine, after that crash.
Attachments (1)
Change History (4)
by , 17 years ago
follow-up: 2 comment:1 by , 17 years ago
comment:2 by , 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 , 17 years ago
| Resolution: | → Works For Me |
|---|---|
| Status: | new → closed |

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 ;==>sendToEventLogJos