Click here to Skip to main content
15,923,789 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralATL header file... Pin
byblostas5-Oct-03 12:25
byblostas5-Oct-03 12:25 
GeneralRe: ATL header file... Pin
Michael Dunn7-Oct-03 16:19
sitebuilderMichael Dunn7-Oct-03 16:19 
GeneralAbout interface ISimpleFrameSite Pin
Foxray3-Oct-03 20:51
Foxray3-Oct-03 20:51 
GeneralDeskbands with HTML content based on URL Pin
riberollesb@fsb.fr3-Oct-03 6:03
riberollesb@fsb.fr3-Oct-03 6:03 
Generaladding a second interface to coclass Pin
rob agar2-Oct-03 22:08
rob agar2-Oct-03 22:08 
GeneralWTL download Pin
Gaz2-Oct-03 9:49
Gaz2-Oct-03 9:49 
GeneralRe: WTL download Pin
Michael Dunn2-Oct-03 10:53
sitebuilderMichael Dunn2-Oct-03 10:53 
GeneralCreating instances of COM objects inside the module Pin
jparsons2-Oct-03 7:12
jparsons2-Oct-03 7:12 
I have an ATL project where I define several ATL COM objects. I would like to be able to create instances of these objects inside my module without having to use CoCreateInstance(). Everytime I try to do so it claims the classes are abstract because they do not define QueryInterface,AddRef...
Is there a way to create these objects internally without having to call CoCreateInstance?

Here's the logic to why I want to do this. I'm using a local class to catch some COM events. The local class implements a COM interface but itself is not a COM object. If I create this class with CoCreateInstance I will only be able to get the Event Sink interface back. The only way that I know of to call methods on this object would be to create a new interface for the object for the local methods I need. I would really like to avoid this. Here is a sample bit of code to show better what I'm trying to do

<br />
CEventSink : public _IEvents<br />
{<br />
  public:<br />
  void Setup(IEventSource *source);<br />
}<br />
<br />
...<br />
CEventSink sink;<br />
IEventSource *source;<br />
... CoCreatInstance for source...<br />
sink.Setup(source);<br />


Jared
jparsons@jparsons.org
www.prism.gatech.edu/~gte477n
GeneralRe: Creating instances of COM objects inside the module Pin
Michael Dunn2-Oct-03 7:55
sitebuilderMichael Dunn2-Oct-03 7:55 
GeneralRe: Creating instances of COM objects inside the module Pin
jparsons2-Oct-03 9:37
jparsons2-Oct-03 9:37 
GeneralCompilation error C3702 &quot;ATL is required for COM events&quot; Pin
jparsons2-Oct-03 5:49
jparsons2-Oct-03 5:49 
GeneralRe: Compilation error C3702 &quot;ATL is required for COM events&quot; Pin
jparsons2-Oct-03 7:07
jparsons2-Oct-03 7:07 
GeneralWTL ListViewCtrl Pin
Michael P Butler2-Oct-03 2:26
Michael P Butler2-Oct-03 2:26 
Generalspeed Pin
raastad1-Oct-03 22:20
raastad1-Oct-03 22:20 
GeneralRe: speed Pin
jhwurmbach2-Oct-03 0:02
jhwurmbach2-Oct-03 0:02 
GeneralLine numbers in Edit Control Pin
Derick Cyril Thomas1-Oct-03 16:02
Derick Cyril Thomas1-Oct-03 16:02 
GeneralAn Outlook plug-in issue Pin
dorutzu1-Oct-03 8:03
dorutzu1-Oct-03 8:03 
Generaltyplib marshalling or custom marshalling Pin
umarcool28-Sep-03 22:01
umarcool28-Sep-03 22:01 
GeneralATL 7.0 Book Pin
jparsons27-Sep-03 14:22
jparsons27-Sep-03 14:22 
GeneralHTML PARAM question Pin
alex.barylski27-Sep-03 12:51
alex.barylski27-Sep-03 12:51 
GeneralProblem with ContextMenu Pin
Tommy2k27-Sep-03 10:14
Tommy2k27-Sep-03 10:14 
GeneralRe: Problem with ContextMenu Pin
Michael Dunn27-Sep-03 10:33
sitebuilderMichael Dunn27-Sep-03 10:33 
GeneralCreate Drag Image (Drag'n'Drop) Pin
Jens Sorensen27-Sep-03 7:40
Jens Sorensen27-Sep-03 7:40 
GeneralRe: Create Drag Image (Drag'n'Drop) Pin
Michael Dunn27-Sep-03 8:13
sitebuilderMichael Dunn27-Sep-03 8:13 
GeneralRe: Create Drag Image (Drag'n'Drop) Pin
Jens Sorensen27-Sep-03 10:15
Jens Sorensen27-Sep-03 10: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.