次の方法で共有


IDirect3DDevice8::GetDirect3D

This method returns an interface to the instance of the Microsoft® Direct3D® object that created the device.

HRESULT GetDirect3D(
  IDirect3D8** ppD3D8
);

Parameters

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

Return Values

If the method succeeds, the return value is D3D_OK.

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

Remarks

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

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

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: D3d8.h.
Link Library: D3d8.lib.

See Also

IDirect3D8 | IUnknown::Release | IDirect3DDevice8

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.