Link to home
Start Free TrialLog in
Avatar of czekmany
czekmany

asked on

Safe ActiveX control

Hi!

How can I make my ActiveX control marked as safe? I want that the IE allow to run my ActiveX component.
ASKER CERTIFIED SOLUTION
Avatar of Roshan Davis
Roshan Davis
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DanicekO
DanicekO

Rosh:
I doubt this is right answer. There is "downloading" signed/unsigned code and there is running safe and unsafe ActiveX objects. There is also different setting for each cathegory in internet setting (check it out).
Your certificate will mark you software as signed, but not as safe.
There are two parts of this problem. ActiveX objects can be safe/unsafe for inicialization and safe/unsafe for scripting. Safe for inicialization means that your code can be safely inicialized. Safe for scripting means that your code is safe when used by others (your ActiveX can be used by others for their - not good - purposes).
I think this area is full of bugs and nonstandard decission/solutions. And I also believe that system decides if your ActiveX is safe and if it is safe for inicialization or/and for scripting. However there should be two ways how to indicate that your script is safe.
First is to use Component Categories Manager to create entries in system registry. You ActiveX is marked in registry tree with its ID. There should be two entries in this registry key (something like 7DD98501...) - one key for "safe for scripting" and one key for "safe for inicialization".
Second method is to implement IObjectSafety interface. If IE realize that you support this interface, it calls IObjectSafety::SetInterfaceSafetyOptions method to determine if your AciteX element is safe or not.
However this is extremly confusing area. And both method or just ways to try. I doubt there is way how to really force client to recognize your ActiveX as save.