RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.SetLastError Function

SetLastError sets the last API error code.

Pascal
procedure SetLastError(ErrorCode: Integer); stdcall;
C++
__stdcall SetLastError(int ErrorCode);

System

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. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!