473,397 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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.Overwrit eAsNeeded, 0);

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

Thanks,
Olegus

Aug 15 '07 #1
3 2048
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.Overwrit eAsNeeded, 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-
Aug 15 '07 #2
"App.exe has stopped working"
>
Thanks,
Olegus

"Crashed" how?

--
-glenn-

Aug 17 '07 #3
Olegus wrote:
"App.exe has stopped working"
What is the error message?

--
-glenn-
Aug 17 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

29
by: Patrick | last post by:
I have the following code, which regardless which works fine and logs to the EventViewer regardless of whether <processModel/> section of machine.config is set to username="SYSTEM" or "machine" ...
4
by: Ron Weldy | last post by:
I'm trying to get asp.net errors to write a entry in the server Application log and have created an global.asax file and placed it in the root folder where my web files reside but when I trigger an...
6
by: acool | last post by:
I managed to get my VB.NET service installed. Now I can't get it to do anything. Tell me how do you debug smething like this if you have to manually install the assembly to run it? the same code...
0
by: PAPutzback | last post by:
Am I missing something? This code is in a class that is compiled into a dll. I have a service that imports the dll and I am getting an error "501" when running the ftp from the dll. So I added the...
1
by: martin | last post by:
Hi, I'm having some problems with the System.Diagnostics.EventLog class in .NET 2.0 I need to recreate an event message source inside a new log but the messages keeps ending up in the old...
3
by: Ben | last post by:
I am trying to write an eventlog monitor. I am using the sample code provided by VB2005 SDK as the bases for my application. I need to monitor all three logs (application, system, and security)....
0
by: =?Utf-8?B?Y2FsZGVyYXJh?= | last post by:
Dear all, I am trying using .NEt 2.0 to create a custom Log entry under Vista OS, where I will place my log inoformation. For that I am doing as follow : First I am ckecking if the log...
2
by: mindspring | last post by:
A pc that was created in MS office xp's Access 2002 has been working fine on a windows vista Ultimate pc that has MS OFfice Vista Edition. But all of the sudden it stopped working and gives this...
0
by: Marcus Müller | last post by:
Hi, I'm using an user defined EventLog called "Fist Full of Lasers" within a C# service. The Log is created during the installation of the service in which the first entry of the log is written...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.