#include "j2534_v0404.h"

long PassThruConnect(unsigned long DeviceID, unsigned long ProtocolID, unsigned long Flags, unsigned long BaudRate, unsigned long *pChannelID);

Establish a logical communication channel with the vehicle network (via the PassThru device) using the specified network layer protocol and selected protocol options.


DeviceID -   Vehicle interface identifier.

ProtocolID -   The protocol identifier selects the network layer protocol that will be used for the communications channel.

Flags -   Protocol specific options that are defined by bit fields. This parameter is usually set to zero.

BaudRate -   Initial baud rate for the channel.

pChannelID -   Pointer to an unsigned long (4 bytes) that receives the handle to the open communications channel. The returned handle is used as an argument to other PassThru functions which require a communications channel reference.

See Also:   PassThruDisconnect


unsigned long Flags = 0;
unsigned long ChannelID;
unsigned long DeviceID;

PassThruOpen(NULL, &DeviceID);
PassThruConnect(DeviceID, ISO15765, Flags, 500000, &ChannelID);

// Perform vehicle communication here