<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=3043170519342045&amp;ev=PageView&amp;noscript=1">

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