
With the Mini-VCI, I could never, ever get the active data list for the engine control module. That really was helpful, and it has gotten me through all of the maintenance on my Gen 3 that I've needed to do over the last year. Printf("usable OpenPort 2.About a year ago, while I was feeling very indecisive about all the choices of cheap eBay dongles (mostly clones of the XHorse Mini-VCI) that might or might not work well with my car and Techstream, I was helped out by someone who had already been down that road, and picked out for me an old beater Windows 7 laptop and a Mini VCI and took care of all the installation for me. If (!j2534.PassThruIoctl(NULL,TX_IOCTL_GET_DEVICE_INSTANCES,NULL,name)) use ioctl call to get available instances #define TX_IOCTL_GET_DEVICE_INSTANCES (TX_IOCTL_BASE+4)
The following example demonstrates this method: You do not really need to examine or use the contents of this string for most purposes - it is enough to know that the IOCTL has returned success to know that a device is present, and usable. TX_IOCTL_GET_DEVICE_INSTANCES accepts a pointer to a wide character string as output data which will hold the device path to an available device, if one exists.
A device is opened exclusively, so if another process (or even your process) is also checking for the presence of a device, you may encounter a race condition where the other process has the device open briefly, and you will therefore detect nothing.įor these reasons and more, we have added a special Tactrix-specific IOCTL to simplify the detection of our hardware. A device is opened exclusively, so if another process (or even your process) already has the device open, a failed attempt to re-open the device will be indistinguishable from there being no device at all. starting new threads within the DLL)- you may not be able to poll this way very frequently.
Opening the device incurs some overhead (e.g.You must close this device with PassThruClose if your PassThruOpen was successful.You end up with a opened device when you may have just wanted to know if the device is there - even though you are not ready to use it.It is possible to use the PassThruOpen call and look for for success or failure to determine if a device is present, but this is undesirable for a number of reasons. The standard J2534 API does not effectively address this issue. It is customary in an application to give the user some feedback that a needed device is plugged in and ready to be used.