0

I developed a DLL library (let's call it comp.dll) used by a third-party application (let's call it app.exe) as an additional plugin.

No intervention in app.exe on my part is possible.

At this stage, there is a problem loading by process app.exe of several comp.dll different versions simultaneously.

The file and folder structure is as follows:

App folder

   |______  app.exe

   |______   comp ver 1.0 folder
                            |______ comp.dll

   |______ comp ver 2.0 folder
                            |______ comp.dll

It is necessary to make it possible for the app.exe to dynamically, during its lifetime, load comp.dll from 'comp ver 1.0 folder' and comp.dll from 'comp ver 2.0 folder' at the same time.

I'll try to describe some examples. "App.exe" works with some data file "test.dat". Functions for processing of data from "test.dat" are implemented in "comp.dll". In "tast.dat" also provided the path to "comp.dll" where it is stored on the disk storage device. "App.exe" read path to "comp.dll" from "test.dat", load this dll and call functions to process data from "test.dat". For one file all is ok. Now, let's consider two files: "test1.dat" and "test2.dat". If both files use the "comp.dll" of the same version, everything is fine, but if versions are different, conflicts arise, since the dll that was loaded first is used, and the second one is not loaded.

I know that such problems are solved with the help of manifests, but I can't influence the manifest app.exe in any way.

Can you please tell me if there is any way to solve this problem?

  • I don't understand. You can simply replace the original dll with your own dll. That's how "cracks" do the job. Why do you think it makes sense to load 2 different versions of dlls simultaneously? – xiver77 Jun 18 '22 at 14:37
  • the need to load two of my DLLs of different versions at the same time is a requirement of the customer. But the application that will load these DLLs is a third-party application, I cannot make any changes to its work – Peter Kolos Jun 18 '22 at 15:44
  • Still not sure what you mean, but it seems you are providing an extension to an existing application that you don't have access to source, correct? If you want to keep the additional work in an external dll, you have to make a binary patch to the original executable to make it load your dll and make use of it. It's certainly possible, think about how all those "cracks" to existing software work, but it's certainly not trivial work. – xiver77 Jun 18 '22 at 16:43
  • Application "app.exe" can load "comp.dll" extension for its additional functionality. There are no problems with this. No patches or cracks are needed. I have a task to make the "app.exe" load two "comp.dll" of different versions at the same time – Peter Kolos Jun 20 '22 at 06:51
  • If you have the source code, then recompile it to make it load two "comp.dll"s. If you don't, you have to make a binary patch by some sort of reverse engineering. If I'm misunderstanding something, please explain the problem in other words. Your current wording definitely implies the need for a patch to the original application, either through the source or directly to the binary. – xiver77 Jun 20 '22 at 08:31
  • BTW you *can* change the manifest of an .exe even if it's packaged inside the file. – xiver77 Jun 20 '22 at 08:39
  • Can you add details about what you have already tried, and how exactly is it failing? – StayOnTarget Jun 20 '22 at 12:33

0 Answers0