BrianHumlicek / J2534-Sharp

A .Net interface for J2534 vehicle communications.
Other
41 stars 13 forks source link

Wrong type of ChannelID #5

Closed Elmue closed 4 years ago

Elmue commented 4 years ago

I just had a quick look into your code and saw that you wrongly defined (in protypes) PassThruConnect( .... IntPtr ChannelID)

Channel ID is UInt32 (always 32 bit) not IntPtr which may be 32 or 64 bit depending on how it is compiled. This is only relevant if compiled for 64 bit. By the way: Did you ever see a 64 bit J2534 DLL ?

BrianHumlicek commented 4 years ago

According to the below link, Channel ID is a pointer to a U32, which is how it is currently coded. If it was passed by value, then I could see an issue, but it is in fact, passed by ref.

http://www.drewtech.com/support/passthru/connect.html