IDirectDrawSurface2::PageUnlock

HRESULT PageUnlock(DWORD dwFlags);

Unlocks a system-memory surface, allowing it to be paged out.

·Returns DD_OK if successful, or one of the following error values otherwise:

DDERR_CANTPAGEUNLOCK

DDERR_INVALIDOBJECT

DDERR_INVALIDPARAMS

DDERR_NOTPAGELOCKED

DDERR_SURFACELOST

dwFlags

This parameter is currently not used and must be set to 0.

A lock count is maintained for each surface and is incremented each time IDirectDrawSurface2::PageLock is called for that surface. The count is decremented when IDirectDrawSurface2::PageUnlock is called. When the count reaches 0, the memory is unlocked and can then be paged by the operating system.

This method works only on system-memory surfaces; it will not page unlock a display-memory surface or an emulated primary surface. If an application calls this method on a display-memory surface, this method will do nothing except return DD_OK.

This method was not implemented in the IDirectDraw interface.