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
ReadEventLog
..msdn    Add comment     W32 Constants      Translate this page
Reads a whole number of entries from the specified event log. The function can be used to read log entries in chronological or reverse chronological order.
Code examples:
Reading entries from Event logs
Declaration:
BOOL ReadEventLog(
    HANDLE hEventLog,
    DWORD dwReadFlags,
    DWORD dwRecordOffset,
    LPVOID lpBuffer,
    DWORD nNumberOfBytesToRead,
    DWORD* pnBytesRead,
    DWORD* pnMinNumberOfBytesNeeded
);
FoxPro declaration:
DECLARE INTEGER ReadEventLog IN advapi32;
    INTEGER hEventLog,;
    LONG dwReadFlags,;
    LONG dwRecordOffset,;
    INTEGER lpBuffer,;
    LONG nNumberOfBytesToRead,;
    LONG @pnBytesRead,;
    LONG @pnMinNumberOfBytesNeeded
Parameters:
hEventLog
[in] A handle to the event log to be read. This handle is returned by the OpenEventLog function.

dwReadFlags
[in] The options for how the read operation is to proceed.

dwRecordOffset
[in] The number of the log-entry record at which the read operation should start.

lpBuffer
[out] A pointer to a buffer for the data read from the event log.

nNumberOfBytesToRead
[in] The size of the buffer, in bytes. This function will read as many whole log entries as will fit in the buffer.

pnBytesRead
[out] A pointer to a variable that receives the number of bytes read by the function.

pnMinNumberOfBytesNeeded
[out] A pointer to a variable that receives the number of bytes required for the next log entry.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
When this function returns successfully, the read position in the event log is adjusted by the number of records read. Only a whole number of event log records will be returned.
Word Index links for the ReadEventLog :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2007-02-10 12:33:20
Modified: 2007-02-10 12:36:40
Visited in last 7 days: 34
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.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (23.22.136.56)
17 sec.Function: 'PlaySound'
33 sec.Function: 'CeRegEnumValue'
49 sec.
Function group: 'Error Handling'
1.12 min.Function: 'GdipScaleTextureTransform'
1.42 min.Function: 'GetVersion'
1.7 min.Function: 'FindMediaType'
1.97 min.Function: 'WTSEnumerateServers'
2.25 min.Function: 'GdipDeleteFont'
2.52 min.Function: 'GetSystemDirectory'
2.8 min.Function: 'GetSaveFileName'
Google
Advertise here!