Quote: Originally Posted by stevieg
It's not however showing the version information etc, it says the PID I am looking for is not supported
API_OBDII_Mode1_IsPIDSupported returns a C BOOL which is actually a long and is NOT the same a VB Boolean varible. You should be comparing the returned value of API_OBDII_Mode1_IsPIDSupported or any of the other functions that return a C BOOL to 0 or 1. i.e.:
Code:
Private Const cFALSE As Long = 0
Private Const cTRUE As Long = 1
' check if the vehice speed PID is supported
If API_OBDII_Mode1_IsPIDSupported(m_lpUser, eOBDPIDVehicleSpeed) = cFALSE Then
lstData.AddItem "ERROR: Vehicle Speed is not supported"
End If
Also, you dont need the OBDII. before all your dll functions calls. I used a class to store all the imported functions in C++, but this probably just complicates things for you in VB.