IDirectDrawSurface7::PageUnlock method

Unlocks a system-memory surface, which then allows it to be paged out.

Syntax


HRESULT PageUnlock(
  [in] DWORD dwFlags
);

Parameters

dwFlags [in]

Currently not used and must be set to 0.

Return value

If the method succeeds, the return value is DD_OK.

If it fails, the method can return one of the following error values:

  • DDERR_CANTPAGEUNLOCK
  • DDERR_INVALIDOBJECT
  • DDERR_INVALIDPARAMS
  • DDERR_NOTPAGELOCKED
  • DDERR_SURFACELOST

Remarks

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

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

IDirectDrawSurface7::PageUnlock was not implemented in the IDirectDraw interface version.

You must use LoadLibrary to explicitly link to Ddraw.dll and then use GetProcAddress to access the PageUnlock method.

Requirements

Header

Ddraw.h

Library

Ddraw.lib

DLL

Ddraw.dll

See also

IDirectDrawSurface7

 

 

Show: