Microsoft DirectX 9.0


The Unlock method notifies DirectDraw that the surface manipulations are complete.


  LPVOID lpSurfaceData



This is the pointer returned by Lock. Since it is possible to call Lock multiple times for the same Surface with different destination rectangles, this pointer is used to tie the Lock and Unlock calls together.

Return Values

Value Description
DD_OK The method succeeded.
DDERR_INVALIDOBJECT DirectDraw received a pointer that was an invalid DirectDraw object.
DDERR_INVALIDPARAMS One or more of the input parameters is invalid.
DDERR_SURFACELOST Access to this surface is being refused because the surface memory is gone. The DirectDrawSurface object representing this surface should have Restore called on it.
DDERR_NOTLOCKED Surface was not locked. An attempt to unlock a surface that was not locked at all, or by this process, has been attempted.
DDERR_GENERIC Generic failure.
DDERR_INVALIDRECT Rectangle provided was invalid.

See Also