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

Syntax

#include "j2534_v0404.h"

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

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

Parameters
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


Example:


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

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

// Perform vehicle communication here

PassThruDisconnect(ChannelID);
PassThruClose(DeviceID);

BACK