Page History
...
In the following example, the Windows functions MessageBeep and MessageBoxA (the ANSI version of MessageBox()) are used to inform the user of a problem. The return value from MessageBeep is discarded; the return value from MessageBoxA is used to determine whether or not to abort.
The function prototypes for MessageBeep and MessageBox, in the DLL_USER32 prototype record in the SYSPROCS table, are as follows:
Code Block |
---|
INT STDCALL MessageBeep(UINT) INT STDCALL MessageBoxA(HANDLE,LPCHAR,LPCHAR,UINT) AS MessageBox |
In the function prototype, both MessageBeep() and MessageBoxA() return an INT. MessageBeep() is declared as a subroutine because its return value is not used. However, MessageBoxA() is declared as a function because its return value is used (to determine which button the user clicked on).
...