• XbDeRegEventSource(nEvtHandle)


    • Description
      closes a handle returned by the XbRegEventSource function.

    • Parameter(s)

      nEvtHandle
      Identifies the event log whose handle was returned by XbRegEventSource.

    • Return Value
      If the function succeeds, the return value is TRUE, otherwise FALSE.
      To get extended error information, call XbEventGetLastError.
  • 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