 |
OpenEventLog ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
Opens a handle to the specified event log. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| 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: |
 |
|
 |
 |
| • |
 |
| Created: | 2007-02-10 12:14:44 | | Modified: | 2007-06-11 16:31:10 | Visited in last 7 days: 25 |