EmbeddedUIHandler Callback Function

Windows Installer

EmbeddedUIHandler Callback Function

The EmbeddedUIHandler function prototype defines a callback function exported by the embedded UI DLL that is defined in the MsiEmbeddedUI table. Call the EmbeddedUIHandler function once for each message sent to the user interface.

Windows Installer 4.0 and earlier:  Not supported. Available beginning with Windows Installer 4.5.

Syntax

C++INT CALLBACK EmbeddedUIHandler(
    UINT uiMessageType,
    MSIHANDLE hRecord
);

Parameters

uiMessageType

Specifies a combination of one message box style, one message box icon type, one default button, and one installation message type.

Include one of the following message box styles. If no value is specified, use MB_OK.

Message box style Meaning
MB_ABORTRETRYIGNORE

The message box contains the Abort, Retry, and Ignore buttons.

MB_OK

The message box contains the OK button. This is the default.

MB_OKCANCEL

The message box contains the OK and Cancel buttons.

MB_RETRYCANCEL

The message box contains the Retry and Cancel buttons.

MB_YESNO

The message box contains the Yes and No buttons.

MB_YESNOCANCEL

The message box contains the Yes, No, and Cancel buttons.

 

Include one of the following message box icon types. If no value is specified, use no icon.

Message box icon type Meaning
MB_ICONEXCLAMATION, MB_ICONWARNING

An exclamation point appears in the message box.

MB_ICONINFORMATION, MB_ICONASTERISK

The information sign appears in the message box.

MB_ICONQUESTION

A question mark appears in the message box.

MB_ICONSTOP, MB_ICONERROR, MB_ICONHAND

A stop sign appears in the message box.

 

Include one of the following default buttons. If no value is specified, use MB_DEFBUTTON1.

Default button 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.

MB_DEFBUTTON4

The fourth button is the default button.

 

Include one of the following installation message types. There is no default installation message type; an installation message type is always specified.

Installation message type 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. 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 the user interface.

INSTALLMESSAGE_INITIALIZE

Sent prior to UI initialization, with no string data.

INSTALLMESSAGE_TERMINATE

Sent after UI termination, with no string data.

INSTALLMESSAGE_SHOWDIALOG

Sent prior to the display of an authored dialog box or wizard.

INSTALLMESSAGE_INSTALLSTART

Sent prior to installation of product.

INSTALLMESSAGE_INSTALLEND

Sent after installation of product.

 

hRecord

Specifies a handle to a record that contains message data. For information about record objects, see the Record Processing Functions.

Return Value

The EmbeddedUIHandler function can return the following values.

Return code Description
-1

An error was found in the message handler.

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 an example of the EmbeddedUIHandler function see Using an Embedded UI.

Requirements

VersionWindows Installer 5.0 on Windows Server 2008 R2 or Windows 7. Windows Installer 4.5 on Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP
HeaderMsi.h

Build date: 8/13/2009

© 2009 Microsoft Corporation. All rights reserved.