how do you enumerate WIN32OLE available servers?

删除回忆录丶 提交于 2019-12-24 22:16:11

问题


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 elements with WMI?

How to list all installed ActiveX controls? though the C code in there doesn't seem to enumerate all of them...


回答1:


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.



来源:https://stackoverflow.com/questions/4892860/how-do-you-enumerate-win32ole-available-servers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!