Click here to Skip to main content
15,887,746 members
Home / Discussions / COM
   

COM

 
GeneralRe: asfds Pin
User 21559710-Jan-05 20:55
User 21559710-Jan-05 20:55 
GeneralRe: asfds Pin
Jörgen Sigvardsson10-Jan-05 20:59
Jörgen Sigvardsson10-Jan-05 20:59 
Generalquestions on COM Pin
cyberJen7-Jan-05 13:29
cyberJen7-Jan-05 13:29 
GeneralRe: questions on COM Pin
Jörgen Sigvardsson8-Jan-05 0:13
Jörgen Sigvardsson8-Jan-05 0:13 
GeneralATL / COM question Pin
__makaveli__7-Jan-05 0:24
__makaveli__7-Jan-05 0:24 
GeneralRe: ATL / COM question Pin
Lim Bio Liong7-Jan-05 6:07
Lim Bio Liong7-Jan-05 6:07 
GeneralRe: ATL / COM question Pin
__makaveli__9-Jan-05 22:05
__makaveli__9-Jan-05 22:05 
GeneralRe: ATL / COM question Pin
Martin Koorts9-Jan-05 22:44
Martin Koorts9-Jan-05 22:44 
Hi
To process COM events, you first have to implement an interface - this is what you've achieved by running the wizard. You'll have to create an instance of this class somewhere is your app. Secondly you'll have to pass this instance's interface to the COM object you want to listen to - typically this is done through IConnectPointContainer, etc. and associated IConnectionPoint::Advise/Unadvise methods (an observer pattern). Call QueryInterface(__uuidof(IConnectPointContainer), ...) on the object you want to listen to to see if it supports connection points.

If you're hosting an ActiveX control in an MFC application, this is easiest done with MFC's EVENT_MAP mechanism. ATL has a similar setup with SINK_MAP. Both of these MAPs hide the details of making calls to Advise and Unadvise, and the preceding discovery of IConnectPoint interfaces on the observable.

Connection Points is just one standard mechanism of binding the observer to the observable, and may or may not be supported by the object you want to listen to. Another way to achieve the same (and functionally similar) is a straight callback - the object you want to listen to has a method for registering the observer (eg. StartListening(IMyObjectsEvents *pObserver), and StopListening(...)). But since this is a more bespoke interaction, one that is less often supported. Also, since Connection Points is a generic implementation, it incurs an overhead in number of round-trips necessary to establish the 'connections', but I doubt that it's of any concern in your case.

HTH
Martin
GeneralRe: ATL / COM question Pin
__makaveli__9-Jan-05 23:32
__makaveli__9-Jan-05 23:32 
GeneralRe: ATL / COM question Pin
Martin Koorts10-Jan-05 1:03
Martin Koorts10-Jan-05 1:03 
GeneralRe: ATL / COM question Pin
__makaveli__10-Jan-05 1:09
__makaveli__10-Jan-05 1:09 
GeneralRe: ATL / COM question Pin
Martin Koorts10-Jan-05 3:33
Martin Koorts10-Jan-05 3:33 
GeneralRe: ATL / COM question Pin
__makaveli__10-Jan-05 4:54
__makaveli__10-Jan-05 4:54 
GeneralRe: ATL / COM question Pin
Martin Koorts10-Jan-05 5:58
Martin Koorts10-Jan-05 5:58 
GeneralRe: ATL / COM question Pin
__makaveli__10-Jan-05 22:16
__makaveli__10-Jan-05 22:16 
GeneralRe: ATL / COM question Pin
__makaveli__10-Jan-05 22:39
__makaveli__10-Jan-05 22:39 
GeneralRe: ATL / COM question Pin
Martin Koorts10-Jan-05 23:06
Martin Koorts10-Jan-05 23:06 
GeneralThe OLE clipboard and Word 2003 Pin
Steve DeLassus6-Jan-05 7:27
Steve DeLassus6-Jan-05 7:27 
GeneralActiveX VBScripting problem Pin
mdave5-Jan-05 7:58
mdave5-Jan-05 7:58 
GeneralInterface Discovery - Modification Pin
KragAapie4-Jan-05 19:01
KragAapie4-Jan-05 19:01 
GeneralRe: Interface Discovery - Modification Pin
Martin Koorts9-Jan-05 22:19
Martin Koorts9-Jan-05 22:19 
GeneralRe: Interface Discovery - Modification Pin
geo_m16-Jan-05 20:58
geo_m16-Jan-05 20:58 
GeneralHelp in creating Arrow OCX Pin
Surya Prakash Adari4-Jan-05 18:09
Surya Prakash Adari4-Jan-05 18:09 
GeneralCreating threads in VB6 Activex DLL Pin
K.Sandeep4-Jan-05 0:32
K.Sandeep4-Jan-05 0:32 
GeneralRemoving the type library from a DLL Pin
Shutter3-Jan-05 15:47
Shutter3-Jan-05 15:47 

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.