Partager via


SwapChain.GetFrontBufferData(Surface) Method (Microsoft.DirectX.Direct3D)

Generates a copy of the swap chain's front buffer and places it in a Surface object provided by the application.

Definition

Visual Basic Public Sub GetFrontBufferData( _
    ByVal frontBuffer As Surface _
)
C# public void GetFrontBufferData(
    Surface frontBuffer
);
C++ public:
void GetFrontBufferData(
    SurfacefrontBuffer
);
JScript public function GetFrontBufferData(
    frontBuffer : Surface
);

Parameters

frontBuffer Microsoft.DirectX.Direct3D.Surface
[in, out] A Surface object that receives a copy of the swap chain's front buffer. The data is returned in successive rows with no intervening space, from the vertically highest row to the lowest.

Remarks

For windowed mode, the size of the destination surface should be the size of the desktop. For full-screen mode, the size of the destination surface should be the screen size.

Exceptions

InvalidCallException

The method call is invalid. For example, a method's parameter might contain an invalid value.