?/TD> |
Microsoft DirectX 9.0 |
Provides access to the parent volume texture object, if this surface is a child level of a volume texture.
Syntax
HRESULT GetContainer(
REFIID riid, void **ppContainer );
Parameters
- riid
- [in] Reference identifier of the volume being requested.
- ppContainer
- [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.
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;