System.SetLastError

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure SetLastError(ErrorCode: Integer); stdcall;

Properties

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

Description

SetLastError sets the last API error code.

GetLastError returns the last API error code encountered. It then resets it to 0. SetLastError forces the API error code to the specified ErrorCode value. A call to GetLastError will then return this value before again resetting the error code to 0.

See Also

Code Examples