GETLASTERR( ) Function

Retrieves the last error that occurred.

nErrLen = GETLASTERR(cBuffer, nLen)

Return Values

Integer

Parameters

  • cBuffer
    Where to store the error message.
  • nLen
    The length of cBuffer.

Remarks

Returns the length of the string stored in cBuffer if successful; -1 otherwise.

You need to pass the cBuffer argument by reference rather than by value for Visual FoxPro to be able to store a value in the buffer. In Visual FoxPro, for example, declare the function with @ after the second string. Arguments are passed by reference by default in Word Basic.

Because there is no way to create and read a buffer in a Help file macro, this function is not useful as a registered routine in Help.

See Also

Fpole.dll | Fpole.dll Examples | FOXDOCMD( ) | FOXEVAL( ) | SETERRMODE( ) | SETOLEOBJECT( ) | CLOSEIT( ) Function