PassThruGetLastError

Syntax

#include "j2534_v0404.h"

long PassThruGetLastError(char *pErrorDescription)
;

Description
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.

Parameters
pErrorDescription - Pointer to an 80 character array allocated by the application, which will receive the error description string.


Example:


char ErrorMsg[80]
unsigned long status;
unsigned long ChannelID;

status = PassThruOpen(NULL, &DeviceID);
if (status != STATUS_NOERROR)
{
// Failed! Get descriptive error string.
PassThruGetLastError(ErrorMsg);

// Display Error dialog box and/or write to Log file.
}

BACK