Click here to Skip to main content
15,909,503 members
Home / Discussions / COM
   

COM

 
GeneralRe: COM stopped working Pin
Kyudos18-Feb-03 4:34
Kyudos18-Feb-03 4:34 
GeneralInterface definition Pin
haranath18-Feb-03 0:14
haranath18-Feb-03 0:14 
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 
Hi, I read the articles about COM basic and still have problems. I try to write a simple console application in vc++ 6.0. I want to use ActiveDesktop componet to handle some info about wallpaper and patern. Also I have an example code. But there is no info about following thing.

In the code there are some variables like CLSID_ActiveDesktop or CLSCTX_INPROC_SERVER.
in which header they are defined. If your answer is comdef.h I include it and it only have some structs IActiveDesktop. Also I found that CLSCTX_INPROC_SERVER is defined in objbase.h but it still get error when I use CLSCTX_INPROC_SERVER. When I write 1 it is ok.
Another thing I could not get last parameter of CoCreateInstance.

here what I try to work and it gives 4 error.
	/*	HEADER FILES	*/<br />
<br />
#include<iostream.h><br />
	// Definitions/Declarations for iostream classes<br />
#include<objbase.h><br />
	// Component object model defintions<br />
#include<comdef.h><br />
	// Native C++ compiler COM support <br />
<br />
HRESULT hr;<br />
int main()<br />
{<br />
	IActiveDesktop *pIActiveDesktop;<br />
<br />
	// Initialize the COM system<br />
	CoInitialize ( NULL );	    <br />
	<br />
	// Retrives a COM interface using CoCreateInstance<br />
	hr = CoCreateInstance(	 CLSID_ActiveDesktop,							NULL,					CLSCTX_INPROC_SERVER,<br />
                                  IID_IActiveDesktop,	  				     &pIActiveDesktop);<br />
<br />
	cout<<hr<<"\n";<br />
<br />
	return 0;	<br />
}


karanba
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 
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 

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.