Re: Compile Error on Propputref



"RichardF" <RichardF@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:19093789-4A4D-4EA9-8235-EB24C781E34B@xxxxxxxxxxxxx
> [propputref, id(5)]
> HRESULT Parent([in] IBoundingBox* newVal);
>
> When i compile with this method it produces the following error
> message. But when i change propputref to propput it compiles ok.
>
> ... \include\atlcom.h(1759) : error C2259: 'ATL::CComObject<Base>' :
> cannot instantiate abstract class
> with
> [
> Base=BoundingBox
> ]
> due to following members:
> 'HRESULT IBoundingBox::putref_Parent(IBoundingBox *)' : pure
> virtual function was not defined
> BoundingBox.h(32) : see declaration of
> 'IBoundingBox::putref_Parent'

How did you name the member function in your C++ class? It should be
put_Parent for [propput], but putref_Parent for [propputref]. In fact,
you can have both methods for the same property, with different
semantics.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


.



Relevant Pages

  • Re: Compile Error on Propputref
    ... I assume there is some benefit in using putref. ... But when i change propputref to propput it compiles ok. ... >> cannot instantiate abstract class ... >> virtual function was not defined ...
    (microsoft.public.vc.atl)
  • Compile Error on Propputref
    ... When i compile with this method it produces the following error message. ... But when i change propputref to propput it compiles ok. ...
    (microsoft.public.vc.atl)
  • Re: exportdll DLL
    ... way it can succeed is if you force a compile ... since an inline function doesn't really belong to any module; ... The virtual function issue is more interesting. ... Suppose you have the OP's class CMetaData: ...
    (microsoft.public.vc.mfc)
  • RE: [newbie][long]Pure virtual function call :(
    ... > I'm Visual C++ 6 newbie. ... I'm trying to compile some simple ... >: see declaration of 'QueryInterface' ... > virtual function was not defined ...
    (microsoft.public.dotnet.languages.vc)
  • RE: [newbie][long]Pure virtual function call :(
    ... I'm trying to compile some simple ... >: see declaration of 'QueryInterface' ... > virtual function was not defined ... > pure virtual function was not defined ...
    (microsoft.public.dotnet.languages.vc)