A version of this page is also available for
This method notifies DirectDraw that the direct surface manipulations are complete.
HRESULT Unlock( 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:
For more information on these error codes see DirectDraw Return Values.
An example showing the use of this function can be found in the topic How to use DirectDraw.
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.
|Windows Embedded CE||Windows Embedded CE 6.0 and later|
|Windows Mobile||Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later|