Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Dynamically load ActiveX at runtime (https://www.delphipraxis.net/144598-dynamically-load-activex-runtime.html)

WojTec 11. Dez 2009 18:37


Dynamically load ActiveX at runtime
 
Hello. I have purchased AX control and I want to protect it before I deploy software to user. So, I want to load this AX dynamically at runtime without registering it in system (and will be the best without storage it as unprotected standalone file). I'm looking for native Delphi solution (or in other languages - I can try to translate it to Delphi, but this maybe to hard for me) for this task. Any help?

PS: I'm not interested in BoxedApp (or other "close" solution) - it's tooooo expensive for me.

Luckie 11. Dez 2009 22:01

Re: Dynamically load ActiveX at runtime
 
An ActiveX control musst be registered in the system, because the system manages the objects therefore it has to know the AcitveX control. But where is the Problem? An ActiveX control is a compiled DLL. The only thing you can find out are the open interfaces, but you wont get the code. The only problem might be that administrative privileges are neccessary to register the control.

WojTec 13. Dez 2009 11:13

Re: Dynamically load ActiveX at runtime
 
No, AX mustn't be register, can be load "virtually". Look at ThinApp or BoxedApp or other similar.

sirius 13. Dez 2009 12:00

Re: Dynamically load ActiveX at runtime
 
Take a look at that topic and at the sample code:
http://forum.delphi-treff.de/showthread.php?t=24902
But you have to use LoadtypeLib or LoadTypeLibEx instead of LoadRegTypelib.

Astat 13. Dez 2009 23:56

Re: Dynamically load ActiveX at runtime
 
Hello WojTec.
  • WojTec wrote.

Zitat:

No, AX mustn't be register, can be load "virtually". Look at ThinApp or BoxedApp or other similar.
If u use ThinApp or BoxedApp have a loock into your temp folder and registry.
You will find your AxComponets in the temp folder and, registered in the registry.
ThinApp or BoxedApp isn't magic with ActiveX handling!

With best regards

Astat

Sherlock 14. Dez 2009 08:43

Re: Dynamically load ActiveX at runtime
 
Also you might consider looking into manifests for side-by-side installation of ActiveX Libs.
http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx

Though it was intended as a possibility to run different versions of the same AX-Lib it can also be used to use AX without the need to register it.
Using manifests allows you to program as if the AX-Lib where installed on the client system. No need for special calls or routines. It just works. Note however, that WinXP or higher is needed.

Sherlock


Alle Zeitangaben in WEZ +1. Es ist jetzt 18:23 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz