Re: is CArray<CComPtr<IUnknown>, CComPtr<IUnknown>&> possible?
- From: "Heinz Ozwirk" <SPAMhozwirk@xxxxxxxx>
- Date: Fri, 29 Sep 2006 08:06:46 +0200
"JD" <jdt_young@xxxxxxxxx> schrieb im Newsbeitrag
news:O6leaq24GHA.1460@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
I want to have a declaration as follows:
CArray<CComPtr<IUnknown>, CComPtr<IUnknown>&> a;
But VC++ 6.0 gives me a compile error:
cannot convert parameter 1 from 'struct IUnknown ** ' to 'class
ATL::CComPtr<struct IUnknown> *'
The reason is that there is a ATL function requires a parameter of address
of CComPtr<IUnknown>, but the operator & of CComPtr<IUnknown> returns
IUnknown* and hence &CComPtr<IUnknown> returns IUnknown**.
Do you know how to resolve this problem? Thanks for any help.
Tony
Try CAdapt< CComPtr< IUnknown > >
Heinz
.
- References:
- Prev by Date: WM_GETTEXT -> EDITBOX wont get the string?
- Next by Date: Re: WM_GETTEXT -> EDITBOX wont get the string?
- Previous by thread: is CArray<CComPtr<IUnknown>, CComPtr<IUnknown>&> possible?
- Next by thread: Re: WM_SYSCOMMAND & SC_RESTORE will not restore the window
- Index(es):
Relevant Pages
|