From RAD Studio API Documentation
Jump to: navigation, search


function GetLastError: Integer; stdcall;


Type Visibility Source Unit Parent
function external public WindowsAPIs.INC System System


Returns the last error reported by an operating system API call.

GetLastError returns the last error reported by an API call into the operating system. Calling this function usually resets the operating system error state. The GetLastError function returns an error code from the operating system. After that, when calling SysErrorMessage on that error code, GetLastError will return a string with a formatted error message associated with the error code.

See Also

Code Examples