SHELL_Message

include shell.inc
mov ebx, Handle             ; virtual machine handle
mov eax, Flags              ; message box flags
mov ecx, OFFSET32 Message   ; address of message text
mov edi, OFFSET32 Caption   ; address of caption text
mov esi, OFFSET32 Callback  ; address of callback
mov edx, ReferenceData      ; reference data for callback
VxDcall SHELL_Message

jc  error
or eax, eax                 ; nonzero if success
 

Displays a message box using the Windows shell. Uses EAX and Flags.

Handle
Handle of the virtual machine responsible for the message.
Flags
Message box flags. See the MB_ symbols in the SHELL.INC file.
Message
Address of a null-terminated string containing the message text.
Caption
Address of a null-terminated string containing the caption text. If this parameter is zero, the service uses the standard caption. If this parameter points to an empty string, the message box has no caption.
Callback
Address of the callback procedure to process the user's response when the message box returns. If this parameter is zero, no callback procedure is called.
ReferenceData
Reference data to pass to the callback procedure.

The strings pointed to by the ECX and EDI registers must remain valid until the callback procedure is called. In other words, the memory for those strings should not be freed until the callback is made.

The system calls the callback procedure after the user closes the message box. The callback receives the following input parameters:

mov eax, Response       ; response code from the message box
mov edx, ReferenceData  ; points to reference data
call [Callback]
 

The response code in the EAX register is one of the ID symbols defined in the SHELL.INC file. The EBX register may or may not contain the current virtual machine handle when the callback is called. The callback must not rely on its value. If this service returns an error, a virtual device can use the SHELL_SYSMODAL_Message service to force the system to display a message.