Microsoft DirectX 9.0

IDirectDraw::WaitForVerticalBlank

The WaitForVerticalBlank method is used to help the caller synchronize itself with the vertical blank interval. Depending on the option set with dwFlags, WaitForVerticalBlank will 1) block until blank begins, 2) block until blank ends, or 3) trigger an event when the blank interval begins.

Syntax

HRESULT WaitForVerticalBlank(
  DWORD dwFlags,
  HANDLE hEvent
  );

Parameters

dwFlags

Determines how to wait for the vertical blank. May be one of the following values.

Value Description
DDWAITVB_BLOCKBEGIN Return when the vertical blank interval begins.
DDWAITVB_BLOCKBEGINEVENT Set up an event to trigger when the vertical blank begins. Not currently supported.
DDWAITVB_BLOCKEND Return when the vertical blank interval ends and display begins.

hEvent

Handle for the event that should be triggered when the vertical blank begins.

Return Values

Value Description
DD_OK The method succeeded.
DDERR_INVALIDOBJECT DirectDraw received a pointer that was an invalid DirectDraw object.
DDERR_INVALIDPARAMS One or more of the input parameters is invalid.
DDERR_WASSTILLDRAWING Informs DirectDraw that the previous Blt which is transfering information to or from this Surface is incomplete.
DDERR_UNSUPPORTED Action not supported.

See Also