Is there a way to tell if the eventlog is full in programatically 
Author Message
 Is there a way to tell if the eventlog is full in programatically

Is there a way to tell if the event log is full prgramatically


Mon, 26 Sep 2005 02:12:32 GMT  
 Is there a way to tell if the eventlog is full in programatically
Hi,

You may want to use WMI Win32_NTEventlogFile class. For your reference, I'm
including the MSDN URL below:

http://msdn.microsoft.com/library/en-us/wmisdk/wmi/win32_nteventlogfi...

Also, we can use following script to get the size of the log file. You may
want to translate it to C version instead. There are some samples in the
Platform SDK (\Program Files\Microsoft SDK\samples\SysMgmt\WMI\VC) folder.
These samples may be a good start.

Set LogFileSet
=GetObject("winmgmts:{impersonationLevel=impersonate,(Security)}").execQuery
("select * from Win32_NTEventLogFile ")

for each Logfile in LogFileSet:
        MsgBox Logfile.FileSize
next

set Logfile = nothing
set LogFileSet = nothing

Best Regards,
Leo Chen

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

| Subject: Is there a way to tell if the eventlog is full in programatically
| Date: Wed, 9 Apr 2003 11:12:32 -0700
| Lines: 3
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

| Newsgroups: microsoft.public.vc.language
| NNTP-Posting-Host: 192.59.182.131
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.vc.language:186809
| X-Tomcat-NG: microsoft.public.vc.language
|
| Is there a way to tell if the event log is full prgramatically
|
|
|



Mon, 26 Sep 2005 11:00:57 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. I am new to programming and am lost

2. Please look at this code n tell me where i am wrong

3. I am stuck in FULL screen view.

4. how good am I? Am I Good Enough????

5. Make a full access ACL programatically?

6. How to tell if disk is full?

7. Determine where I am running

8. System.Threading.Timer , am I doing this correctly ?

9. Am i connected?

10. Request - Opinions on Book I am considering:

11. I am puzzled: __nogc new = LNK2001

12. Am I in the wrong NG???

 

 
Powered by phpBB® Forum Software