IDirect3DVolume9::GetContainer method (d3d9helper.h)

Provides access to the parent volume texture object, if this surface is a child level of a volume texture.

Syntax

HRESULT GetContainer(
  [in]          REFIID riid,
  [out, retval] void   **ppContainer
);

Parameters

[in] riid

Type: REFIID

Reference identifier of the volume being requested.

[out, retval] ppContainer

Type: void**

Address of a pointer to fill with the container pointer, if the query succeeds.

Return value

Type: HRESULT

If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be D3DERR_INVALIDCALL.

Remarks

If the call succeeds, the reference count of the container is increased by one.

Here's an example getting the parent volume texture of a volume texture.


// Assumes pSurface is a valid IDirect3DVolume9 pointer
void *pContainer = NULL;
IDirect3DVolumeTexture9 *pVolumeTexture = NULL;
HRESULT hr = pVolume->GetContainer(IID_IDirect3DVolumeTexture9, &pContainer);
if (SUCCEEDED(hr) && pContainer)
{
    pVolumeTexture = (IDirect3DVolumeTexture9 *)pContainer;

Requirements

   
Target Platform Windows
Header d3d9helper.h (include D3D9.h)
Library D3D9.lib

See also

IDirect3DVolume9