4
A
回答
4
我通常使用OLEview检查的COM/ActiveX个人电脑上的对象,因为它也让我inspect the interfaces由对象公开。
程序化方法已由Jeff Attwood on stackoverflow发布。
3
试试这个ActiveXHelper
0
//Initialise COM libraries
CoInitialize (NULL);
//The Component Category Manager implemented by System implements
//this interface
ICatInformation *pCatInfo=NULL;
//Create an instance of standard Component Category Manager
HRESULT hr=CoCreateInstance (CLSID_StdComponentCategoriesMgr ,
NULL,
CLSCTX_INPROC_SERVER,
IID_ICatInformation ,
(void **)&pCatInfo);
//Increase ref count on interface
pCatInfo->AddRef();
//IEnumGUID interface provides enumerator for enumerating through
//the collection of COM objects
IEnumGUID *pEnumGUID=NULL;
//We are intersted in finding out only controls so put CATID_Control
//in the array
CATID pcatidImpl[1];
CATID pcatidReqd[1];
// Want only my Plugin Category
pcatidImpl[0]=CATID_MyPlugin;
pcatidReqd[1]=CATID_MyPlugin;
// Want all Active X Control
//pcatidImpl[0]=CATID_Control;
//Now enumerate the classes i.e. COM objects of this type.
pCatInfo->EnumClassesOfCategories (1,
pcatidImpl,
0,
pcatidReqd ,
&pEnumGUID);
//Enumerate as long as you get S_OK
CLSID clsid;
while((hr= pEnumGUID->Next(1, &clsid, NULL))==S_OK)
{
BSTR bstrClassName; //Get the information of class
//This is what MSDN says about the parameters
/*-----------------------------------------------
USERCLASSTYPE_FULL The full type name of the class.
USERCLASSTYPE_SHORT A short name (maximum of 15 characters) that
is used for popup menus and the Links dialog
box.
USERCLASSTYPE_APPNAME The name of the application servicing the class
and is used in the Result text in dialog boxes.
-----------------------------------------------*/
OleRegGetUserType (clsid,USERCLASSTYPE_FULL,&bstrClassName);
CString strControlName(bstrClassName);
//Add string in our listbox
m_list1.AddString (strControlName);
}
//we are done so now release the interface ptr
pCatInfo->Release();
CoUninitialize();
相关问题
- 1. 如何列出所有已安装的ActiveX控件?
- 2. IE上没有出现ActiveX控件
- 3. 如何替换现有的ActiveX控件?
- 4. 从exe导出ActiveX控件
- 5. 如何列出grails插件的所有控制器/服务
- 6. 如何在Firefox中启用ActiveX控件?
- 7. 如何设置ActiveX控件名称
- 8. 如何从URL初始化ActiveX控件?
- 9. 如何访问MFC中的ActiveX控件?
- 10. 如何使用Chrome Frame ActiveX控件
- 11. 如何自动化ActiveX控件UI
- 12. 如何在PowerPoint中嵌入ActiveX控件
- 13. 如何将MFC ActiveX控件添加到现有的activex项目中
- 14. 在所有机器上获得excel activex日历控件
- 15. 替代ActiveX控件
- 16. ActiveX控件入门
- 17. flash activex控件64bit
- 18. 从网页上的其他ActiveX控件使用ActiveX控件
- 19. 替代VB6 ActiveX控件 - 基于Silverlight或.NET的ActiveX控件
- 20. 将VB 6.0 ActiveX控件迁移到MFC ActiveX控件
- 21. activex控件和activex对象有什么区别?
- 22. ActiveX控件没有正确显示
- 23. 具有多个类的ActiveX控件
- 24. 如何在WebBrowser控件中创建ActiveX控件
- 25. 如何以编程方式列出Rails的所有控制器
- 26. 如何在codeigniter中列出所有控制器类名称?
- 27. 如以前对ActiveX控件所做的那样,Click to Form Control如何关联?
- 28. 如何在DropDownList控件中列出Active Directory中的所有用户
- 29. Java中的ActiveX控件
- 30. Delphi ActiveX控件向导