Using Win32 functions in Visual FoxPro Image Gallery
Event Logging
Code examples:
Reading entries from Event logs
..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
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
[in] A handle to the event log to be read. This handle is returned by the OpenEventLog function.

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

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

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

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

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

[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 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: 46
User Contributed Notes:
There are no notes on this subject.

Copyright 2001-2018 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.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
16 sec.Function: 'EnumDisplaySettings'
33 sec.Function: 'GetPrinterData'
Function group: 'Printing and Print Spooler'
48 sec.Example: 'HOWTO: Use the Win32 API to Access File Dates and Times'
1.08 min.Function: 'ChooseFont'
1.35 min.Function: 'StartPage'
1.58 min.Function: 'InternetCrackUrl'
1.83 min.Function: 'RtlCompressBuffer'
2.08 min.Function: 'GdipSetClipRectI'
2.37 min.Function: 'EnumServicesStatus'
2.62 min.Function: 'SetVolumeLabel'
Advertise here!