I found an example of a d3d9 hook on these forums (
located here) and I'm trying to convert it to d3d8. I've replaced all the member functions of IDirect3DDevice9 with the ones of IDirect3DDevice8 (and I'm hoping that's all that I need to do... if I need to set up hooking differently for d3d8 someone let me know please) but I'm running into a problem with several functions that are different from the d3d9 versions, specifically ones with void * as a parameter, like this one:
STDMETHOD(SetVertexShaderConstant)(THIS_ DWORD Register,CONST void* pConstantData,DWORD ConstantCount) PURE;
I'm getting this error:
c:\documents and settings\ben self\desktop\direct3d-hook (8)\direct3d-hook\mydirect3d8.h(101) : error C2259: 'MyDirect3DDevice8' : cannot instantiate abstract class
due to following members:
'HRESULT IDirect3DDevice8::SetVertexShaderConstant(DWORD,const void *,DWORD)' : is abstract
c:\program files\microsoft directx 9.0 sdk (october 2004)\include\d3d8.h(331) : see declaration of 'IDirect3DDevice8::SetVertexShaderConstant'
'HRESULT IDirect3DDevice8::GetVertexShaderConstant(DWORD,void *,DWORD)' : is abstract
c:\program files\microsoft directx 9.0 sdk (october 2004)\include\d3d8.h(332) : see declaration of 'IDirect3DDevice8::GetVertexShaderConstant'
'HRESULT IDirect3DDevice8::SetPixelShaderConstant(DWORD,const void *,DWORD)' : is abstract
c:\program files\microsoft directx 9.0 sdk (october 2004)\include\d3d8.h(343) : see declaration of 'IDirect3DDevice8::SetPixelShaderConstant'
'HRESULT IDirect3DDevice8::GetPixelShaderConstant(DWORD,void *,DWORD)' : is abstract
c:\program files\microsoft directx 9.0 sdk (october 2004)\include\d3d8.h(344) : see declaration of 'IDirect3DDevice8::GetPixelShaderConstant'
in this line:
*ppReturnedDeviceInterface = new MyDirect3DDevice8(this, *ppReturnedDeviceInterface);
What do these mean, and how do I fix them? If you want to see the whole code, it is basically exactly the same as the d3d9 hooking example except the functions are the d3d8 ones.