IDXVAHD_Device::CreateVideoSurface method

Creates one or more Microsoft Direct3D video surfaces.


HRESULT CreateVideoSurface(
  [in]      UINT                Width,
  [in]      UINT                Height,
  [in]      D3DFORMAT           Format,
  [in]      D3DPOOL             Pool,
  [in]      DWORD               Usage,
  [in]      DXVAHD_SURFACE_TYPE Type,
  [in]      UINT                NumSurfaces,
  [out]     IDirect3DSurface9   **ppSurfaces,
  [in, out] HANDLE              *pSharedHandle


Width [in]

The width of each surface, in pixels.

Height [in]

The height of each surface, in pixels.

Format [in]

The pixel format, specified as a D3DFORMAT value or FOURCC code. For more information, see Video FOURCCs.

Pool [in]

The memory pool in which the surface is created. This parameter must equal the InputPool member of the DXVAHD_VPDEVCAPS structure. Call the IDXVAHD_Device::GetVideoProcessorDeviceCaps method to get this value.

Usage [in]

Reserved. Set to 0.

Type [in]

The type of surface to create, specified as a member of the DXVAHD_SURFACE_TYPE enumeration.

NumSurfaces [in]

The number of surfaces to create.

ppSurfaces [out]

A pointer to an array of IDirect3DSurface9 pointers. The NumSurfaces parameter specifies the number of elements in the array. The method fills the array with pointers to the new video surfaces. The caller must release the pointers.

pSharedHandle [in, out]

Reserved. Set to NULL.

Return value

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


Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]



See also




© 2016 Microsoft