GetErrorMessage Method (errorNumber, culture)

DTF API

Copy image CopyHover image
Deployment Tools Foundation GetErrorMessage Method (errorNumber, culture)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerInstallerGetErrorMessage(Int32, CultureInfo)
Gets a Windows Installer error message in a specified language.
Declaration Syntax
C# Visual Basic Visual C++ F#
public static string GetErrorMessage(
	int errorNumber,
	CultureInfo culture
)
Public Shared Function GetErrorMessage ( 
	errorNumber As Integer,
	culture As CultureInfo
) As String
public:
static String^ GetErrorMessage(
	int errorNumber, 
	CultureInfo^ culture
)
static member GetErrorMessage : 
        errorNumber : int * 
        culture : CultureInfo -> string 
Parameters
errorNumber (Int32)
The error number.
culture (CultureInfo)
The locale for the message.
Return Value
String
The message string, or null if the error message or locale is not found.
Remarks

The returned string may have tokens such as [2] and [3] that are meant to be substituted with context-specific values.

Error numbers greater than 2000 refer to MSI "internal" errors, and are always returned in English.

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller.dll) Version: 3.0.0.0 (3.11.1.2318)