DirectX SDK |
The IDirectDraw7::EvaluateMode method is used after a call to IDirectDraw7::StartModeTest to pass or fail each mode presented by the test and to step through the modes until the test is complete.
HRESULT EvaluateMode( DWORD dwFlags, DWORD *pSecondsUntilTimeout );
If the method succeeds, the return value is DD_OK.
If it fails or on completion, the method can return one of the following error values:
DDERR_TESTFINISHED |
DDERR_NEWMODE |
DDERR_INVALIDOBJECT |
DDERR_INVALIDPARAMS |
DDERR_NOTFOUND |
The IDirectDraw7::EvaluateMode method can be used in conjunction with the IDirectDraw7::StartModeTest method to determine the maximum refresh rate that an EDID monitor and display adapter combination can support for each screen resolution.
Specifically, a call to IDirectDraw7::StartModeTest directs DirectDraw to establish a set of testable resolutions and to display a mode based on the first resolution in the set. Subsequent calls to IDirectDraw7::EvaluateMode can be used to pass or fail each mode and to advance the test to the next display mode. The method steps through the testable resolutions starting with the highest refresh rate supported for a given resolution. Once a refresh rate for a given resolution passes, testing of lower refresh rates for that resolution is skipped.
When the test is initiated, or whenever a mode is passed or failed, DirectDraw will begin a 15 second timeout. An application can monitor the time remaining without passing or failing the current mode by calling IDirectDraw7::EvaluateMode with a value of 0 for the dwFlags argument. Note that DirectDraw will only change modes or terminate the test when IDirectDraw7::EvaluateMode is called. However, if the method is called after the timeout period has elapsed, the current mode will be failed, regardless of the value provided for the dwFlags argument.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 98.
Header: Declared in ddraw.h.