ISurfacePresenterFlip::GetBuffer method

Gets an interface pointer for the indicated back buffer.


HRESULT GetBuffer(
  [in]          UINT                backBufferIndex,
  [in]          REFIID              riid,
  [out, retval] iid_is(riid) void** ppBuffer


  • backBufferIndex [in]

  • riid [in]

  • ppBuffer [out, retval]

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.


The riid specifies the requested interface.

This method is used in the same way as ISurfacePresenter::Present. The main difference is that the index refers to a different buffer after each present, in a similar way to how IDXGISwapChain buffers work. Buffer 0 is always the next buffer that will be presented.


Minimum supported client

Windows 10

Minimum supported server

Windows Server 2016


Mshtml.dll; Edgehtml.dll