Click to See Complete Forum and Search --> : NT Event Log with VB


September 28th, 1999, 06:24 PM
Hi,
I am writing some info into Windows NT event log using the command function App.LogEvent in Visual Basic. This works fine in development system. If i make a setup program and install it in other Windows NT machine, the program does not write anything into Event Log. What might be the problem?. Even i tried using the Windows NT API's like RegisterEventSource, ReportEvent, etc... it still does not seem to work. Any idea...
Thanks in advance.

Lothar Haensler
September 29th, 1999, 03:35 AM
when using the API functions be sure to trap all errors by passing the return value from GetLastErrror (or err.LastDLLError) to FormatMessage. This will give you the exact reason for the failure.

September 29th, 1999, 12:46 PM
It was working fine. I was looking at the wrong place in Event Viewer. I was looking in System log instead of Application Log. Anyway thanks for your time.