System.SetLastError

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

procedure SetLastError(ErrorCode: Integer); stdcall;

C++

extern "C" void __stdcall SetLastError(int ErrorCode);

Properties

Type Visibility Source Unit Parent
procedure
function
external public
WindowsAPIs.INC
System.hpp
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