Share via


ISurfaceManager::AllocSurface

The AllocSurface method allocates a new ISurface interface for the application to use. ISurface wraps an IDirect3DSurface9 interface. However, the recommended way to allocate a surface is described in the IMediaTransform::Process method documentation.

Syntax

HRESULT AllocSurface(
  FORMAT_TYPE  type,
  ISurface**  ppBuffer
);

Parameters

type

[in]  A FORMAT_TYPE value specifying the type of surface to create.

ppBuffer

[out]  Pointer to an ISurface interface pointer wrapping a Direct3D video surface. The caller must release this interface when done with it.

Return Values

The method returns an HRESULT of S_OK for success, or a standard COM error code for failure.

Remarks

To allocate a surface of a specific size, call AllocSurfaceSize.

Requirements

Client: Windows Vista

Header: Include gputransformplugin.h and GPUPipelineTime.h.

Library: Use GPUPipelineVC7.lib (for Visual Studio .NET) or GPUPipelineVC8.lib (for Visual Studio 2005).

See Also