Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Mon, 9 Jan 2006 10:20:43 +0100,    group: microsoft.public.platformsdk.com_ole        back       


COM events   
I am writing a COM client prog in MFC / Visual studio 2003.

The COM server has an event (callback) interface and a "normal" interface.

I have created the class for the "normal" interface thru the class wizard
Add Class from the TLB file of the server object.
I use this class thru ::CreateDispatch.

For the callback interface, I have found that the wizard Add Claas does not
create something I could use, so I have created by hand a class, derived
from CCmdTarget with automation capabilities.

Now the question : How do I use the class wizard to create in that class
(with the correct DISPATCH TABLE entries) the callback functions I want to
implement from my object ?
And how do I instanciate that class ?

Thanks for helping me.

Franois.
date: Mon, 9 Jan 2006 10:20:43 +0100   author:   Franois

Re: COM events   
This may help you:
http://www.codeproject.com/com/TEventHandler.asp

Take a look to the sample app

Franois a crit :
> I am writing a COM client prog in MFC / Visual studio 2003.
> 
> The COM server has an event (callback) interface and a "normal" interface.
> 
> I have created the class for the "normal" interface thru the class wizard
> Add Class from the TLB file of the server object.
> I use this class thru ::CreateDispatch.
> 
> For the callback interface, I have found that the wizard Add Claas does not
> create something I could use, so I have created by hand a class, derived
> from CCmdTarget with automation capabilities.
> 
> Now the question : How do I use the class wizard to create in that class
> (with the correct DISPATCH TABLE entries) the callback functions I want to
> implement from my object ?
> And how do I instanciate that class ?
> 
> Thanks for helping me.
> 
> Franois.
> 
> 
>
date: Mon, 09 Jan 2006 17:40:52 +0100   author:   Mathieu DEGROUX

Re: COM events   
The article is good on COM evnets, but I am really seeking for is as the
article says how can I fit an event handler into my code via the wizard.

There are some ms KB explaining how to do it by hand (DISP_FUNCTION_IDand
so), but I am trying to do it with the wizard.



"Mathieu DEGROUX"  wrote in message
news:eXni2tTFGHA.648@TK2MSFTNGP14.phx.gbl...
> This may help you:
> http://www.codeproject.com/com/TEventHandler.asp
>
> Take a look to the sample app
>
> Franois a crit :
> > I am writing a COM client prog in MFC / Visual studio 2003.
> >
> > The COM server has an event (callback) interface and a "normal"
interface.
> >
> > I have created the class for the "normal" interface thru the class
wizard
> > Add Class from the TLB file of the server object.
> > I use this class thru ::CreateDispatch.
> >
> > For the callback interface, I have found that the wizard Add Claas does
not
> > create something I could use, so I have created by hand a class, derived
> > from CCmdTarget with automation capabilities.
> >
> > Now the question : How do I use the class wizard to create in that class
> > (with the correct DISPATCH TABLE entries) the callback functions I want
to
> > implement from my object ?
> > And how do I instanciate that class ?
> >
> > Thanks for helping me.
> >
> > Franois.
> >
> >
> >
date: Tue, 10 Jan 2006 10:01:00 +0100   author:   Franois

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us