Please forgive the cross-posting.
I am just trying to create an _MailItemPtr,
which is built from a _com_ptr_t,
given an instance of its underlying raw interface, IMessage.
Why won't this compile?
IMessage* pEmbeddedMsg = ...; // get valid IMessage*
_MailItemPtr pMailItem;
pMailItem.Attach (pEmbeddedMsg);
I get:
"error C2664: 'void
_com_ptr_t<_IIID>::Attach(_com_ptr_t<_IIID>::Interface *) throw()' :
cannot convert parameter 1 from 'IMessage *' to
'_com_ptr_t<_IIID>::Interface *'
with
[
_IIID=_com_IIID<_MailItem,&
_GUID_00063034_0000_0000_c000_000000000046>
]
and
[
_IIID=_com_IIID<_MailItem,&
_GUID_00063034_0000_0000_c000_000000000046>
]"
Do I have to put some wrapper glue around my raw interface pointer?
Thanks very much, Mike