This function lists the modes supported by a specified device.
ULONG DrvGetModes( IN HANDLE hDriver, IN ULONG cjSize,
OUT DEVMODEW *pdm );
Returns the count of bytes written to the buffer, or, if pdm is null, the number of bytes required to hold all mode data. Zero indicates failure.
This function is required for display drivers. It is called indirectly by the Display option in Control Panel to get the list of supported modes.
The Window Manager ( User.exe ) dynamically loads all display drivers associated with a miniport, based on the InstalledDisplayDrivers key in the registry. Each display driver is called to retrieve the list of modes supported by that combination of loaded drivers. For example, the VGA64K display driver only returns the 64 KB color modes that were returned in the list of modes obtained from the miniport driver.
This function can be called even when the display driver has not been loaded.