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
OpenEventLog
..msdn    Add comment     W32 Constants      Translate this page
Opens a handle to the specified event log.
Code examples:
Reading entries from Event logs
Declaration:
HANDLE OpenEventLog(
    LPCTSTR lpUNCServerName,
    LPCTSTR lpSourceName
);
FoxPro declaration:
DECLARE INTEGER OpenEventLog IN advapi32;
    STRING lpUNCServerName,;
    STRING lpSourceName

Parameters:
lpUNCServerName
[in] The Universal Naming Convention (UNC) name of the server on which the event log is to be opened.

lpSourceName
[in] The name of the log.
If a custom log cannot be found, the event logging service opens the Application log; however, there will be no associated message or category string file.
Return value:
If the function succeeds, the return value is the handle to an event log.
Usage:
hLog = OpenEventLog(NULL, "Security")  && local computer

IF hLog = 0
    ? "OpenEventLog call failed with error code:",;
        GetLastError()
ELSE
    = CloseEventLog(hLog)
ENDIF
My comment:
To close the handle to the event log, use the CloseEventLog function.

With Event Viewer, users can monitor events recorded in the Application, Security, and System logs.

Word Index links for the OpenEventLog :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2007-02-10 12:14:44
Modified: 2007-06-11 16:31:10
Visited in last 7 days: 17
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.166.199.178)
12 sec.Function: 'GetRawInputDeviceInfo'
24 sec.Function: 'ReadConsole'
36 sec.Function: 'CryptDecrypt'
47 sec.Function: 'SetThreadDesktop'
59 sec.Function: 'GetUrlCacheEntryInfo'
1.38 min.Function: 'MAPILogon'
1.58 min.Function: 'GetProcessPreferredUILanguages'
1.77 min.Function: 'GetSystemMetrics'
1.97 min.Function: 'ClientToScreen'
2.15 min.Function: 'NetShareAdd'
Google
Advertise here!