View Single Post
Old 09-13-2004, 11:55 AM   #27
god_of_cpu
Raw Wave
 
god_of_cpu's Avatar
 
Join Date: Jan 2004
Location: SilverSpring Maryland
Posts: 2,957
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.
__________________
StreetDeck.com Developer (I am Chuck)
Get StreetDeck at http://www.streetdeck.com
The Official StreetDeck Forums have moved, please visit us at http://www.streetdeck.com/forum for official support for Streetdeck.
god_of_cpu is offline   Reply With Quote