PCAN-Basic with VB6 on 64 bit machine.

The free CAN Software API (Application Programming Interface) for Windows®
Post Reply
BobboH
Posts: 2
Joined: Tue 7. May 2024, 02:31

PCAN-Basic with VB6 on 64 bit machine.

Post by BobboH » Tue 7. May 2024, 02:55

We have a number of automatic test systems which use PCAN-USB devices, which were written in VB6.
Our IT security policy requires us to update to Win 11 64 bit in the near future.
Our system loads scripts depending on the units to be tested. These scripts load a PCAN wrapper dll (COM visible 32 bit) which is attached to the script control as required.

I believe that we will need to write a 64 bit .dll wrapper around PCAN-Basic.
However I also believe that the 64 bit dll will not be loadable from the test software running as a 32 bit process.
Has anyone encountered this problem, or can anyone point me at a possible solution?

K.Wagner
Software Development
Software Development
Posts: 1080
Joined: Wed 22. Sep 2010, 13:36

Re: PCAN-Basic with VB6 on 64 bit machine.

Post by K.Wagner » Tue 7. May 2024, 08:52

Hello,

this question is out of topic (it has more to do with general programming, not with our API). Nevertheless, here my comments.
BobboH wrote:
Tue 7. May 2024, 02:55
I believe that we will need to write a 64 bit .dll wrapper around PCAN-Basic.
Note that you do not need to work or write a 64-Bit version of dlls or applications, only because you are working in a x64 Bit Windows system. You can still use your 32-Bit applications, as long as they are still compatible on the target system. If your scrips works as 32-bit processes (what I assume, as VB6 is 32-bit) then you could keep using your solution as you already do, even on a 64-bit Windows.
BobboH wrote:
Tue 7. May 2024, 02:55
However I also believe that the 64 bit dll will not be loadable from the test software running as a 32 bit process.
Yes, this is true.

According to Microsoft, it is possible to work mixing 32-bit and 64-bit solutions, if you work with COM services or wrap libraries as a COM.
See this microsoft knowledge page.

Hope this information helps your further.
Best regards,
Keneth

BobboH
Posts: 2
Joined: Tue 7. May 2024, 02:31

Re: PCAN-Basic with VB6 on 64 bit machine.

Post by BobboH » Tue 7. May 2024, 09:38

Thanks Keneth I will check it out.

K.Wagner
Software Development
Software Development
Posts: 1080
Joined: Wed 22. Sep 2010, 13:36

Re: PCAN-Basic with VB6 on 64 bit machine.

Post by K.Wagner » Tue 7. May 2024, 09:45

Hello again,

just a final note on this,
BobboH wrote:
Tue 7. May 2024, 02:55
However I also believe that the 64 bit dll will not be loadable from the test software running as a 32 bit process.
so that there are no misunderstandings: Note that our setup installs the 32-bit and the 64-bit PCAN-Basic dll. If the test software is running on a WIndows 64-bit, it will load the right dll (32 vs 64) according to its structure. In other words, if your test is running as 32-bit process, it will load the 32-bit PCAN-Basic dll.
Best regards,
Keneth

Post Reply