Microsoft DirectX 9.0

IDirect3DVolume9::GetContainer Method

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


HRESULT GetContainer(      

    REFIID riid,     void **ppContainer );


[in] Reference identifier of the volume being requested.
[out, retval] Address of a pointer to fill with the container pointer, if the query succeeds.

Return Value

If the method succeeds, the return value is D3D_OK.

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


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;

© 2002 Microsoft Corporation. All rights reserved.