0

Recently we installed our program which uses Midas.dll for a new customer. Unfortunately this customer's laptop has an invalid registry entry for the Midas.dll location (HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Classes\CLSID\{9E8D2FA1-591C-11D0-BF52-0020AF32BD64}\InProcServer32) - or maybe the entry is only sometimes valid, e.g. when the laptop is docked. Our customer support doesn't want to mess with the customer's registry.

So is there a way to make our app ignore this entry and just use our local copy of the DLL?

FWIW: I found MidasLib.dcu makes the application slower but the solution there seems to be to programmatically adapt the registry to our needs which I want to avoid.

Uli Gerhardt
  • 13,748
  • 1
  • 45
  • 83
  • Windows implementation of `Datasnap.DSIntf.CheckDbClient` calls `System.Win.ComObj.RegisterComServer` with Midas.dll file path obtained from registry. Is hooking this procedure (`RegisterComServer`) an option? – Peter Wolf Nov 08 '19 at 10:39
  • Oh .. wait. It is only called when Midas is *not* registered. Then hooking `LoadLibrary` could do the trick. – Peter Wolf Nov 08 '19 at 10:45
  • Won't hooking `LoadLibrary` conjure up malware detection and so on? – Uli Gerhardt Nov 08 '19 at 10:50
  • What about using Registration-free COM to bypass the Registry altogether? – Remy Lebeau Nov 08 '19 at 11:34
  • @RemyLebeau The `CheckDbClient` routine contains an explicit call to `RegQueryValue`. Can I bypass this by registration-free COM? – Uli Gerhardt Nov 08 '19 at 12:06

1 Answers1

1
uses MidasLib;

Use this module first. It will initialize static registration.