Quantex GmbH
Η περιοχή σας: Ευρώπη

PassThruOpen Establish communication with the VCI

Description

The function establishes a connection with the VCI. Not with a car. One DLL can work simultaneously with several VCIs. VCIs must have different IP addresses.

long PassThruOpen(void* pName, unsigned long* pDeviceID)

Options

Returned error codes

Definition Description
STATUS_NOERROR Function completed successfully
ERR_DEVICE_NOT_CONNECTED No connection to the VCI. Possible reasons: The VCI is turned off, there is no network, or the IP address is not set correctly.
ERR_DEVICE_IN_USE The device is already in use by the program. Possible reasons: The PassThruClose function was not executed in the previous session.
ERR_NULL_PARAMETER PDeviceID not set
ERR_FAILED Defined by the J2534 standard. In the VCI, it is not used for this function.

Example

#include "j2534_lib.hpp"

unsigned long DeviceID;
long Ret;

Ret = PassThruOpen("192.168.1.3", &DeviceID);
if (Ret != STATUS_NOERROR)
{	// Error handling
}

// Further, DeviceID is used in the following functions.
PassThruConnect(DeviceID, ISO14230, Flags, 10400, &ChannelID);
PassThruDisconnect(ChannelID);
PassThruClose(DeviceID);