Click here to Skip to main content
15,860,859 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

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_Control;
EXTERN_C const CATID CATID_Programmable;
EXTERN_C const CATID CATID_IsShortcut;
EXTERN_C const CATID CATID_NeverShowExt;
EXTERN_C const CATID CATID_DocObject;
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
Updated 10-Jun-11 5:25am
v2

1 solution

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

1. Open notepad
2. type
VB
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 system.run command to automate

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

Thank You
Sanjay
 
Share this answer
 
Comments
nibir.mistry 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900