>>--getNumber(--+---------+-+----------+--)----------------------><
+--server-+ +-,-source-+Determines the number of records in the event log.
The arguments are:
Optional. The server where the event log resides.
Optional. The event source.
On success, the count of event records in the log. On error, the return is the negated system error code.
This example opens the system log on the Osprey server. It then checks that there are at least 10 records before reading the log:
log = .WindowsEventLog~new
log~open("\\Osprey", "System")
if log~getNumber > 10 then do
log~readRecords
say 'Read' log~events~items 'records.'
end
::requires 'winSystm.cls'