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 );
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;
Header: Declared in D3d9.h.