There are two ways you can set safety levels for your downloadable components. The easiest way is to use the Package and Deployment Wizard to mark your .cab files as safe. The other option is to use the IObjectSafety interface to tell the client machine that your code is safe.
Note IObjectSafety is an advanced coding topic that requires an understanding of the Implements interface and is intended for experienced programmers. For information on the Implements interface, see "Polymorphism" in Programming with Objects," in the Programmer's Guide.
If you do not implement the IObjectSafety interface on your objects, the Package and Deployment Wizard will present you with the opportunity to set safety flags on your download package. You can select the Safe for Scripting flag, the Safe for Initialization flag, or both.
Note If you have used the IObjectSafety interface for an object, it will not appear in the safety settings screen of the Package and Deployment Wizard.
For More Information See "Distributing your Applications," in the Programmer's Guide for more information on using the Package and Deployment Wizard to package your controls.
IObjectSafety is an interface that exposes functionality to Internet Explorer's Safe for Scripting and Safe for Initialization security features. IObjectSafety should be implemented for objects that have interfaces that support untrusted clients — or those clients for which specific functionality cannot be predicted or safe usage cannot be guaranteed — such as scripts. The interface allows you to specify which parts of the object need to be protected from use.
Using IObjectSafety, you can mark your object and its parts in three ways:
There are three possible scenarios to consider for your objects:
For More Information See the Internet Client SDK at http://www.microsoft.com/msdn/sdk/inetsdk/help/compdev/safety.htm for more information on the IObjectSafety interface. An IObjectSafety sample application can be found in the Samples directory.