GetErrorRecord Method

DTF API

Copy image CopyHover image
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++ F#
public Record GetErrorRecord()
Public Function GetErrorRecord As Record
public:
Record^ GetErrorRecord()
member GetErrorRecord : unit -> Record 
Return Value
Record
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.dll) Version: 3.0.0.0 (3.11.1.2318)