DirectX SDK

DirectDrawSurface7.Unlock

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

object.Unlock(r As RECT)

Parameters

object
Object expression that resolves to a DirectDrawSurface7 object.
r
RECT type that is used to lock the surface in the corresponding call to the DirectDrawSurface7.Lock method. This parameter can be Nothing only if the entire surface was locked by passing Nothing in the r parameter of the corresponding call to the DirectDrawSurface7.Lock method.

Error Codes

If the method fails, it raises an error, and Err.Number can be set to one of the following values:

DDERR_GENERIC
DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_INVALIDRECT
DDERR_NOTLOCKED
DDERR_SURFACELOST

Remarks

Because it is possible to call DirectDrawSurface7.Lock multiple times for the same surface with different destination rectangles, the r parameter links the calls to the DirectDrawSurface7.Lock and DirectDrawSurface7.Unlock methods.

See Also

DirectDrawSurface7.Lock