MLError() longMLError(MLINKlink) returns a constant identifying the last error to occur on link, or 0 if none has occurred since the previous call to MLClearError(). You can get a textual description of errors by calling MLErrorMessage(). Constants corresponding to standard MathLink errors are defined in mathlink.h. See the Mathematica book: Section 2.12.13.
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT. SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.