// d3dumddi.h
PFND3DDDI_GETPITCH Pfnd3dddiGetpitch;
HRESULT Pfnd3dddiGetpitch(
HANDLE hDevice,
D3DDDIARG_GETPITCH *unnamedParam2
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The GetPitch function retrieves the pitch of a protected or non-lockable surface.
hDeviceA handle to the display device (graphics context).
unnamedParam2pData [in, out]
A pointer to a D3DDDIARG_GETPITCH structure that describes the protected surface.
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. |
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.