Show: Delphi C++
Display Preferences

System.GetLastError

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetLastError: Integer; stdcall;

Properties

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

Description

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


Personal tools
In Other Languages
Previous Versions
Assistance