Solved

Retrieving the actual size of the System Event Viewer

Posted on 2000-03-27
4
283 Views
Last Modified: 2010-04-02
How do the actual size of the System Event Viewer can be obtained(programatically) so that it can be compared with the current Event Viewer size from Win NT Event Viewer?
Only C or C++ functions, no MFC functions
I am using VC 5.0, Win NT 4.0 sp5
The actual set size of the System Event Viewer is needed not the current held size. The size of the Event Viewer can be set in the log settings... of the Event Viewer. That size is to be obtained.
0
Comment
Question by:PKothari
  • 2
  • 2
4 Comments
 
LVL 1

Expert Comment

by:tomkeane
ID: 2663024
Look at the EventLog APIs in MSDN.

The following functions should help you:

OpenEventLog()
CloseEventLog()
GetNumberOfEventLogRecords()
ReadEventLog()

Tom
0
 

Author Comment

by:PKothari
ID: 2663118
The actual set size of the System Event Viewer is needed not the current held size. The size of the Event Viewer can be set in the log settings... of the Event Viewer. That size is to be obtained.
0
 

Author Comment

by:PKothari
ID: 2663121
Edited text of question.
0
 
LVL 1

Accepted Solution

by:
tomkeane earned 20 total points
ID: 2663289
I'm assuming then that you want the Maximum size of the Event Log.  This is stored in the registry.  On my machine (Win2K) it is in
HKLM\System\CurrentControlSet\Services\EventLog\Application\MaxSize

You can, of course, access it using the Windows Registry API functions (Regxxx).

Tom
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now