How to determine winapi EnumDisplaySettings failure? According to MSDN
If the function fails, the return value is zero.
also
Graphics mode indexes start at zero. To obtain information for all of a display device's graphics modes, make a series of calls to EnumDisplaySettings, as follows: Set iModeNum to zero for the first call, and increment iModeNum by one for each subsequent call. Continue calling the function until the return value is zero.
How to determine if returned zero is a failure sign or mode doesnt exist (iModeNum value too big)?
There's nothing told about GetLastError. It seems like this winapi doesnt set last error on failure.
iModeNumyou enumerate until return is zero (that is failure, no more success starting from this increment). - Roman R.