Microsoft KB Archive/59977

= Mac Hyp: Using HyperCard Global Variables for Error Checking =

Article ID: 59977

Article Last Modified on 10/30/2006

-

APPLIES TO


 * Microsoft Mail Software Development Kit (SDK) for HyperCard 2.0
 * Microsoft Mail Software Development Kit 3.0

-



This article was previously published under Q59977



SUMMARY
The Microsoft Mail Software Development Kit (SDK) for HyperCard uses two HyperCard global variables to report the results of the msmail external function call. These variables are as follows:

mailResult

mailResultText

The HyperCard global mailResult holds a number that is the return code of the last call made to msmail. This is zero if the call succeeded. If an error occurred, the HyperCard global mailResultText contains a textual description of the error. If no error has occurred, mailResultText contains &quot;No Error.&quot;

Global variables are used by declaring them as globals in the script with the Global command. For example: on mouseup global mailResult, mailResultText put msmail(CreateMessage) into msref if mailresult <> 0 then answer &quot;Error: &quot; & mailResultText exit mouseup end if     .... If a call to the server is not successful, these functions are the only way to find out that there has been an error. They are very useful in debugging and in making a stack &quot;bullet-proof&quot; in operation.

This information is taken from the &quot;Microsoft Mail HyperCard Interface Documentation.&quot;

Keywords: KB59977

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.