ISurfaceManager::AllocSurface method

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(
  [in]  FORMAT_TYPE type,
  [out] 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 value

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

Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
GPUPipelineTime.h
Library
GPUPipelineVC8.lib (Visual Studio 2005);
GPUPipelineVC7.lib (Visual Studio .NET)

See also

ISurfaceManager Interface

ISurfaceManager::AllocSurfaceSize