• XbEventGetLastError(@cErrorString)


    • Description
      this function retrieves the last error as string.
    • Parameter(s)

      cErrorString
      must be a reference to a character-var

    • Return Value
      is an numeric value, that represents the Win/NT-Errorcode
  • Sample
    #include "xbevent.ch"

    local nEvtHandle    := 0
    local cError        := space(100)

    //
    // open a Eventlog-Key and directly close key again
    // if an error occoures, we write an errormessage
    // to screen
    //
    if ((nEvtHandle := XbOpenEventLog(, "WinApp")) <= 0)
      XbEventGetLastError(@cError)
      ? "Error :", cError
    else
      XbCloseEventLog(nEvtHandle)
    endif