VM167 Dll not unloading VB6

I have an app written in VB6 which was using the K8055 board. I have modified the code to use the new VM167 board but have a small problem.

When developing the program in VB6, if I run the program to test it and then stop it, the next time I run the program it will not talk to the board.
The soloution seems to be to shut VB6 and open it again which somehow releases the hold over the board.

I am disconnecting from the card (CloseDevices) when I quit the program but it still wont work unless the IDE is restarted.

I ran some tests by opening your example program and then mine which caused mine not to work (as the board is already connected???) so I understand that it must think that the board is already connected so cant use it but nothing else is using it.

It worked fine with the K8055 board …HELP!!!

Strange problem indeed.
I tested the VB6 demo on 64-bit Windows 7 with the drivers v1.0.0.6 and v1.0.0.2 without any problems.

Do you get the error message “Card open error” next to the Open button when you run the VB6 demo program?
This should only indicate that other program is using the card.

Do you have possibility to test the board with newer Visual Basic version, e.g. VB 2010 ?
Are there similar problems?

HI, yes if I use the demo program when I open it the first time it runs fine, but if I stop it and then restart from within VB6 it says “Card Open Error” and I have to restart VB6. This only seems to happen in VB6 at design time, if I compile the program to an EXE and run it it will work.

For some reason VB6 design is locking the card?

I only have VB6 at the moment.

I succeeded to reproduce the issue.
It occurs only if the debugging is terminated by the square “End” button of the IDE (either in the Run menu or on the toolbar).
As a workaround please use the close button of the application’s form to terminate the debugging.

This problem seems to occur only in VB6. The newer VB versions work OK.

Thankyou!

Seems a bit strange but at least I know how to get round it now. At some stage I will move to .net but have to finish this project first!

Thankyou again for your amazing support, much better and quicker than most of the “paid for” support I have encountered!

:slight_smile:

Hi, in a previous comment you mentioned that you got it working with “drivers v1.0.0.6 and v1.0.0.2”. By default the vm167.dll is provided still as version 1.0.0.0!

On a64-bit Windows 7 I delevoped an Excel-based implementation. It worked really excellent. Under Window 8 however it is not even possible to successfully register the dlls. The “dllsetup.exe” completes without any error. A manual registration with “regserv32” however indicates that over required entry points would be missing. The registration fails.

My questions:

  1. Could you please provide the newer dlls to check, if the issue could be solved?
  2. What hints do you have for a usage in Windows 8?

Cheers,
Thomas

The VM167.DLL is a standard Windows DLL, you cannot reference it.
It is not a COM nor an OCX (ActiveX) component.
A standard .DLL file can not be registered as a component, the task regsvr32 is designed to do.
For more info: viewtopic.php?f=3&t=7274
viewtopic.php?f=3&t=7665