Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to write to NT Event Log???

Status
Not open for further replies.

rmahawaii

Programmer
Oct 21, 2002
29
HK
Hello All, can anyone please tell me how to write to window NT's Event Log? A link to a site is good enough. Thank you.
 
Refer to
Or a simple method to get you started, note this only works from the compiled exe.


Call App.StartLogging("", vbLogToNT)

Call App.LogEvent("Information", vbLogEventTypeInformation)
Call App.LogEvent("Error message", vbLogEventTypeError)
Call App.LogEvent("Warning", vbLogEventTypeWarning)


cjw
 
Thanks for all the information. You guys are great. Thank you.
 
I tested and it works. Thanks. But how can I changed the Source name under the Source column in Event view to my application name? thanks
 
rmahawaii -
If you want that, you'll need to spend some money on a NT Event logger control (DesaWare has a nice one), or write a lot of Win32 API calls. Follow TerraSamba's link for that.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top