Message Method (messageType, record)

DTF API

Copy image CopyHover image
Deployment Tools Foundation Message Method (messageType, record)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerSessionMessage(InstallMessage, Record)
Performs any enabled logging operations and defers execution to the UI handler object associated with the engine.
Declaration Syntax
C# Visual Basic Visual C++ F#
public MessageResult Message(
	InstallMessage messageType,
	Record record
)
Public Function Message ( 
	messageType As InstallMessage,
	record As Record
) As MessageResult
public:
MessageResult Message(
	InstallMessage messageType, 
	Record^ record
)
member Message : 
        messageType : InstallMessage * 
        record : Record -> MessageResult 
Parameters
messageType (InstallMessage)
Type of message to be processed
record (Record)
Contains message-specific fields
Return Value
MessageResult
A message-dependent return value
Remarks

Logging may be selectively enabled for the various message types. See the EnableLog(InstallLogModes, String) method.

If record field 0 contains a formatting string, it is used to format the data in the other fields. Else if the message is an error, warning, or user message, an attempt is made to find a message template in the Error table for the current database using the error number found in field 1 of the record for message types and return values.

The messageType parameter may also include message-box flags from the following enumerations: System.Windows.Forms.MessageBoxButtons, System.Windows.Forms.MessageBoxDefaultButton, System.Windows.Forms.MessageBoxIcon. These flags can be combined with the InstallMessage with a bitwise OR.

Note, this method never returns Cancel or Error values. Instead, appropriate exceptions are thrown in those cases.

Win32 MSI API: MsiProcessMessage

Exceptions
Exception Condition
InvalidHandleException the Session or Record handle is invalid
ArgumentOutOfRangeException an invalid message kind is specified
InstallCanceledException the user exited the installation
InstallerException the message-handler failed for an unknown reason

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