long PassThruGetLastError(char *pErrorDescription) ;
Retrieve a text description for the most recent PassThru error as a null terminated C-string. Call this function immediately after an error occurs. The error string refers to the most recent function call, rather than a specific DeviceID or ChannelID, and any subsequent function call may clobber the description.
pErrorDescription - Pointer to an 80 character array allocated by the application, which will receive the error description string.
unsigned long status;
unsigned long ChannelID;
status = PassThruOpen(NULL, &DeviceID);
if (status != STATUS_NOERROR)
// Failed! Get descriptive error string.
// Display Error dialog box and/or write to Log file.