Problem with "PCANBasic.dll"

The free CAN Software API (Application Programming Interface) for Windows®

Problem with "PCANBasic.dll"

Postby jmsc » Fri 16. Sep 2011, 12:40

Hello.

I'm developing an aplication using win7 64bit and vb.net 2010.

I have a problem with the library "PCANBasic.dll". I can't add this library to the vb project as reference because vb.net reports an error. The error says that the library is not a valid COM. How can I reference it? PCANBasic.vb needs PCANBasic.dll...

I try register PCANBasic.dll in windows 7 using the command "regsvr32.exe" but windows reports me an error. The error says: "Windows charge the library but couldn't find a point of entry"

Regards.
Last edited by jmsc on Tue 20. Sep 2011, 11:14, edited 2 times in total.
jmsc
 
Posts: 2
Joined: Fri 16. Sep 2011, 12:26

Re: Problem with "PCANBasic.dll"

Postby K.Wagner » Fri 16. Sep 2011, 13:05

Dear,

the error message you are receiving is actually "right" :) . The file PCANBasic.dll is neither an assembly (.Net library) nor a COM class. The PCANBasic.dll is a normal (unmanaged) Dynamic Link Library.

Within .NET, such libraries are loaded dynamically at runtime. The only thing you have to include in your project is the header file PCANBasic.vb and then you can use the Namespace Peak.Can.Basic. [ :geek: Take a look in the example project PCANBasicExample]

You have to ensure the availability of the PCANBasic.dll on the system where you are developing or running your application, particulary if you are using a 64-Bit operating system (See this topic). You can copy the PCANBAsic.dll file in the same folder where you have your executable or you can copy the dll into the System folder of Window. It is up to you.

Happy programming....
Best regards,
Keneth
User avatar
K.Wagner
Software Development
Software Development
 
Posts: 134
Joined: Wed 22. Sep 2010, 13:36
Location: Darmstadt, Germany

Re: Problem with "PCANBasic.dll"

Postby jmsc » Fri 16. Sep 2011, 17:31

Dear,

Thank you for your answer.

Regards.
jmsc
 
Posts: 2
Joined: Fri 16. Sep 2011, 12:26


Return to PCAN-Basic