Google 网上论坛不再支持新的 Usenet 帖子或订阅项。历史内容仍可供查看。

How do you find all ActiveX servers?

已查看 37 次
跳至第一个未读帖子

Leslie Brooks

未读,
2001年10月19日 18:01:252001/10/19
收件人
Is there a simple way to get a list of all registered ActiveX servers?
I know OpTcl has a function for this, but I must use TCOM (because
OpTcl doesn't support arrays). I would prefer not to confuse myself
by using two different ActiveX interface packages in the same
application! (I confuse too easily as it is.) If there is no other
simple way to get that information, then I will use OpTcl.

TIA.

Leslie

Chin Huang

未读,
2001年10月22日 14:39:302001/10/22
收件人
In article <fc7de112.01101...@posting.google.com>,

I'm not sure what function in OpTcl you're referring to which lists all
registered ActiveX servers, but you should be able to dig in the Windows
registry for registered COM classes. For example, this Tcl script lists
the programmatic identifier (ProgID) of all COM classes that have a
ProgID.


package require registry

set classesRootKey "HKEY_CLASSES_ROOT\\CLSID"
foreach clsid [registry keys $classesRootKey] {
set clsidKey "$classesRootKey\\$clsid"
set progIdSubKey [registry keys $clsidKey "VersionIndependentProgID"]
if {[llength $progIdSubKey] > 0} {
set progId [registry get "$clsidKey\\$progIdSubKey" ""]
puts $progId
}
}

0 个新帖子