Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. System Admin
  4. View Event Logs without EventLog class?

View Event Logs without EventLog class?

Scheduled Pinned Locked Moved System Admin
sysadminquestionlearning
6 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AhClem
    wrote on last edited by
    #1

    Hi, Are there any ways to get Event Log information from a remote box other than with the EventLog class? EventLog dumps the entire collection of log entries, for the specified log, as soon as it's opened. There is no way to throttle it, Read Next, or filter on anything besides "Source". The buffer size appears to be set at 40,000 and I don't see any way to change that (not that I'd want to). Everything was going great until I tried to get a a rather large log. And of course, the solution has to be entirely from the client side and I have no control over the size of the remote server logs. Any suggestions would be appreciated. Will

    D 1 Reply Last reply
    0
    • A AhClem

      Hi, Are there any ways to get Event Log information from a remote box other than with the EventLog class? EventLog dumps the entire collection of log entries, for the specified log, as soon as it's opened. There is no way to throttle it, Read Next, or filter on anything besides "Source". The buffer size appears to be set at 40,000 and I don't see any way to change that (not that I'd want to). Everything was going great until I tried to get a a rather large log. And of course, the solution has to be entirely from the client side and I have no control over the size of the remote server logs. Any suggestions would be appreciated. Will

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Without using the EventLog class??? You'd have to come up with your own implementation of the class, P/Invoking all the Windows API calls and structures involved. You might be able to use the existing EventLog classes and just override or add new methods to read the events one at a time or implement an asynchronous version of the log download. You can find more about the Event Log API here[^]. If you look in the Contents in the left pane, you'll see Windows Event Log. Dont bother looking at it yet, it's the API used in Vista. It doesn't exist in lower versions of Windows, at least not yet... Dave Kreskowiak Microsoft MVP - Visual Basic -- modified at 10:53 Friday 14th April, 2006

      A 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Without using the EventLog class??? You'd have to come up with your own implementation of the class, P/Invoking all the Windows API calls and structures involved. You might be able to use the existing EventLog classes and just override or add new methods to read the events one at a time or implement an asynchronous version of the log download. You can find more about the Event Log API here[^]. If you look in the Contents in the left pane, you'll see Windows Event Log. Dont bother looking at it yet, it's the API used in Vista. It doesn't exist in lower versions of Windows, at least not yet... Dave Kreskowiak Microsoft MVP - Visual Basic -- modified at 10:53 Friday 14th April, 2006

        A Offline
        A Offline
        AhClem
        wrote on last edited by
        #3

        Thanks, I was just looking at ".NET Framework Solutions: In Search of the Lost Win32 API" over at Amazon. I haven't played with Win32 since the Windows 95 days so it's a little daunting for what should have been the simple part of the app. As far as extending the EventLog class. I don't see anything exposed as "protected" that could help me. Oh well! Will

        D 1 Reply Last reply
        0
        • A AhClem

          Thanks, I was just looking at ".NET Framework Solutions: In Search of the Lost Win32 API" over at Amazon. I haven't played with Win32 since the Windows 95 days so it's a little daunting for what should have been the simple part of the app. As far as extending the EventLog class. I don't see anything exposed as "protected" that could help me. Oh well! Will

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          AhClem wrote:

          As far as extending the EventLog class. I don't see anything exposed as "protected" that could help me.

          Huh??? No, you create your own EventLog class! EIther by inheriting from the original EventLog class or by creating one from scratch. Then you can add your own methods to open the remote machine's event log and download each event, one at a time, from each log. Dave Kreskowiak Microsoft MVP - Visual Basic

          A 1 Reply Last reply
          0
          • D Dave Kreskowiak

            AhClem wrote:

            As far as extending the EventLog class. I don't see anything exposed as "protected" that could help me.

            Huh??? No, you create your own EventLog class! EIther by inheriting from the original EventLog class or by creating one from scratch. Then you can add your own methods to open the remote machine's event log and download each event, one at a time, from each log. Dave Kreskowiak Microsoft MVP - Visual Basic

            A Offline
            A Offline
            AhClem
            wrote on last edited by
            #5

            I understand. My point was that: in addition to the exposed (public) fields/properties, there are NO unexposed (protected) fields/properties in the FCL's EventLog class that would be nice to get at. So, there is no point in inheriting from it. There is nothing it would provide as a base class to make it any less useless to me. Will

            D 1 Reply Last reply
            0
            • A AhClem

              I understand. My point was that: in addition to the exposed (public) fields/properties, there are NO unexposed (protected) fields/properties in the FCL's EventLog class that would be nice to get at. So, there is no point in inheriting from it. There is nothing it would provide as a base class to make it any less useless to me. Will

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              :laugh: Ahh! I see what you were gettin' at! Dave Kreskowiak Microsoft MVP - Visual Basic

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups