Microsoft DirectX 8.1 (C++)

IDirect3DSurface8::GetContainer

Provides access to the parent cube texture or texture (mipmap) object, if this surface is a child level of a cube texture or a mipmap.

HRESULT GetContainer(
  REFIID riid
  void** ppContainer
);

Parameters

riid
[in] Reference identifier of the container being requested.
ppContainer
[out] Address of a pointer to fill with the container pointer if the query succeeds. See Remarks.

Return Values

If the method succeeds, the return value is D3D_OK.

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

Remarks

If the surface is created using IDirect3DDevice8::CreateImageSurface, IDirect3DDevice8::CreateRenderTarget, or IDirect3DDevice8::CreateDepthStencilSurface, the surface is considered stand alone. In this case, GetContainer will return the Direct3D device used to create the surface.

Requirements

  Header: Declared in D3d8.h.
  Import Library: Use D3d8.lib.