Export (0) Print
Expand All

IDirectDrawSurface::Unlock (Compact 2013)

3/26/2014

This method notifies DirectDraw that the direct surface manipulations are complete.


HRESULT Unlock(
  LPRECT lpRect
); 

lpRect

Address of the RECT structure that was used to lock the surface in the corresponding call to the IDirectDrawSurface::Lock method. This parameter can be NULL only if the entire surface was locked by passing NULL in the lpDestRect parameter of the corresponding call to the IDirectDrawSurface::Lock method.

If the method succeeds, the return value is DD_OK.

If the method fails, the return value may be one of the following error values:

DDERR_GENERIC

DDERR_INVALIDOBJECT

DDERR_INVALIDPARAMS

DDERR_INVALIDRECT

DDERR_NOTLOCKED

DDERR_SURFACELOST

For more information on these error codes, see DirectDraw Return Values.

Because it is possible to call IDirectDrawSurface::Lock multiple times for the same surface with different destination rectangles, the pointer in lpRect links the calls to the IDirectDrawSurface::Lock and IDirectDrawSurface::Unlock methods.

Header

ddraw.h

Library

ddraw.lib

Show:
© 2014 Microsoft