Using Win32 functions in Visual FoxPro Image Gallery
Event Logging
..msdn
ClearEventLog
CloseEventLog
DeregisterEventSource
GetEventLogInformation
GetNumberOfEventLogRecords
GetOldestEventLogRecord
OpenEventLog
ReadEventLog
RegisterEventSource
ReportEvent
Code examples:
Reading entries from Event logs
GetOldestEventLogRecord
..msdn    Add comment     W32 Constants      Translate this page
Retrieves the absolute record number of the oldest record in the specified event log.
Code examples:
Reading entries from Event logs
Declaration:
BOOL GetOldestEventLogRecord(
    HANDLE hEventLog,
    PDWORD OldestRecord
);
FoxPro declaration:
DECLARE INTEGER GetOldestEventLogRecord IN advapi32;
    INTEGER hEventLog,;
    LONG @OldestRecord
Parameters:
hEventLog
[in] A handle to the open event log. This handle is returned by the OpenEventLog or OpenBackupEventLog function.

OldestRecord
[out] A pointer to a variable that receives the absolute record number of the oldest record in the specified event log.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
The oldest record in an event log is not necessarily record number 1.

hLog = OpenEventLog(NULL, "Application")

IF hLog <> 0
        STORE 0 TO nReccount, nRecno

        = GetNumberOfEventLogRecords(m.hLog, @nReccount)
        = GetOldestEventLogRecord(m.hLog, @nRecno)

        ? nReccount, nRecno

        = CloseEventLog(hLog)
ENDIF
Word Index links for the GetOldestEventLogRecord :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2007-02-10 12:30:13
Modified: 2007-02-10 12:32:32
Visited in last 7 days: 8
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.156.67.122)
14 sec.Function: 'CryptAcquireContext'
27 sec.Function: 'GetSystemDefaultLCID'
41 sec.Function: 'WinVerifyTrust'
53 sec.Function: 'IsNetworkAlive'
1.08 min.Function: 'GetDIBits'
1.32 min.Function: 'CloseWindow'
1.52 min.Function: 'UuidFromString'
1.73 min.Function: 'OpenProcessToken'
1.97 min.Function: 'WindowFromDC'
2.22 min.Function: 'capCreateCaptureWindow'
Google
Advertise here!