Most functions in the C API return a value that is a return code, and have an optional input parameter that is a handle for an error block. This section describes the respective roles of the return code and the error block.
The return code from a C function call indicates whether the call was successful. The return code has data type xmsRC. Table 1 shows the possible return codes and their meaning.
When an application calls a C function, the application can include a handle for an error block as an input parameter on the call. If the call fails, XMS stores information in the error block about why the call failed. The application can then retrieve this information from the error block.
The exception code matches the JMS exception that is thrown by a JMS method in the same circumstances.
XMS provides a set of helper functions to create an error block and extract information from it. An application must use a helper function to create an error block and obtain a handle for it before calling the first function that can accept the handle as an input parameter. If the function call fails, the application can then use other helper functions to extract information about the error that XMS has stored in the error block. For details of these helper functions, see ErrorBlock.