Mega Code Archive

 
Categories / Delphi / Examples
 

Getlasterror last error code

Question: How can I find out what the error code reported by GetLastError() means? Answer: Use the Windows function SysErrorMessage() as shown below begin // .. some code that causes an error e.g. // an unsuccessful CopyFile() ShowMessage(SysErrorMessage(GetlastError)); end;