Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need to write to the event log - How to?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00588684
Message ID:
00588699
Vues:
37
>>>Can somebody please tell me the steps I have to take to write messages to the NT/2000 event log.
>>>
>>>I'm not very well versed in API stuff, so if you have an example or two I'd be truly grateful.
>>>
>>>TIA
>>
>>If the Windows Script Host is an option, see MSKB#Q257541. It shows how to write to the log from within VFP.
>
>
>Hi George,
>
>Well, yes and no- does it come with NT 4.0 & Win2K and is it installed by default?

On Win2K yes. Check on the September, 2000 issue of the VFUG newsletter for information on NT. It's the first of the five part series of article Ed Rauh and I wrote regarding the WSH. In it you'll find the answer to NT 4.0, plus how to check for its presence.

>I have tried the code in the above example and it works fine, except the source is given as WSH, and it would be nice if it were MyApp instead.
>
>Another question: If one had access to a DLL where this functionality is implemented, how is such a DLL loaded and it's methods called from VFP?
>
>Is it in fact possible to do that?

There's a series of functions connected with Event Logging in the Platform SDK. The two that'll be of initial interest are: RegisterEventSource() and ReportEvent(). You can find these and others documented either in the MSDN Library or at the MSDN web site.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform