Wasn't able to find an easy answer to this one... Anyway I've seen some WIN32OLE code like this:
WIN32OLE.new("MSVidCtl.MSVidWebDVD.1")
Which works. My question is, how is it possible (in any programming language) to have figured that string out? Like enumerating all the available servers or what not? My google fu failed me here.
Thanks. -r
More resources (some of which answer my question, I believe--not sure why I didn't see these before)
How to list all ActiveX controls? axhelper looks nice, as it shows the product name as well, which is what VB shows as its component name.
Realize that apparently something being listed as a "component" in axhelper does not mean you can't use it in your VBscript (ex: if you insert an "MS TV Video component" in VB, you can do an Imports MSVidCtlLib then suddenly other things like MSVidWebDVD are accessible).
How to enumerate all ActiveX el开发者_StackOverflow社区ements with WMI?
How to list all installed ActiveX controls? though the C code in there doesn't seem to enumerate all of them...
as I understand you need to find all registered COM servers? If so you can enumerate registry keys: HKLM/Software/Classes/CLSID/{class_id}/ProgId.
Also you can try to use axscan utility from AxMan. It is open source so you can modify it for your own purposes.
精彩评论