Create a VB6 application using a class in a DLL, and then replace that DLL after assembly?

so my question is relatively simple, can I create a VB6 application that references a class in the dll and then replace that dll with another at runtime?

Now my main hunch is that there is no chance in VB6.

So my thoughts turned into a dll VB.net interop. Can I do this here and then call the interop dll from VB?

Again, my hunch will not be ... but I would be happy if someone knew otherwise.

The only thing that in my opinion will work is the DI in .Net, but I am limited to .net 2 or 3.5 with a big press, so I don’t know if this is possible.

So for the background ....

I have a dll that uses a specific site, but we do not want to pass it on to everyone. Instead, we want to create a clone dll that simply installs the interfaces to complete the VB6 build. When he gets to the site that needs him, they want to replace dummy dll and instead insert his version.

Note. We use RegFreeCOM when it is installed, so I have manifest files that I could play with if needed.

Any ideas would be highly appreciated.

Nick

+6
source share
2 answers

Its dll COM library is therefore not statically linked to VB6 exe, if the clsids and interface identifiers are the same in the type library for both DLLs, you can change them as you wish. (If its dll VB6 it is trivial to do with the ability to build binary compatibility)

+8
source

Instead, you can use late binding, and instead of making the link directly in VB6 code, you must create an object and then set that object to an instance. Examples and information:

MVPS

Microsoft

+1
source

Source: https://habr.com/ru/post/901725/


All Articles