ULONG DrvGetModes(
IN HANDLE hDriver, | |
IN ULONG cjSize, | |
OUT DEVMODEW *pdm | |
); |
DrvGetModes lists the modes supported by a given device.
The return value is the count of bytes written to the buffer, or, if pdm is null, the number of bytes required to hold all mode data. If an error occurs, the return value is zero, and an error code is logged.
This function is required for display drivers. It is called indirectly by the Display applet contained within the 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 64K color modes that were returned in the list of modes obtained from the miniport driver.
The DrvGetModes function can be called even when the display driver has not been loaded.
DEVMODEW, DrvAssertMode, DrvEnablePDEV