d3d9.dllGetDirect3D
Microsoft DirectX 9.0 SDK Update (October 2004)

IDirect3DDevice9::GetDirect3D Method


Returns an interface to the instance of the Microsoft Direct3D object that created the device.

Syntax

HRESULT GetDirect3D(      

    IDirect3D9 **ppD3D9 );

Parameters

ppD3D9
[out, retval] Address of a pointer to an IDirect3D9 interface, representing the interface of the Direct3D object that created the device.

Return Value

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be D3DERR_INVALIDCALL.

Remarks

Calling IDirect3DDevice9::GetDirect3D increases the reference count on the interface, so applications should call IUnknown::Release through this pointer when finished with the interface.

Note   Calling this method will increase the internal reference count on the IDirect3D9 interface. Failure to call IUnknown::Release when finished using this IDirect3D9 interface results in a memory leak.



© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.