GetErrorRecord Method

Microsoft Deployment Tools

Deployment Tools Foundation GetErrorRecord Method
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerInstallerExceptionGetErrorRecord()()()
Gets extended information about the error, or null if no further information is available.
Declaration Syntax
C# Visual Basic Visual C++
public Record GetErrorRecord()
Public Function GetErrorRecord As Record
public:
Record^ GetErrorRecord()
Return Value
A Record object. Field 1 of the Record contains the installer message code. Other fields contain data specific to the particular error.
Remarks

If the record is passed to Message(InstallMessage, Record), it is formatted by looking up the string in the current database. If there is no installation session, the formatted error message may be obtained by a query on the Error table using the error code, followed by a call to ToString()()(). Alternatively, the standard MSI message can by retrieved by calling the GetErrorMessage(Record, CultureInfo) method.

The following methods and properties may report extended error data:

The Record object should be Close()()()d after use. It is best that the handle be closed manually as soon as it is no longer needed, as leaving lots of unused handles open can degrade performance.

Win32 MSI API: MsiGetLastErrorRecord

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller) Version: 3.0.0.0 (3.5.1623.0)