To provide user interaction, an object can use the standard COM interface IMsgBox, which is inherited from IUnknown. The interface is not available on the server or in external connections.
Confirm
Description:
Displays a dialog box with text specified in queryText and buttons OK and Cancel.
Syntax:
HRESULT Confirm(const BSTR queryText, VARIANT* retVal);
Parameters:
queryText
Type: BSTR. Question text.
retVal
Type: VARIANT. Return value of the dialog box, which has VT_BOOL type: TRUE for clicking OK, or FALSE for clicking Cancel.
Return value:
- S_OK - the dialog box is displayed.
-
E_FAIL - displaying dialog boxes is not supported.
Alert
Description:
Displays a simple notification dialog box with text specified in queryText and OK button.
Syntax:
HRESULT Alert(BSTR queryText);
Parameters:
queryText
Type: BSTR. Message text.
Return value:
- S_OK - the dialog box is displayed.
-
E_FAIL - displaying dialog boxes is not supported.
Next page: Getting platform info