System.SysUtils.SysErrorMessage

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function SysErrorMessage(ErrorCode: Cardinal; AModuleHandle: THandle): string;

C++

extern DELPHI_PACKAGE System::UnicodeString __fastcall SysErrorMessage(unsigned ErrorCode, Winapi::Windows::THandle AModuleHandle = (unsigned)(0x0));

Properties

Type Visibility Source Unit Parent
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils

Description

Converts OS error codes into strings.

SysErrorMessage returns an error message string that corresponds to the specified OS error code. The AModuleHandle parameter is a module handle containing the message-table resource(s) to search. If the AModuleHandle parameter is set to NULL, then the current process's application image file is searched.

Note: You can get the error code associated with a specific error using the System.GetLastError function.

See Also