From RAD Studio API Documentation
Jump to: navigation, search


procedure SetLastError(ErrorCode: Integer); stdcall;


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


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