IDirect3DTexture2::GetHandle

The IDirect3DTexture2::GetHandle method obtains the texture handle for the Direct3DTexture2 object. This handle is used in all Direct3D methods in which a texture is to be referenced.

HRESULT GetHandle(
  LPDIRECT3DDEVICE2 lpDirect3DDevice2,  
  LPD3DTEXTUREHANDLE lpHandle           
);
 

Parameters

lpDirect3DDevice2
Address of the Direct3DDevice2 object into which the texture is to be loaded.
lpHandle
Address that will contain the texture handle corresponding to the Direct3DTexture2 object.

Return Values

If the method succeeds, the return value is D3D_OK .

If the method fails, the return value may be one of the following values:

DDERR_INVALIDPARAMS

Remarks

In the IDirect3DTexture interface, this method uses a pointer to a Direct3DDevice object instead of a Direct3DDevice2 object.

QuickInfo

  Windows NT: Use version 5.0 or later.
  Windows: Use Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in d3d.h.
  Import Library: Use ddraw.lib.