Share via


ISurfaceManager::AllocSurfaceSize method

The AllocSurfaceSize method allocates a new ISurface of a specific size. ISurface wraps an IDirect3DSurface9 interface. However, the recommended way to allocate a surface is described in the IMediaTransform::Process documentation.

Syntax

HRESULT AllocSurfaceSize(
  [in]  FORMAT_TYPE type,
        VIDEO_SIZE  *pSize,
  [out] ISurface    **ppBuffer
);

Parameters

type [in]

A FORMAT_TYPE value that specifies the type of surface to create.

pSize

A VIDEO_SIZE structure that specifies the size of the surface to allocate.

ppBuffer [out]

Pointer to an ISurface interface pointer that wraps 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

If you do not know the exact size of the surface to allocate, use AllocSurface.

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::AllocSurface

ISurfaceManager Interface