-
NT Event Log with VB
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.
-
Re: NT Event Log with VB
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.
-
Re: NT Event Log with VB
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.