How do I interpret error return values from SeaMAX functions when debugging my SeaMAX program?

The SeaMAX API Documentation is the go-to source for understanding the error return values of a SeaMAX function. The SeaMAX documentation for each function provides insight into what the SeaMAX function encountered.

In addition to the error code directly returned by the function, SeaMAX stores information about the last error that its functions encountered.  This information can be retrieved by using the SeaMAX functions SM_GetLastError(), SM_GetLastWin32Error(), and SM_GetLastFTDIError(). These error reporting mechanisms are integrated in the example below.