List all registered ActiveX controls

Source: Internet
Author: User

initialise com librariescoinitialize  (NULL); //the component category  manager implemented by system implements //this interfaceicatinformation * pcatinfo=null; //create an instance of standard component category  managerhresult hr=cocreateinstance  (clsid_stdcomponentcategoriesmgr ,                               NULL,                               CLSCTX_INPROC_SERVER,                              iid_ icatinformation ,                               (void **) &pcatinfo); //increase ref  count on interfacepcatinfo->addref  (); //ienumguid interface provides  enumerator for enumerating through //the collection of com  objectsienumguid *penumguid=null; //we are intersted in finding out  only controls so put catid_control //in the arraycatid pcatidimpl[1]; CATID PCATIDREQD[1];p catidimpl[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_okclsid 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 ptrpCatInfo->Release  (); couninitialize  ();


List all registered ActiveX controls

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.