xHarbour Reference Documentation > Function Reference |
Sets a numeric value as last error code.
SetLastError( <nNewErrorCode> ) --> nOldErrorCode
The function returns the current error code of GetLastError().
SetLastError() is used to void any previous error code returned by GetLastError() before a DLL function is executed. Normally, the function is called with the parameter 0, which means "no error". If GetLastError() returns a value <> 0 when the DLL function has returned, a programmer can be sure that the error occured within this DLL function.
See also: | CallDll(), DllCall(), GetLastError() |
Category: | DLL functions , xHarbour extensions |
Source: | rtl\dllcall.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
http://www.xHarbour.com