大网数据广告活动
安装更新与部署

Returning Values from an External User Interface Handler

· 52CE 我爱测

An external user interface (UI) handler can return any number of values to Windows Installer depending on the button type provided in the message type parameter the installer passes to the handler.

An external user interface (UI) handler can return any number of values to Windows Installer depending on the button type provided in the message type parameter the installer passes to the handler.

The external UI handler can return the values –1 and 0 at any time because these are not related to the button types. A return value of –1 indicates that an internal error occurred in the external UI handler. A return value of 0 indicates that the external UI handler has not handled the installer message and the installer must handle the message instead.

For messages that do not include a button type, such as INSTALLMESSAGE_ACTIONDATA and INSTALLMESSAGE_PROGRESS, returning IDCANCEL cancels the installation. Returning IDOK notifies the installer that the message was handled by the external UI handler.

The remaining return values, as described below, are directly related to the button types that are included with the message type.

External UI return value Meaning
IDOK The OK button was pressed by the user. The message information was understood.
IDCANCEL The CANCEL button was pressed. Cancel the installation.
IDABORT The ABORT button was pressed. Abort the installation.
IDRETRY The RETRY button was pressed. Try the action again.
IDIGNORE The IGNORE button was pressed. Ignore the error and continue.
IDYES The YES button was pressed. The affirmative response, continue with current sequence of events..
IDNO The NO button was pressed. The negative response, do not continue with current sequence of events.

For example, if the external UI handler is sent a message with the MB_ABORTRETRYIGNORE message box styles flag, the external UI handler can return one of the following values:

  • –1 (error in external UI handler)
  • 0 (no action taken in external UI handler, let Windows Installer handle it)
  • IDABORT (ABORT button pressed)
  • IDRETRY (RETRY button pressed)
  • IDIGNORE (IGNORE button pressed)

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。