IDirectDraw2::GetVerticalBlankStatus

HRESULT GetVerticalBlankStatus(LPBOOL lpbIsInVB);

Retrieves the status of the vertical blank.

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

DDERR_INVALIDOBJECT

DDERR_INVALIDPARAMS

lpbIsInVB

Address of the variable that will be filled with the status of the vertical blank. This parameter is TRUE if a vertical blank is occurring, and FALSE otherwise.

To synchronize with the vertical blank, use the IDirectDraw2::WaitForVerticalBlank method.