INSTALLUI_HANDLERW callback function (msi.h)
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.
INSTALLUI_HANDLERW InstalluiHandlerw;
int InstalluiHandlerw(
LPVOID pvContext,
UINT iMessageType,
LPCWSTR szMessage
)
{...}
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 |
---|---|
|
The first button is the default button. |
|
The second button is the default button. |
|
The third button is the default button. |
Install message TypesFlag | Meaning |
---|---|
|
Premature termination |
|
Formatted error message |
|
Formatted warning message |
|
User request message. |
|
Informative message for log |
|
List of files currently in use that must be closed before being replaced. |
|
Request to determine a valid source location |
|
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. |
|
Insufficient disk space message |
|
Start of action message. This message includes the action name and description. |
|
Formatted data associated with the individual action item. |
|
Progress gauge information. This message includes information on units so far and total number of units. |
|
Formatted dialog information for user interface. |
|
Sent prior to UI initialization, no string data |
|
Sent after UI termination, no string data |
|
Sent prior to display of authored dialog or wizard |
|
Sent prior to installation of product. |
|
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.
The following return values map to the buttons specified by the message box style:
IDOK
For more information on returning values from an external user interface handler, see the Returning Values from an External User Interface Handler topic.
Note
The msi.h header defines INSTALLUI_HANDLER as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirement | Value |
---|---|
Minimum supported client | 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 |
Target Platform | Windows |
Header | msi.h |