Bewerken

Delen via


PFND3DDDI_GETPITCH callback function (d3dumddi.h)

The GetPitch function retrieves the pitch of a protected or non-lockable surface.

Syntax

PFND3DDDI_GETPITCH Pfnd3dddiGetpitch;

HRESULT Pfnd3dddiGetpitch(
  HANDLE hDevice,
  D3DDDIARG_GETPITCH *unnamedParam2
)
{...}

Parameters

hDevice

A handle to the display device (graphics context).

unnamedParam2

pData [in, out]

A pointer to a D3DDDIARG_GETPITCH structure that describes the protected surface.

Return value

The GetPitch function returns one of the following values:

Return code Description
S_OK The pitch of the protected surface is successfully retrieved.
D3DDDIERR_NOTAVAILABLE The driver does not support the GetPitch function.

Remarks

Hardware and drivers can optionally support the GetPitch function.

The surface for which the GetPitch function returns the pitch can be non-lockable or protected. Therefore, the application cannot retrieve the pitch of the surface through a call to the driver's Lock function. The application must retrieve the pitch of the surface to properly allocate the system memory buffer that the application subsequently uses in calls to the driver's EncryptionBlt and DecryptionBlt functions.

Requirements

Requirement Value
Minimum supported client GetPitch is supported beginning with the Windows 7 operating system.
Target Platform Desktop
Header d3dumddi.h (include D3dumddi.h)

See also

D3DDDIARG_GETPITCH

DecryptionBlt

EncryptionBlt