xHarbour Reference Documentation > Function Reference |
Retrieves the error code of the last dynamically called DLL function.
GetLastError() --> nErrorCode
The function returns the last error code that occurred with a DllCall() invoked DLL function.
GetLastError() is used when a Windows API function is invoked via DllCall(). Typically, a WinAPI function declared as BOOL returns 0 on failure. In this case, GetLastError() can be called to retrieve the error code for extended error information.
The last error code can be set with function SetLastError().
See also: | CallDll(), DllCall(), LoadLibrary(), SetLastError() |
Category: | DLL functions , xHarbour extensions |
Source: | rtl\dllcall.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
http://www.xHarbour.com