Log an event into windows log event

forum.sourcecode (2000-2005) & forum.td.sourcecode (2005-2010)
Didier Tourneur

Log an event into windows log event

Post by Didier Tourneur » 05 Jun 2007, 19:12

 Posted by:  didier tourneur 

hello
I'm trying to log a event in the event logger of windows without use the
sallanguage who is very limitated.

Thanks didier

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2370
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: Log an event into windows log event

Post by Jeff Luther » 05 Jun 2007, 19:19

 Posted by:  Jeff Luther 

FYI, I have an EVENT LOGGING sample on my link page, shown below. It is
basic, but uses the Win. API to log events.

Best Regards,
Jeff @ PC Design
info. & samples: www.JeffLuther.net/gupta/

czavala
Honduras
Posts: 193
Joined: 02 Oct 2018, 17:35
Location: San Pedro Sula, Honduras

Re: Log an event into windows log event

Post by czavala » 05 Jun 2007, 21:21

 Posted by:  Conrado ZAVALA 

Hello Didier,

1. Call SalStartTrace( TRACE_Event, "", TRUE )
2. Call SalTrace( EVENT_INFORMATION, "Message to Log" )
3. Call SalEndTrace( )

Conrado

Didier Tourneur

Re: Log an event into windows log event

Post by Didier Tourneur » 06 Jun 2007, 09:41

 Posted by:  Didier Tourneur 

Thanks
I 'm agree With you but this sallanguage is very limitated .

How can I specify the Log type I want cretae my own log event , how can I
specify the exe name etc...

Didier

Didier Tourneur

Re: Log an event into windows log event

Post by Didier Tourneur » 06 Jun 2007, 09:43

 Posted by:  Didier Tourneur 

Where Can I Find The API and some examples

Didier

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2370
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: Log an event into windows log event

Post by Jeff Luther » 06 Jun 2007, 17:22

 Posted by:  Jeff Luther 

"Find The API and some examples" ????
The API is internal to Windows and is 'there' for you already. All you need
to do is declare the functions - and that's done for you in my sample! That's
what the sample is for...

"Examples" - well, the sample is an 'example' and other than that, you will
want to search the 'net for other possible VB or other code samples that
use those event functions.

- Jeff

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2370
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: Log an event into windows log event

Post by Jeff Luther » 06 Jun 2007, 17:40

 Posted by:  Jeff Luther 

P.S. I'm still puzzled about you asking to "Find the API" so I looked back
at my EVENT LOGGING sample.

If by "find" you mean the Ext. Lib. "STRCixx.DLL" (the "xx" will be your
version of TD, like 31, 42, etc.) then the answer is that the TD APL lib.
included the the product: cstructl.apl
should be in your Gupta TD directory and that APL is what will then incldue
STRUCixx.DLL".

Otherwise, you will need to clarify what you mean by "where can I find...".

- Jeff

Andreas Wessel

Re: Log an event into windows log event

Post by Andreas Wessel » 08 Jun 2007, 10:27

 Posted by:  Andreas Wessel 

Hi Didier,

If the Sal-Solution does not offer enough options,
you could try using the API-Functions directly.
advapi32.dll holds a function called ReportEventA,
what about that?

Andi

Didier Tourneur

Re: Log an event into windows log event

Post by Didier Tourneur » 08 Jun 2007, 11:01

 Posted by:  Didier Tourneur 

I'm Working on and I try to create my own Custom log

Didier

Return to “td.sourcecode”

Who is online

Users browsing this forum: [Ccbot] and 0 guests