Click here to Skip to main content
15,921,793 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralC/C++ guru's -- is this possible Pin
Brian Anderson18-Jan-00 9:32
Brian Anderson18-Jan-00 9:32 
GeneralRE: C/C++ guru's -- is this possible Pin
Tim Deveaux19-Jan-00 5:09
Tim Deveaux19-Jan-00 5:09 
GeneralRE: C/C++ guru's -- is this possible Pin
Peter A. Tolan29-Jan-00 21:15
suss Peter A. Tolan29-Jan-00 21:15 
QuestionHow to prevent resource renumbering? Pin
wwu18-Jan-00 4:58
wwu18-Jan-00 4:58 
GeneralMAPI Question - getting desperate! Pin
Jason Hattingh17-Jan-00 1:39
sussJason Hattingh17-Jan-00 1:39 
GeneralAdding a Tab Control to a toolbar Pin
Frank Deo16-Jan-00 11:52
Frank Deo16-Jan-00 11:52 
GeneralCOM & EventSink and IDispatch Pin
Member 351715-Jan-00 13:00
Member 351715-Jan-00 13:00 
GeneralRE: COM & EventSink and IDispatch Pin
Alex Gorev17-Jan-00 4:42
Alex Gorev17-Jan-00 4:42 
Hi!

As you've already mentioned you can't use the event map in the late binding. You have to implement the event sink and then use one of the functions below to create a connection between an object's connection point and a client's sink:

CComPtr::Advise(...) - using smart pointers

AtlAdvise(...) - using ATL

IConnectionPoint::Advise(...) - generic interface method

And of course you have to Unadvise when you are done with the object.

Regards,
Alex Gorev,
Dundas Software.


==================
The original message was:


I have used the class wizard to generate a wrapper class from the type library
of an in process server.

I can access the methods and properties by creating a dispatch like this one for both.

if(((*(COleDispatchDriver*)(&m_IMCSClientEvents))).m_lpDispatch==NULL){ //UCS_MCSSERVER.EXE
if (!(m_IMCSClientEvents.CreateDispatch("MCSObject.MCSObject.1", &oe))) {


But how do I capture the events. Do you create a dispatch for events? If so how do you capture them? I'm confused.

I suspect the answer is use the EVENTSINK_MAP. But that would require an IDC value. Since I am late binding
I do not have an IDC value I am not sure how to use the EVENTSINK_MAP.

Thanks in advance.

GeneralRE: RE: COM & EventSink and IDispatch Pin
Anonymous18-Jan-00 9:24
suss Anonymous18-Jan-00 9:24 
GeneralRE: COM & EventSink and IDispatch Pin
Alex Gorev17-Jan-00 4:54
Alex Gorev17-Jan-00 4:54 
GeneralClosing down a child window in OnInitialUpdate() Pin
Anonymous15-Jan-00 7:40
suss Anonymous15-Jan-00 7:40 
GeneralRE: Closing down a child window in OnInitialUpdate() Pin
Martin Speiser17-Jan-00 23:46
Martin Speiser17-Jan-00 23:46 
GeneralOnDraw how to get the invalidated area... Pin
braulio14-Jan-00 3:30
braulio14-Jan-00 3:30 
GeneralRE: OnDraw how to get the invalidated area... Pin
ChrisD14-Jan-00 17:35
suss ChrisD14-Jan-00 17:35 
GeneralGUI Toolkit Pin
frank13-Jan-00 8:29
frank13-Jan-00 8:29 
GeneralRE: GUI Toolkit Pin
Andrei Zenkovitch13-Jan-00 9:52
Andrei Zenkovitch13-Jan-00 9:52 
GeneralRE: GUI Toolkit Pin
mrcoder20-Jan-00 4:56
mrcoder20-Jan-00 4:56 
GeneralRE: GUI Toolkit Pin
mjf20-Jan-00 10:29
mjf20-Jan-00 10:29 
GeneralScreensaver Pin
Andreas Jaeger13-Jan-00 6:17
Andreas Jaeger13-Jan-00 6:17 
QuestionHow to use ADO without #import directive? Pin
Anonymous13-Jan-00 5:51
suss Anonymous13-Jan-00 5:51 
GeneralUsing #Import Pin
Matthias Steinbart13-Jan-00 0:42
sussMatthias Steinbart13-Jan-00 0:42 
Questionhide application from task-bar, task-manager? Pin
Nick Hodapp12-Jan-00 9:01
sitebuilderNick Hodapp12-Jan-00 9:01 
AnswerRE: hide application from task-bar, task-manager? Pin
Anonymous12-Jan-00 11:39
suss Anonymous12-Jan-00 11:39 
GeneralTab Control Pin
Brigg Thorp30-Dec-99 2:10
Brigg Thorp30-Dec-99 2:10 
GeneralRE: Tab Control Pin
softdiy30-Dec-99 21:33
softdiy30-Dec-99 21:33 

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.