Re: ATL executable self referencing.
SENS uses COM+ events, not COM events. E.g. each event
object must be publically creatable, but is not created by the
caller - it's created by the COM+ runtime. Also it must be
hosted in a DLL if I remember my basic COM+ knowledge...
E.g. an EXE server is not appropriate.
I suggest OP posts this question in the COM+ group:
Microsoft MVP [VC], MCSD
MVP VC FAQ: http://vcfaq.mvps.org
"Igor Tandetnik" <firstname.lastname@example.org> wrote in message
Francois <email@example.com> wrote:
I am creating a ATL EXE component. (Visual studio 2005 EXE).
But in my code, I am using another Com object, for wich I must create
a sink Interface. (I am called by the other object).
The sink Interface has been created with the wizard.
At what level must I create the Ipointer to my Interface.
I have overiden the CAtlExeModule::Run, where I do:
ImySink * pIsink;
res = CoCreateInstance(CLSIID_mySink, ,,, &pIsink);
But this fail with error code 0x8008005
Sink objects don't have to be creatable coclasses, and usually aren't.
This means they don't need to derive from CComCoClass, don't need CLSID,
don't need to be mentioned in the IDL or in the object map. In your code,
you simply create an instance of C++ class implementing the sink with new
or with CComObject::CreateInstance.
With best wishes,
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925