INSTALLUI_HANDLER

[This is preliminary documentation and subject to change.]

The INSTALLUI_HANDLER function prototype defines a callback function that the Installer Service calls for progress notification and error messages.

INT(WINAPI*INSTALLUI_HANDLER)(
  LPVOID pvContext,   // application context
  UINT iMessageType,  // message type
  LPCTSTR szMessage   // message
);
 

Parameters

pvContext
Enables the application to determine its context when it is called back.
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.
Message Box StylesFlag 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.

Message Box IconTypesFlag 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.

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.
MB_DEFBUTTON4 The fourth button is the default button.

Install Message TypesFlag Meaning
INSTALLMESSAGE_OUTOFMEMORY Out-of-memory message
INSTALLMESSAGE_ERROR Formatted error message
INSTALLMESSAGE_WARNING Formatted warning message
INSTALLMESSAGE_USER User request message.
INSTALLMESSAGE_INFO Informative message for log
INSTALLMESSAGE_DIAGNOSTIC Debug notification. This message displays if there is no log.
INSTALLMESSAGE_COMMONDATA Dialog information for UI. Type of data is specified in the first field, parameters follow in remaining fields. Fields are separated by colons. Types of COMMONDATA messages are:

1:LanguageID

2:Dialog Caption

3:Boolean, 1 to show cancel button, 0 to hide

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_ACTIONDONE End of action sequence. Indicates an exit-modeless dialog box.

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 Values

-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