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


#include "j2534_v0404.h"

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

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

pName - Pointer to a null terminated C-string that identifies a PassThru device. Permitted values include: an IPv4 address in dot-decimal notation, a serial port in COM# notation, or the unit's configurable name. Pass a NULL pointer to search all ports and present a selection dialog if more than one device is discovered.

pDeviceID - Pointer to an unsigned long (4 bytes) that receives a handle to the vehicle interface. The returned handle is used as an argument to other PassThru functions which require a vehicle interface but not an active communication channel.

See Also: PassThruClose


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

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

// Perform vehicle communication here