Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

COleDispatchDriver equivalent in ATL?

223 views
Skip to first unread message

cramoisi

unread,
May 15, 2001, 8:44:08 AM5/15/01
to
I wonder if there is any helper class for using IDispatch
just like the one in MFC, COleDispatchDriver. Thanks.


Scot T Brennecke

unread,
May 15, 2001, 9:48:23 AM5/15/01
to
CComDispatchDriver

Kyle Alons

unread,
May 15, 2001, 9:49:03 AM5/15/01
to
CComDispatchDriver

-----------------------------------------------------------------
Automate your software builds with Visual Build
www.kinook.com

"cramoisi" <g04...@mail.ecc.u-tokyo.ac.jp> wrote in message
news:#uY4cyT3AHA.1812@tkmsftngp05...

Vadim Melnik

unread,
May 15, 2001, 10:02:00 AM5/15/01
to
Also have a look at C++ compiler COM support, _com_dispatch_XXX functions.
They are defined in ComDef.h (_com_dispatch_propget, _com_dispatch_propput,
_com_dispatch_method, _com_dispatch_raw_propget, etc).


--
Best regards,
Vadim Melnik,
Freelance Consultant.
_____________________
http://www.docsultant.com/


cramoisi

unread,
May 16, 2001, 10:48:53 AM5/16/01
to
Thanks for your help.
I want to call methods so CComDispatchDriver was of little use,
but for _com_dispatch_method, there is no source nor documentation.
I'd rather copy InvokeHelper() from MFC.

"Vadim Melnik" <vmn...@REMOVETHISdocsultant.com> wrote in message
news:eBFznfU3AHA.1956@tkmsftngp04...

Igor Tandetnik

unread,
May 16, 2001, 11:36:54 AM5/16/01
to
CComDispatchDriver is very poorly documented. Somehow only GetProperty and
PutProperty methods made their way into the documentation. If you look into
<atlcom.h> however, you will find

HRESULT GetPropertyByName(LPCOLESTR lpsz, VARIANT* pVar)
HRESULT GetProperty(DISPID dwDispID, VARIANT* pVar)

HRESULT PutPropertyByName(LPCOLESTR lpsz, VARIANT* pVar)
HRESULT PutProperty(DISPID dwDispID, VARIANT* pVar)

HRESULT GetIDOfName(LPCOLESTR lpsz, DISPID* pdispid)

HRESULT Invoke0(DISPID dispid, VARIANT* pvarRet = NULL)
HRESULT Invoke0(LPCOLESTR lpszName, VARIANT* pvarRet = NULL)
HRESULT Invoke1(DISPID dispid, VARIANT* pvarParam1, VARIANT* pvarRet =
NULL)
HRESULT Invoke1(LPCOLESTR lpszName, VARIANT* pvarParam1, VARIANT* pvarRet =
NULL)
HRESULT Invoke2(DISPID dispid, VARIANT* pvarParam1, VARIANT* pvarParam2,
VARIANT* pvarRet = NULL)
HRESULT Invoke2(LPCOLESTR lpszName, VARIANT* pvarParam1, VARIANT*
pvarParam2, VARIANT* pvarRet = NULL)
HRESULT InvokeN(DISPID dispid, VARIANT* pvarParams, int nParams, VARIANT*
pvarRet = NULL)
HRESULT InvokeN(LPCOLESTR lpszName, VARIANT* pvarParams, int nParams,
VARIANT* pvarRet = NULL)

static HRESULT GetProperty(IDispatch* pDisp, DISPID dwDispID,
static HRESULT PutProperty(IDispatch* pDisp, DISPID dwDispID,


That should be rich enough for all intents and purposes.
--
With best wishes,
Igor Tandetnik

"cramoisi" <g04...@mail.ecc.u-tokyo.ac.jp> wrote in message

news:eWXAhfh3AHA.1924@tkmsftngp02...

Vadim Melnik

unread,
May 16, 2001, 3:48:14 PM5/16/01
to
> That should be rich enough for all intents and purposes.
I agree with you Igor. Although CComDispatchDriver doesn't have nice
solution for the next sample:

[propget, id(1)] HRESULT FooProp([in] BSTR bs, [out, retval] long *plVal);


"Igor Tandetnik" <itand...@whenu.com> wrote in message
news:ODpNK4h3AHA.1792@tkmsftngp04...

0 new messages