Click here to Skip to main content
15,926,959 members
Home / Discussions / COM
   

COM

 
GeneralRe: Attach Method with SmartPointers causes problems marshaling UDTs? Pin
morenz4-May-06 23:39
morenz4-May-06 23:39 
AnswerRe: Attach Method with SmartPointers causes problems marshaling UDTs? Pin
Roger Stoltz5-May-06 1:26
Roger Stoltz5-May-06 1:26 
GeneralRe: Attach Method with SmartPointers causes problems marshaling UDTs? Pin
morenz5-May-06 3:34
morenz5-May-06 3:34 
GeneralRe: Attach Method with SmartPointers causes problems marshaling UDTs? Pin
Roger Stoltz5-May-06 4:24
Roger Stoltz5-May-06 4:24 
GeneralRe: Attach Method with SmartPointers causes problems marshaling UDTs? Pin
morenz5-May-06 4:30
morenz5-May-06 4:30 
QuestionLookup installed com components Pin
Hampus@foi3-May-06 21:57
Hampus@foi3-May-06 21:57 
AnswerRe: Lookup installed com components Pin
Stephen Hewitt3-May-06 22:06
Stephen Hewitt3-May-06 22:06 
AnswerRe: Lookup installed com components Pin
Laxman Auti4-May-06 3:40
Laxman Auti4-May-06 3:40 
Hey good luck,

i have created the sample application for same

see the following code
//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];
	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 ();


Knock out 'T' from CAN'T
You 'CAN' if you think you 'CAN'
Cool | :cool:
QuestionActiveX control and COM dll Pin
csylesh3-May-06 2:23
csylesh3-May-06 2:23 
AnswerRe: ActiveX control and COM dll Pin
Milton Karimbekallil4-May-06 5:33
Milton Karimbekallil4-May-06 5:33 
QuestionTypes of DLL Pin
Smith#2-May-06 23:40
Smith#2-May-06 23:40 
AnswerRe: Types of DLL Pin
_AnsHUMAN_ 3-May-06 3:34
_AnsHUMAN_ 3-May-06 3:34 
QuestionDifference between static_cast and normal casting Pin
NiceNaidu2-May-06 2:30
NiceNaidu2-May-06 2:30 
AnswerRe: Difference between static_cast and normal casting Pin
guestcat2-May-06 3:20
guestcat2-May-06 3:20 
AnswerRe: Difference between static_cast and normal casting Pin
Stephen Hewitt2-May-06 15:59
Stephen Hewitt2-May-06 15:59 
QuestionWhy Default Interface ??? Pin
NiceNaidu2-May-06 1:33
NiceNaidu2-May-06 1:33 
AnswerRe: Why Default Interface ??? Pin
guestcat2-May-06 1:50
guestcat2-May-06 1:50 
GeneralRe: Why Default Interface ??? Pin
NiceNaidu2-May-06 2:18
NiceNaidu2-May-06 2:18 
GeneralRe: Why Default Interface ??? Pin
Mike Dimmick2-May-06 2:44
Mike Dimmick2-May-06 2:44 
GeneralRe: Why Default Interface ??? Pin
guestcat2-May-06 3:01
guestcat2-May-06 3:01 
QuestionGetRecordInfoFromGUID returns 0x80029C4A Pin
morenz2-May-06 0:07
morenz2-May-06 0:07 
AnswerRe: GetRecordInfoFromGUID returns 0x80029C4A Pin
Vibhash Jha3-May-06 2:35
Vibhash Jha3-May-06 2:35 
GeneralRe: GetRecordInfoFromGUID returns 0x80029C4A Pin
morenz3-May-06 23:06
morenz3-May-06 23:06 
QuestionCOM - ROT - Threading - moniker - RPC - Where is the problem? Pin
guestcat1-May-06 22:47
guestcat1-May-06 22:47 
Questionhow to make a transform filter with one input and two out puts in directshow Pin
Ch Mazhar Iqbal1-May-06 21:15
Ch Mazhar Iqbal1-May-06 21:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.