• XbBackupEventLog(nEvtHandle, cFileName)


    • Description
      this function saves the specified event log to a backup file.
      The function does not clear the event log.
    • Parameter(s)

      nEvtHandle
      Identifies the open event log. This handle is returned by the XbOpenEventLog or XbOpenBackupEventLog function.

      cFileName
      points to a string that specifies the name of the backup file.
      The backup filename may contain a server name to open a backup file on a remote server

    • 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 saved Eventlog-File
    //
    if ((nEvtHandle := XbOpenEventLog(, "WinApp")) <= 0)
      XbEventGetLastError(@cError)
      ? "Error :", cError
    else
      if (XbBackupEventLog(nEvtHandle, "SaveLog.Evt") == FALSE)
        XbEventGetLastError(@cError)
        ? "Error :", cError
      endif
    endif