DirectX9 equivalent of _PB_Direct3D_Device?

Advanced game related topics
chris_b
Enthusiast
Enthusiast
Posts: 103
Joined: Sun Apr 27, 2003 1:54 am

DirectX9 equivalent of _PB_Direct3D_Device?

Post 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?
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

Replace 7 with 9?
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
chris_b
Enthusiast
Enthusiast
Posts: 103
Joined: Sun Apr 27, 2003 1:54 am

Post 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.
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

Yeah, just realized that. The pointer is returning NULL when you use DX9 subsystem.
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
Post Reply