Working with EventLog on Vista - CSharp

This is a discussion on Working with EventLog on Vista - CSharp ; My Windows application if running on Vista crashed on the next statements( with ----> in the front): if (!EventLog.SourceExists(Event.EventLogSource)) EventLog.CreateEventSource(Event.EventLogSource, Event.EventLogLog); myLog = new EventLog(Event.EventLogLog, Environment.MachineName, Event.EventLogSource); -----> //myLog.MaximumKilobytes = 4096; -----> // myLog.ModifyOverflowPolicy(OverflowAction.OverwriteAsNeeded, 0); myLog.EntryWritten += new EntryWrittenEventHandler(OnEntryWritten); It ...

+ Reply to Thread
Results 1 to 4 of 4

Working with EventLog on Vista

  1. Default Working with EventLog on Vista

    My Windows application if running on Vista crashed on the next
    statements( with ----> in the front):
    if (!EventLog.SourceExists(Event.EventLogSource))
    EventLog.CreateEventSource(Event.EventLogSource,
    Event.EventLogLog);

    myLog = new EventLog(Event.EventLogLog,
    Environment.MachineName, Event.EventLogSource);
    -----> //myLog.MaximumKilobytes = 4096;
    -----> //
    myLog.ModifyOverflowPolicy(OverflowAction.OverwriteAsNeeded, 0);

    myLog.EntryWritten += new
    EntryWrittenEventHandler(OnEntryWritten);
    It works fine on XP. Any recommendations how to make it work on
    Vista?

    Thanks,
    Olegus


  2. Default Re: Working with EventLog on Vista

    Olegus wrote:
    > My Windows application if running on Vista crashed on the next
    > statements( with ----> in the front):
    > if (!EventLog.SourceExists(Event.EventLogSource))
    > EventLog.CreateEventSource(Event.EventLogSource,
    > Event.EventLogLog);
    >
    > myLog = new EventLog(Event.EventLogLog,
    > Environment.MachineName, Event.EventLogSource);
    > -----> //myLog.MaximumKilobytes = 4096;
    > -----> //
    > myLog.ModifyOverflowPolicy(OverflowAction.OverwriteAsNeeded, 0);
    >
    > myLog.EntryWritten += new
    > EntryWrittenEventHandler(OnEntryWritten);
    > It works fine on XP. Any recommendations how to make it work on
    > Vista?
    >
    > Thanks,
    > Olegus
    >


    "Crashed" how?

    --
    -glenn-

  3. Default Re: Working with EventLog on Vista

    "App.exe has stopped working"



    >
    > > Thanks,
    > >Olegus

    >
    > "Crashed" how?
    >
    > --
    > -glenn-




  4. Default Re: Working with EventLog on Vista

    Olegus wrote:
    > "App.exe has stopped working"


    What is the error message?

    --
    -glenn-

+ Reply to Thread

Similar Threads

  1. ESC key not working outside PS in Vista...
    By Application Development in forum Adobe Photoshop
    Replies: 14
    Last Post: 11-11-2008, 03:56 PM
  2. Photoshop cs2 has stopped working (Vista)
    By Application Development in forum Adobe Photoshop
    Replies: 5
    Last Post: 10-24-2007, 04:27 AM
  3. Writing to the EventLog in Vista
    By Application Development in forum DOTNET
    Replies: 4
    Last Post: 07-17-2007, 03:31 AM
  4. VisualWorks COM server not working in Vista
    By Application Development in forum Smalltalk
    Replies: 5
    Last Post: 12-27-2006, 07:23 PM
  5. Win32_NTEventLogFile does NOT return eventlog created by EventLog
    By Application Development in forum DOTNET
    Replies: 3
    Last Post: 11-15-2004, 10:55 PM