Click here to Skip to main content
15,892,809 members
Home / Discussions / COM
   

COM

 
GeneralRe: Interface definition Pin
Stephane Rodriguez.18-Feb-03 1:03
Stephane Rodriguez.18-Feb-03 1:03 
GeneralRe: Interface definition Pin
haranath18-Feb-03 4:39
haranath18-Feb-03 4:39 
GeneralRe: Interface definition Pin
TimWallace18-Feb-03 6:23
TimWallace18-Feb-03 6:23 
GeneralRe: Interface definition Pin
haranath18-Feb-03 20:40
haranath18-Feb-03 20:40 
GeneralSTAThread stop my app Pin
~toki17-Feb-03 13:09
~toki17-Feb-03 13:09 
Generalcom client as a console application Pin
karanba17-Feb-03 9:52
karanba17-Feb-03 9:52 
GeneralRe: com client as a console application Pin
geo_m17-Feb-03 23:05
geo_m17-Feb-03 23:05 
GeneralRe: com client as a console application Pin
karanba18-Feb-03 11:13
karanba18-Feb-03 11:13 
Ok well this is the code and it gives only error at the line which I put a confused face image near it. VC++6.0 says that
Confused | :confused:
\selman\desktop\workarea\comclienta\cpp1.cpp(27) : error C2664: 'CoCreateInstance' : cannot convert parameter 1 from 'char [37]' to 'const struct _GUID &'
        Reason: cannot convert from 'char [37]' to 'const struct _GUID'
        No constructor could take the source type, or constructor overload resolution was ambiguous
But I check many things that I could not found the reason. please give me an explanation
	/*	HEADER FILES	*/

#include<iostream.h>
	// Definitions/Declarations for iostream classes
#include<objbase.h>
	// Component object model defintions
#include<comdef.h>	
        // Native C++ compiler COM support 

HRESULT hr;


int main()
{
	IActiveDesktop *pIActiveDesktop; 

	// Initialize the COM system
	CoInitialize ( NULL );	    
	
	// Retrives a COM interface using CoCreateInstance
	hr = CoCreateInstance(	"75048700-ef1f-11d0-9888-006097deacf9",
							NULL, 
							CLSCTX_INPROC_SERVER, 
							"f490eb00-1240-11d1-9888-006097deacf9", 
							(void**) &pIActiveDesktop);//:confused: IT GIVES ERROR ONLY THIS LINE

	cout<<hr<<"\n";

	cout<<hr;


	return 0;	
}


karanba
GeneralRe: com client as a console application Pin
geo_m18-Feb-03 12:25
geo_m18-Feb-03 12:25 
GeneralRe: com client as a console application Pin
karanba19-Feb-03 0:07
karanba19-Feb-03 0:07 
GeneralDHTMLEdit vs. MSHTML Pin
Jonas Follesø16-Feb-03 15:33
Jonas Follesø16-Feb-03 15:33 
GeneralInvalidCastException from remote object that use COM Pin
itay_k16-Feb-03 4:44
itay_k16-Feb-03 4:44 
GeneralIClassFactory2 Pin
Raphael Amorim14-Feb-03 9:26
professionalRaphael Amorim14-Feb-03 9:26 
GeneralProblem with registering Transport Event Sink for the SMTP Service Pin
Muslima14-Feb-03 3:49
Muslima14-Feb-03 3:49 
QuestionHow to grab text from text-based apps/objects?!?!!? Solution = money! Pin
Tommy Svensson13-Feb-03 23:44
Tommy Svensson13-Feb-03 23:44 
Generalabstracting to IDispatch Pin
Zizilamoroso13-Feb-03 23:03
Zizilamoroso13-Feb-03 23:03 
GeneralCOM+ queue permissions Pin
solidstore13-Feb-03 3:15
solidstore13-Feb-03 3:15 
GeneralDeleting COM+ Queued Applications Pin
solidstore13-Feb-03 3:11
solidstore13-Feb-03 3:11 
GeneralASP and COM Pin
drugfreak12-Feb-03 5:40
sussdrugfreak12-Feb-03 5:40 
GeneralCrating a COM for WM 4.7 Pin
SQ_Lusi11-Feb-03 21:03
SQ_Lusi11-Feb-03 21:03 
GeneralCOM+ & .NET Pin
sss_dr11-Feb-03 0:33
sss_dr11-Feb-03 0:33 
QuestionHow to learn COM??? Pin
shanksprasad7-Feb-03 23:46
shanksprasad7-Feb-03 23:46 
AnswerRe: How to learn COM??? Pin
David Wulff8-Feb-03 17:25
David Wulff8-Feb-03 17:25 
AnswerRe: How to learn COM??? Pin
Giles13-Feb-03 3:26
Giles13-Feb-03 3:26 
GeneralRe: How to learn COM??? Pin
thowra24-Mar-03 4:21
thowra24-Mar-03 4:21 

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.