vbpslogo2.gif (19593 bytes)
Brad's VB-32 Programs & Samples

Posted: 05/15/00, last update: 04/29/00

Home

AXCompSafety: An ActiveX component safe for initialization and scripting editor

Utility code that no only demonstrates how to enumerate and display pertinent information about all of the local system's registered ActiveX controls and servers, including each component's safe for initialization and scripting marking, but also provides functionality to toggle each component's safety marking.

All that makes a component marked safe for initialization and scripting is the presence of the Implemented Categories subkey under its CLSID key, containing the following two respective subkeys:

HKEY_CLASSES_ROOT
CLSID
[component CLSID]
Implemented Categories
{7DD95801-9882-11CF-9FA9-00AA006C42C4} (<-- marked safe for scripting)
{7DD95802-9882-11CF-9FA9-00AA006C42C4} (<-- marked safe for initialization)

For more information on component safety, and the ethics of explicitly marking it in this manner, see:

"Q182598 - HOWTO: Implement IObjectSafety in Visual Basic Controls"
http://support.microsoft.com/support/kb/articles/Q182/5/98.asp

"Safe Initialization and Scripting for ActiveX Controls"
http://msdn.microsoft.com/workshop/components/activex/safety.asp

Download axcompsafety.zip (14kb)