Quantex GmbH
DE RU EN

PassThruClose Disconnect from adapter

Description

The function terminates the connection with the adapter. The command should be executed when the program terminates. This automatically closes all open protocols using the PassThruDiconnect command.

long PassThruClose(unsigned long DeviceID)

Options

Returned error codes

Definition Description
STATUS_NOERROR Function completed successfully
ERR_DEVICE_NOT_CONNECTED No connection to adapter. Possible reasons: The adapter is turned off, there is no network, or the IP address is not set correctly.
ERR_INVALID_DEVICE_ID Set a non-existent adapter ID DeviceID
ERR_FAILED Defined by the J2534 standard. In the adapter, it is not used for this function.

Example

#include "j2534_lib.hpp"

unsigned long DeviceID;
unsigned long Ret;

Ret = PassThruClose(DeviceID);
if (Ret != STATUS_NOERROR)
{
// Error handling
}