When the user application receives an error, find more information about the error by using the Connection object’s GetErrorInfo function. The GetErrorInfo function takes two arguments: a pointer to a character buffer for returning the error message string associated with the error and a pointer to a TD_ErrorType variable for returning the type of error.
conn->GetErrorInfo(&errorStringBuffer, &errorType );
If GetErrorInfo is called and no error has occurred, then the message string will be set to NULL and the error type will be a value of –1.
Some errors which occur during the acquisition method may require the user application to end the acquisition method before error information can be returned to the user application. In these cases, the status code TD_Call_EndAcq will be returned and the user application must proceed to call the EndAcquisition function. The EndAcquisition function will return an error code for the problem which caused the acquisition method to be aborted. At this time, additional error information relating to this error code will be available through the use of the GetErrorInfo function.