How To Implement IObjectSafety in Visual Basic Controls (182598)
The information in this article applies to:
- Microsoft Visual Basic Control Creation Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Internet Explorer (Programming) 4.0
- Microsoft Internet Explorer (Programming) 4.01
- Microsoft Internet Explorer (Programming) 4.01 SP1
- Microsoft Internet Explorer (Programming) 4.01 SP2
- Microsoft Internet Explorer (Programming) 5
- Microsoft Internet Explorer (Programming) 5.01
- Microsoft Internet Explorer (Programming) 5.01 SP1
- Microsoft Internet Explorer (Programming) 5.5
This article was previously published under Q182598 SUMMARY
This article describes how to implement the IObjectSafety interface in Visual Basic controls to mark the controls safe for scripting and
initialization. By default, Visual Basic controls use component category
entries in the registry to mark the control safe for scripting and
initialization. Implementing the IObjectSafety interface is the preferred method. This article contains all the code that is required to implement this interface in Visual Basic controls.
Please keep in mind that a control should only be marked as safe if it is,
in fact, safe. This article does not describe the details of marking
controls as safe for scripting and initialization; it simply demonstrates how to do it in code. Please refer to the Internet Client Software Development Kit (SDK) documentation for a detailed description of this. See "Safe Initialization and Scripting for ActiveX Controls" under the Component Development section.
REFERENCES
MkTypLib.exe is an old tool that previously shipped with the Platform Software Development Kit (SDK) that comes with Microsoft Visual Studio 6.0. For information on how to install the Platform SDK that comes with Visual Studio 6.0, see the following Microsoft Web site:
The current Platform SDK does not come with the MkTypLib.exe tool. For information about what Microsoft products ship the Type Library Compiler (MkTypLib.exe), see the following Microsoft DLL Help database and search on the file name MkTypLib.exe
For information about how to invoke MkTypLib, see the following Microsoft Web site:
For additional information, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
161873 How To Mark MFC Controls Safe for Scripting/Initialization
143258 How To Create Constants and DLL Declarations in a Type Library
131105 SAMPLE: TYPEBLD: How to Use ICreateTypeLib and ICreateTypeInfo
For more information about the IObjectSafety interface, see the following Microsoft Web site:
For more information about safe initialization and scripting for ActiveX controls, see the following Microsoft Web site:
For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:
Modification Type: | Major | Last Reviewed: | 8/10/2006 |
---|
Keywords: | kbFAQ kbhowto KB182598 |
---|
|