The IDirect3DTexture2::GetHandle method obtains the texture handle to be used when rendering with the IDirect3DDevice2 or IDirect3DDevice interfaces.
HRESULT GetHandle(
LPDIRECT3DDEVICE2 lpDirect3DDevice2,
LPD3DTEXTUREHANDLE lpHandle
);
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 |
In the IDirect3DTexture interface, this method uses a pointer to a Direct3DDevice object instead of a Direct3DDevice2 object.
Texture handles are used only device interfaces earlier than IDirect3DDevice3. The IDirect3DDevice3 interface references textures using texture interface pointers, set through the IDirect3DDevice3::SetTexture method.
You cannot use this method to retrieve the handle of a texture that is managed by Direct3D. For more information, see Automatic Texture Management .
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in d3d.h.
Import Library: Use ddraw.lib.