Jump to content

Write to Windows event log: Difference between revisions

PascalABC.NET
(Added FreeBASIC)
(PascalABC.NET)
 
Line 514:
props["parameters"] = "/t INFORMATION /id 123 /l APPLICATION /so Lingo /d "&QUOTE&"Rosetta Code Example"&QUOTE
shell.shell_exec("EventCreate", props)</syntaxhighlight>
 
=={{header|PascalABC.NET}}==
<syntaxhighlight lang="delphi">
uses System.Diagnostics;
 
begin
if not EventLog.SourceExists('MyApp') then
EventLog.CreateEventSource('MyApp', 'Application');
EventLog.WriteEntry('MyApp', 'Hello from PABC!');
end.
</syntaxhighlight>
 
=={{header|Perl}}==
246

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.