INSTALLUI_HANDLER callback function
The INSTALLUI_HANDLER function prototype defines a callback function that the installer calls for progress notification and error messages. For more information on the usage of this function prototype, a sample code snippet is available in Handling Progress Messages Using MsiSetExternalUI.
Syntax
INT CALLBACK InstalluiHandler( LPVOID pvContext, UINT iMessageType, LPCTSTR szMessage );
Parameters
- pvContext
-
Pointer to an application context passed to the MsiSetExternalUI function. This parameter can be used for error checking.
- iMessageType
-
Specifies a combination of one message box style, one message box icon type, one default button, and one installation message type. This parameter must be one of the following.
Default ButtonsFlag Meaning - MB_DEFBUTTON1
The first button is the default button.
- MB_DEFBUTTON2
The second button is the default button.
- MB_DEFBUTTON3
The third button is the default button.
Install message TypesFlag Meaning - INSTALLMESSAGE_FATALEXIT
Premature termination
- INSTALLMESSAGE_ERROR
Formatted error message
- INSTALLMESSAGE_WARNING
Formatted warning message
- INSTALLMESSAGE_USER
User request message.
- INSTALLMESSAGE_INFO
Informative message for log
- INSTALLMESSAGE_FILESINUSE
List of files currently in use that must be closed before being replaced.
- INSTALLMESSAGE_RESOLVESOURCE
Request to determine a valid source location
- INSTALLMESSAGE_RMFILESINUSE
List of files currently in use that must be closed before being replaced. Available beginning with Windows Installer 4.0. For more information about this message see Using Restart Manager with an External UI.
- INSTALLMESSAGE_OUTOFDISKSPACE
Insufficient disk space message
- INSTALLMESSAGE_ACTIONSTART
Start of action message. This message includes the action name and description.
- INSTALLMESSAGE_ACTIONDATA
Formatted data associated with the individual action item.
- INSTALLMESSAGE_PROGRESS
Progress gauge information. This message includes information on units so far and total number of units.
- INSTALLMESSAGE_COMMONDATA
Formatted dialog information for user interface.
- INSTALLMESSAGE_INITIALIZE
Sent prior to UI initialization, no string data
- INSTALLMESSAGE_TERMINATE
Sent after UI termination, no string data
- INSTALLMESSAGE_SHOWDIALOG
Sent prior to display of authored dialog or wizard
- INSTALLMESSAGE_INSTALLSTART
Sent prior to installation of product.
- INSTALLMESSAGE_INSTALLEND
Sent after installation of product.
The following defaults should be used if any of the preceding messages are missing: MB_OK, no icon, and MB_DEFBUTTON1. There is no default installation message type; a message type is always specified.
- szMessage
-
Specifies the message text.
Return value
- -1
-
An error was found in the message handler. Windows Installer ignores this returned value.
- 0
-
No action was taken.
The following return values map to the buttons specified by the message box style:
IDOK IDCANCEL IDABORT IDRETRY IDIGNORE IDYES IDNO
Remarks
For more information on returning values from an external user interface handler, see the Returning Values from an External User Interface Handler topic.
Requirements
|
Version | Windows Installer 5.0 on Windows Server 2012, Windows 8, Windows Server 2008 R2 or Windows 7. Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Installer on Windows Server 2003 or Windows XP |
|---|---|
|
Header |
|
|
Unicode and ANSI names | INSTALLUI_HANDLERW (Unicode) and INSTALLUI_HANDLERA (ANSI) |
See also
Build date: 11/30/2012