Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RDweb: Cannot run legacy VB6 DLL more than once, at the same time

We have a VB6 program installed on all of our clients' local C drives, along with an associated VB6 DLL program. The program was written back before my time in the 90s. It was not designed to run off a server or to allow multiple user access to the same EXE at the same time, hence why it's on everyone's C drive. However, all running sessions of it refer to the same database source on a separate SQL Server via ODBC. The database connectivity works fine.

Ok that's all history, with everyone working remotely (Covid19)!

Today however, our clients are all remoting into a virtual server via RD Web. We want them to avoid using our VPN. We have TWO virtual servers allocated to RDweb users: TS01 and TS02, and license for up to 64 users. Every user is automatically allocated one of the two servers. If two people log in at the same time, and one in TS01 and the other in TS02 - everything is fine! It's when a 3rd person logs in and is given either of the servers, and runs the program, is when it crashes, with this error:

enter image description here

The DLL is registered in both Computer\HKEY_CLASSES_ROOT\ and Computer\HKEY_LOCAL_MACHINE\SOFTWARE\, but not LOCAL_USER, which I think is necessary to make this be a multi-user program, within a server environment.

Converting the app is not an option, as we don't have VB6 compilers. Do we need to wrap the DLL in "something"?

Any ideas how to get this legacy program to run for multiple users, are appreciated.

Thanks

like image 380
Fandango68 Avatar asked Apr 07 '20 22:04

Fandango68


1 Answers

Try installing/copying VB program and related DLLs in each users folders (like home folder and shortcuts pointing to these HOME directories). If the program runs, it should update the database in the same way. Sometimes, most workarounds are simple. If they need different locked DLL working space then give them that (May have memory issues later)

Please see this https://stackoverflow.com/a/345154/12011019

and

https://learn.microsoft.com/en-us/archive/msdn-magazine/2005/april/simplify-app-deployment-with-clickonce-and-registration-free-com

Some DLLs are not designed to be shared and this behaviour cannot be modified without reprogramming. There are in process and out process (threads ) DLLs. Or there can be many other issues. If its not working, its not allowed by design.

https://support.microsoft.com/en-au/help/911359/a-client-application-may-intermittently-receive-an-error-message-when

The shared DLLs that are used system wide do not have this limitation as many they are designed to be used by many applications. Please try and comment the behaviour.

like image 188
Ray Mo Avatar answered Nov 15 '22 10:11

Ray Mo