C:\Program Files\Microsoft Visual Studio
9.0\VC\atlmfc\include\atlcom.h(1801) : error C2259: 'ATL::CComObject<Base>' :
cannot instantiate abstract class
with
[
Base=IExtendPropertySheet2
]
due to following members:
'HRESULT
IExtendPropertySheet::CreatePropertyPages(LPPROPERTYSHEETCALLBACK,LONG_PTR,LPDATAOBJECT)' : is abstract
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\Mmc.h(3096) :
see declaration of 'IExtendPropertySheet::CreatePropertyPages'
'HRESULT IExtendPropertySheet::QueryPagesFor(LPDATAOBJECT)' : is
abstract
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\Mmc.h(3101) :
see declaration of 'IExtendPropertySheet::QueryPagesFor'
'HRESULT IExtendPropertySheet2::GetWatermarks(LPDATAOBJECT,HBITMAP
*,HBITMAP *,HPALETTE *,BOOL *)' : is abstract
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\Mmc.h(3977) :
see declaration of 'IExtendPropertySheet2::GetWatermarks'
C:\Program Files\Microsoft Visual Studio
9.0\VC\atlmfc\include\atlcom.h(1790) : while compiling class template member
function 'HRESULT ATL::CComCreator<T1>::CreateInstance(void *,const IID
&,LPVOID *)'
with
[
T1=ATL::CComObject<IExtendPropertySheet2>
]
SerSnapExt.h:
STDMETHODIMP CreatePropertyPages(
LPPROPERTYSHEETCALLBACK ,
LONG_PTR ,
LPDATAOBJECT
);
STDMETHODIMP QueryPagesFor(LPDATAOBJECT);
STDMETHODIMP GetWatermarks(
LPDATAOBJECT,
HBITMAP,
HBITMAP,
HPALETTE,
BOOL
);
ServSnapExt.cpp:
STDMETHODIMP GetWatermarks( LPDATAOBJECT lpIDataObject, HBITMAP
*lphWatermark, HBITMAP *lphHeader, HPALETTE *lphPalette, BOOL *bStretch)
{
...
STDMETHODIMP QueryPagesFor( DATA_OBJECT_TYPES lpDataObject)
{
...
STDMETHODIMP CreatePropertyPages(LPPROPERTYSHEETCALLBACK lpProvider,long
handle, IUnknown* pUnk,DATA_OBJECT_TYPES lpIDataObject)
{
...
any suggestion?
But hoever i change them between old/new ones i get the "abstract" error.
The declaration posted under SerSnapExt.h: is the same as in the included
Mmc.h.
According to Mmc.h this should be:
STDMETHODIMP GetWatermarks(
LPDATAOBJECT,
HBITMAP *,
HBITMAP *,
HPALETTE *,
BOOL *
);
How did you manage to instantiate CComObject<IExtendPropertySheet2> ?
The template parameter of CComObject is supposed to be your class
(usually implementing one or more interfaces), not the interface itself.
--
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
After including atlsnap.h everything works fine.
Thanks a lot for your help.