Software guru, Inc

Real World Solutions

Search Results

Write to the Eventlog in Delphi

Dec 13

Written by:
12/13/2012 7:17 PM  RssIcon

Delphi Write to Event Log

uses Windows;

...

const

SDefaultSource = 'ELog';

...

// TEventLogger is not used because the current RTL supports only local servers

function WriteEventLog(AEntry: string;

AServer: string ='';

ASource: string = SDefaultSource;

AEventType: word = EVENTLOG_INFORMATION_TYPE;

AEventId: word = 0;

AEventCategory: word = 0

): boolean;

var

EventLog: integer;

P: Pointer;

begin

Result := False;

P := PWideChar(AEntry);

if Length(AServer) = 0 then // Write to the local machine

EventLog := RegisterEventSource(nil, PWideChar(ASource))

else // Write to a remote machine

EventLog := RegisterEventSource(PWideChar(AServer),

PWideChar(ASource));

if EventLog <> 0 then

try

ReportEvent(EventLog, // event log handle

AEventType, // event type

AEventCategory, // category zero

AEventId, // event identifier

nil, // no user security identifier

1, // one substitution string

0, // no data

@P, // pointer to string array

nil); // pointer to data

Result := True;

finally

DeregisterEventSource(EventLog);

end;

2 comment(s) so far...


Gravatar

Re: Write to the Eventlog in Delphi

Delphi provides us the knowledge to improve the coding language. Coding language is while we making some kind of software. Some software provides good coding language and helpful for the development of the software. It is a good site. Thank you! You can write my essay 4 me to get valuable instruction with the help of native writers.

By Cynthia J. Lafountain on   1/20/2017 1:21 AM
Gravatar

Re: Write to the Eventlog in Delphi

Nike Outlet Online
Nike Shoes
Nike Outlet Store Online Shopping
Pandora Bracelet Charms
Nike Shoes
Air Jordan Retro
Nike Free Run
New Nike
Adidas Yeezy
Christian Louboutin Shoes
Yeezy 700
Nike Shoes
Nike Factory Store Online
Christian Louboutin Outlet
Christian Louboutin Shoes
Nike Outlet Store Online Shopping
Nike Shoes For Women
Nike Factory Outlet
Asics
Christian Louboutin Outlet
Adidas Stan Smith Sneakers
Salvatore Ferragamo
Christian Louboutin Heels
Valentino Shoes
Nike Basketball Shoes
Fjallraven Kanken Backpack
Nike Outlet
Red Bottom Shoes
Nike Sneakers For Men
Nike Clearance Outlet
Lebron Shoes
Nike Cortez Women
Yeezy 550
Nike Running Shoes
Pandora Jewelry
Nike Free rn
Louboutin Shoes
Nike Store
Nike Factory Outlet
Nike Air Force 1 Women
Pandora Sale
Nike Zoom Pegasus 35
Air Jordans
Pandora Jewelry
Golden Goose Sneakers
Nike Shoes Outlet
Adidas Yeezy
Nike Sneakers Outlet
Nike Air Max 720
Nike Factory Outlet
Nike Clearance
New Air Max 2019
Cheap Nike Shoes
Kevin Durant Shoes
Moncler Outlet
Nike Outlet
Nike Clearance
Nike Air Max 95 Essential
Cheap Yeezys
Christian Louboutin Shoes
Nike Air Max
Nike Lebron 16
Nike Shoes
Nike Kyrie
Christian Louboutin
Nike Sneakers
Red Bottoms
Michael Jordan Shoes
Lebron 16
Nike Air Zoom Pulse
Pandora Charms
Fjallraven Kanken Backpack
Nike Black Friday Sales
Kyrie Irving Shoes
Nike Air Max 270
Nike Shoes
Air Force 1
Nike Outlet Store
Nike Running Shoes
Pandora Necklace
Ferragamo
Nike Outlet Store Online
Pandora Bracelets
Jordan Shoes
Adidas Yeezy
Cheap Nike Shoes
Nike Store
Yeezy 500 Black
Adidas NMD R1
Nike Outlet
Pandora Ring
Nike Shoes
Nike Air Force
Jordan 13 Retro
Nike Shoes For Men Basketball
Louboutin Shoes
Pandora Earrings
Air Force Ones
Pandora
Nike Outlet
NMD Adidas
Pandora UK
Adidas Ultra Boost
Lebrons Shoes
Vans Shoes
Nike Cortez
Pandora Charms
Yeezys Boost 350 V2
Nike Air Max 95
Nike Huarache
Nike Air Max 98
Nike Factory Store
Nike Running Shoes For Men
Red Bottom Heels
Christian Louboutin Outlet
Pandora Canada
Nike Outlet Store Online
Nike Store Online
Nike Air Max 98
Jordan Retro
Nike Sneakers
Pandora Jewelry Official Site USA
Pandora Canada
Pandora
Christian Louboutin Heels
Nike Air More Uptempo
Nike Air Max 720
Air Jordan Sneakers
Nike Prestos
Yeezy Boost
Nike Shoes
Christian Louboutin Shoes
Ferragamo Belts
Ultra Boost
Jordan 11 Blue
Yeezy
Pandora Bracelets And Charms
Jordan Kids
Jordans Sneakers
Lebron 17 Graffiti
Adidas Sneakers For Women
Christian Louboutin

By Nicholas on   7/1/2022 8:55 PM

Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
CAPTCHA image
Enter the code shown above in the box below
Add Comment   Cancel 
You must be logged in and have permission to create or edit a blog.