Solved

Retrieving the actual size of the System Event Viewer

Posted on 2000-03-27
4
290 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Template syntax for variable length arrays 9 75
VS2015 compilation and missing DLLs 9 147
thread-safe code in c++ 2 103
Why isn't object file created? 6 59
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

803 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