nEvtHandle
Identifies the event log whose handle was returned by XbRegEventSource.
nType
Specifies the type of event being logged.
This parameter can be one of the following values:
| Value | Meaning |
| EVENTLOG_ERROR_TYPE | Error event |
| EVENTLOG_WARNING_TYPE | Warning event |
| EVENTLOG_INFORMATION_TYPE | Information event |
| EVENTLOG_AUDIT_SUCCESS | Success Audit event |
| EVENTLOG_AUDIT_FAILURE | Failure Audit event |
nEvtID
Specifies the event identifier. The event identifier specifies the message that goes
with this event as an entry in the message file associated with the event source.
cEvtString
Points to a buffer containing an string that are merged into the message before
Event Viewer displays the string to the user.
- Sample
#include "xbevent.ch"
local nEvtHandle := 0
local cError := space(100)
//
// open a Eventlog-Key
//
if ((nEvtHandle := XbRegEventLog(, "WinApp")) <= 0)
XbEventGetLastError(@cError)
? "Error :", cError
else
XbReportEvent(nEvtHandle, nType, nEvtID, cEvtString)
XbDeRegEventLog(nEvtHandle)
endif