Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Newbie00

Need some help

This topic is 5541 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to create a wrapper for d3d8.dll. When I compile I get the error
C:\Wrapper\idirect3d8.cpp(29) : error C2259: 'f_IDirect3DDevice8' : cannot instantiate abstract class due to following members:
        c:\Wrapper\idirect3ddevice8.h(15) : see declaration of 'f_IDirect3DDevice8'
  
and it points to this inside of CreateDevice.
*temp = new f_IDirect3DDevice8(*ppReturnedDeviceInterface, &ppReturnedDeviceInterface);
   
This is all that is in CreateDevice
HRESULT f_IDirect3D8::CreateDevice(UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS *pPresentationParameters, IDirect3DDevice8 **ppReturnedDeviceInterface) {

	LPDIRECT3DDEVICE8 *temp = ppReturnedDeviceInterface;
	*temp = new f_IDirect3DDevice8(*ppReturnedDeviceInterface, &ppReturnedDeviceInterface);
	*ppReturnedDeviceInterface = *temp;
	delete temp;

	return f_pDirect3D->CreateDevice(Adapter, DeviceType, hFocusWindow, BehaviorFlags, pPresentationParameters, ppReturnedDeviceInterface);
}
  
Anyone have any ideas on how to fix this? [edited by - Newbie00 on April 18, 2003 10:46:27 PM]

Share this post


Link to post
Share on other sites
Advertisement
You are aware that when calling new, you should specify a type and not a ffunction return. I''ve never seen this attempted before.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The error seems very clear. You''re trying to instantiate a type which is abstract, i e it has pure virtual functions. You can only concretely instantiate a class which has no pure virtual functions.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!