Page 1 of 1

DirectX9 equivalent of _PB_Direct3D_Device?

Posted: Wed Jan 21, 2009 9:21 pm
by chris_b
With the default DirectX7 subsystem we can find the IDirect3DDevice7 interface like this:

Code: Select all

D3Ddevice_interface.IDirect3DDevice7

Start3D()
  !extrn _PB_Direct3D_Device
  !MOV dword EAX, [_PB_Direct3D_Device]
  !MOV dword [v_D3Ddevice_interface],EAX
Stop3D()
What do I need instead of _PB_Direct3D_Device to find the IDirect3DDevice9 interface when using the DirectX9 subsystem?

Posted: Wed Jan 21, 2009 9:32 pm
by Fluid Byte
Replace 7 with 9?

Posted: Wed Jan 21, 2009 9:44 pm
by chris_b
Fluid Byte wrote:Replace 7 with 9?
Yes, D3Ddevice_interface needs to be a IDirect3DDevice9 structure - but it seems like the DirectX9 subsystem uses something other than _PB_Direct3D_Device.

Posted: Wed Jan 21, 2009 11:21 pm
by Fluid Byte
Yeah, just realized that. The pointer is returning NULL when you use DX9 subsystem.