IDirect3DSurface9::LockRect

A method of IDirect3DSurface9 which gets a pointer to D3DLOCKED_RECT that describes the locked region.

Syntax
HRESULT LockRect( D3DLOCKED_RECT * pLockedRect,  CONST RECT * pRect,  DWORD Flags );

Parameters
 pLockedRect -  Output pointer to a D3DLOCKED_RECT structure that will describe the locked region.

 pRect -  A pointer to a RECT which will be the region to lock. NULL will cause it to lock the entire surface.

 Flags -  Zero or more flags that will determine how it will lock. For more info, see D3DLOCK:
 * D3DLOCK_DISCARD
 * D3DLOCK_DONOTWAIT
 * D3DLOCK_NO_DIRTY_UPDATE
 * D3DLOCK_NOSYSLOCK
 * D3DLOCK_READONLY

Return Values
If it succeeds, it will return D3D_OK, otherwise, it will return either D3DERR_INVALIDCALL or D3DERR_WASSTILLDRAWING.

Requirements
 Header -  d3d9.h

 Library -  d3d9.lib