RAA - win32-eventlog/0.2.2

win32-eventlog / 0.2.2

Short description: Interface to the Win32 EventLog API
Category: Library/Win32
Status: stable
Created: 2003-10-15 01:30:32 GMT
Last update: 2004-07-02 19:54:08 GMT
Owner: Daniel J. Berger (Projects of this owner)
Homepage: http://rubyforge.org/projects/win32utils/
Download: http://rubyforge.org/frs/download.php/911/win32-eventlog-0.2.2.zip
License: Ruby's
Dependency:
None
Description:

An interface to the Win32 EventLog API.

Changes for 0.2.2
=================
- Fixed a bug in the read() method where not all the records were being returned.
- Fixed calls to rb_time_new() - second argument appears to be mandatory as of 1.8.2.
- Renamed struct returned by read() to "EventLog".
- Changed struct members "id" and "type" to "event_id" and "event_type", respectively. This was to avoid any confusion with the builtin Ruby methods of the same name.
- Replaced STR2CSTR() with StringValuePtr(), as the former is deprecated. This means that as of this version, Ruby 1.8.0 or later is required.
- Moved the sample programs to doc/examples.

Synopsis
========
require "win32/eventlog"
include Win32

handle = EventLog.open("Application")

handle.total_records # e.g. 916
handle.oldest_record_number # e.g. 1

# Read through every entry, inspecting each struct in turn handle.read{ |elr|
p elr
puts
}

# Backup the Application log
handle.backup("C:\\Backups\\Application.bak")

# Clear the Application log, after backing it up
handle.clear("C:\\Backups\\Application.old")

handle.close

Versions: [0.5.0 (2008-09-12)] [0.4.9 (2008-09-08)] [0.4.8 (2008-05-18)] [0.4.7 (2007-12-09)] [0.4.6 (2007-08-27)] [0.4.5 (2007-08-25)] [0.4.4 (2007-07-31)] [0.4.3 (2006-12-19)] [0.4.2 (2006-08-06)] [0.4.1 (2006-05-28)] [0.4.0 (2006-05-25)] [0.3.4 (2006-01-08)] [0.3.3 (2006-01-02)] [0.3.2 (2005-05-26)] [0.3.1 (2005-02-17)] [0.3.0 (2004-10-30)] [0.2.5 (2004-10-28)] [0.2.4 (2004-10-20)] [0.2.3 (2004-10-15)] [0.2.2 (2004-07-02)] [0.2.1 (2004-03-04)]

Edit this project (for project owner)

back to RAA top