Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 01 DEC 2021 08:11:49PM James Birnie wrote:

Hi

We have a .NET library which we call via a COM object from OI. It also references our base library (oryxbase.dll).

I have just created a .NET usercontrol and inserted it into an OI form. This component also references oryxbase.dll (a more recent version). My problem is due to the below:

* If a DLL with the same module name is already loaded in memory, the system uses the loaded DLL, no matter which directory it is in. The system does not search for the DLL. *

.. only one version of oryxbase.dll gets loaded within the OI application, i.e. the first component that gets called by OI (either my library or the new usercontrol). My usercontrol still appears either way, but when it attempts to do stuff which calls back to oryxbase.dll it doesn't work if OI has already loaded the library version.

I am wondering if there is a way in OI to either unload or reload an existing dll?


At 02 DEC 2021 04:10AM Carl Pates wrote:

Hi James,

There's no API in the engine to release DLLs that it has loaded.

Regards,

Carl Pates


At 06 DEC 2021 12:32AM James Birnie wrote:

Thanks Carl

I thought it was a longshot :)

I just tried packing up the dll using Costura - this combines all the dll references into a single output file (exe or dll) - and it sounded amazing, and it actually did do as promised, however it wouldn't let me register the OLE object alas.

The workaround is to load my usercontrol before any calls are made to the library but obviously isn't ideal.

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/11bbd7e0acfa994f96461e193df0cc86.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1