xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

GetLastError()

Retrieves the error code of the last dynamically called DLL function.

Syntax

GetLastError() --> nErrorCode

Return

The function returns the last error code that occurred with a DllCall() invoked DLL function.

Description

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().

Info

See also:CallDll(), DllCall(), LoadLibrary(), SetLastError()
Category: DLL functions , xHarbour extensions
Source:rtl\dllcall.c
LIB:xhb.lib
DLL:xhbdll.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe