dcsimg
September 23, 2018
Hot Topics:

Adding Events to the NT Event Log

  • November 19, 2002
  • By Sam Huggill
  • Send Email »
  • More Articles »

Windows applications typically write to the NT event log to provide the user with useful information. In VB5/6, the App object now provides methods to make writing to the event log in Windows NT a snap:

'-- Start Event Logging
Call App.StartLogging("", vbLogToNT)

'-- Log Events to NT
Call App.LogEvent _
("Info", vbLogEventTypeInformation)
Call App.LogEvent _
("Error", vbLogEventTypeError)
Call App.LogEvent _
("Warning", vbLogEventTypeWarning)

Be aware though, these functions will only work in the compiled EXE. They will be ignored in design mode. Check out the Microsoft knowledge base article Q161306 for more information.






Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that developer.com may send you developer offers via email, phone and text message, as well as email offers about other products and services that developer believes may be of interest to you. developer will process your information in accordance with the Quinstreet Privacy Policy.

Sitemap

Thanks for your registration, follow us on our social networks to keep up-to-date