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 ?
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.
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 ?