Some drivers use registry settings to configure when they load at boot time. I can change these values and then reload, but I would like to know if the driver can be reloaded by making the changes effective without rebooting.
In particular, we are talking about a video driver (nvidia).
I read somewhere that a call through pINvoke () [User32.ll] :: ChangeDisplaySettings () with a resolution of 640x480x8bit (which is so low that it should not be supported by a modern driver) will force the windows to load the "Standard VGA driver", and another call with the current resolution, the nvidia driver will load again.
This does not work. At least in Windows 7, even if the low resolution does not appear as “supported,” the system reduces the screen to a small square in the center of the screen, showing low values when the nvidia driver is unloaded.
So, is there any .NET / Win32 API, a service to reboot, or in any way to reboot the video driver?
Perhaps turning off the device programmatically (as you could from the device manager) and re-enabling it again?
Any idea?
Many thanks.
source share