CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    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.


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    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.


  3. #3
    Guest

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured