DirectX SDK

IDirect3DDevice7::GetDirect3D

The IDirect3DDevice7::GetDirect3D method retrieves the Direct3D object for this device.

HRESULT GetDirect3D(
  LPDIRECT3D7 *lplpD3D
);

Parameters

lplpD3D
Address that receives a pointer to the Direct3D object's IDirect3D7 interface when the method returns.

Return Values

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value is an error. For a list of possible return values, see Direct3D Immediate Mode Return Values.

Remarks

In previous versions of this interface, this method accepted a pointer to the legacy IDirect3D3 interface.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Version: Requires DirectX 7.0.
  Header: Declared in d3d.h.