Click here to Skip to main content
11,813,543 members (45,545 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: VC6 VC7 VC7.1 VC8.0 C++ VC9.0 VC10.0 , +

I have stuck while retrieving all registered COM components (like references/components in VB IDE) in a single or easy way, So I added "comcat.h" in my project and using "stdComponentCategoriesMgr" I'm getting registered CLSID but it is category wise and implemented all CATID one by one.
EXTERN_C const CATID CATID_Insertable;
EXTERN_C const CATID CATID_Programmable;
EXTERN_C const CATID CATID_IsShortcut;
EXTERN_C const CATID CATID_NeverShowExt;
EXTERN_C const CATID CATID_Printable;
EXTERN_C const CATID CATID_RequiresDataPathHost;
EXTERN_C const CATID CATID_PersistsToMoniker;
EXTERN_C const CATID CATID_PersistsToStorage;
EXTERN_C const CATID CATID_PersistsToStreamInit;
EXTERN_C const CATID CATID_PersistsToStream;
EXTERN_C const CATID CATID_PersistsToMemory;
EXTERN_C const CATID CATID_PersistsToFile;
EXTERN_C const CATID CATID_PersistsToPropertyBag;
EXTERN_C const CATID CATID_InternetAware;
EXTERN_C const CATID CATID_DesignTimeUIActivatableControl;
Yet I'm not getting all registered COM components CLSID, specially when I search for how many "msxml" versions has been installed in my system.
How do I get all registered COM components CLSID or beside the way about I followed "stdComponentCategoriesMgr".
Language : Native VC++
Posted 9-Jun-11 20:24pm
Edited 10-Jun-11 5:25am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can manual register the components.For this follow below steps..Example for xml regitration

1. Open notepad
2. type
regsvr32 /s %SystemRoot%\system32\msxml.dll
regsvr32 /s %SystemRoot%\system32\msxml2.dll
regsvr32 /s %SystemRoot%\system32\msxml3.dll
regsvr32 /s %SystemRoot%\system32\msxml4.dll
regsvr32 /s %SystemRoot%\system32\msxml6.dll

3. save the file as "myname.bat"
4. Double click file
5. All xmls registered
Same way you can register other components

** instead of double clicking the batch file you can use command to automate

** i used /s to register it silently -- this way you will not see black dos screen popup

Thank You
nibir.mistry at 13-Jun-11 3:02am
Hello Sanjay,
Thanks for your reply , But requirement is different that is "Programmatically determine the how many version(s) of MSXML Parser Installed on my Computer", for example : have you ever seen VB 6.0 IDE ? there has an menu "Project->References" , In "References" dialogbox you can see how many registered COM objects are installed. Like that I want to retrieve list of registered COM objects name. Hope now you understood what I exactly want.

With Regards
Nibir mistry

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Abhinav S 275
1 Palash Mondal_ 190
2 KrunalRohit 150
4 Manas_Kumar 115
0 OriginalGriff 3,877
1 KrunalRohit 2,526
2 Maciej Los 2,245
3 CPallini 2,240
4 ppolymorphe 1,750

Advertise | Privacy | Mobile
Web01 | 2.8.151002.1 | Last Updated 13 Jun 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100