Newdisp is a tool that provides two capabilities: it can be used to dynamically reload a GDI display driver without rebooting, and it can be used to adjust the maximum graphics acceleration level that the system allows the display driver to do.
(After NT 5.0 Beta Two, a slider control will be added to the control panel video applet to allow users to control the acceleration level via the user interface, as is done in Windows 95 and Windows 98. The newdisp tool is useful for allowing this value to be set by testing automation.)
To run newdisp, first close all Direct3D and OpenGL applications. Then invoke it as follows, with an optional acceleration level parameter:
newdisp [-Ln]
n is the optional maximum graphics acceleration level that the system will allow. It may be any of the following values:
0 - All display driver accelerations are permitted;
1 - DrvSetPointerShape and DrvCreateDeviceBitmap are disabled;
2 - In addition to 1, more sophisticated GDI accelerations are disallowed, including DrvStretchBlt, DrvFillPath, DrvGradientFill, DrvLineTo, DrvAlphaBlend, and DrvTransparentBlt;
3 - In addition to 2, all DirectDraw and Direct3D accelerations are disallowed;
4 - In addition to 3, almost all GDI accelerations are disallowed, except for solid color fills, DrvCopyBits, DrvTextOut, and DrvStrokePath. DrvEscape is disabled;
5 - No hardware accelerations are allowed at all. The driver will only be called to do blts from a system memory surface to the screen.
Every time newdisp is invoked, it will reload the GDI display driver. In this way, the display driver can be updated without rebooting, by copying the new driver to the \system32 directory and invoking newdisp. This capability is intended only for easing the burden of display driver development, so that during development reboots arent needed as frequently when updating display driver code.
Note that newdisp does not currently cause the miniport to be reloaded. Consequently, if the miniport is changed, the system will still have to be rebooted.
Newdisp accomplishes the dynamic reload by doing the following, assuming that no driver references exist at the time of invocation. First, it does a ChangeDisplaySettings call to 640x480x16 colors, which causes the system to load and run the 16 color VGA display driver .DLL, and at the same causes the old display driver .DLL to be unloaded from memory. Then, newdisp immediately does a ChangeDisplaySettings call back to the original mode, which causes the new display driver .DLL to be loaded from \system32 directory, and the 16 color VGA display driver .DLL to be unloaded.
A reference to the driver instance will exist if the driver has active Direct3D, WNDOBJ, or DRIVEROBJ objects. When newdisp is run while a reference to the driver instance exists, the old display driver .DLL will never be unloaded, and correspondingly the new display driver .DLL will never be loaded.
Thus, by copying an updated version of the display driver .DLL to the \system32 directory and then invoking newdisp, the display driver is reloaded without having to wait for a reboot.
Newdisp relies on dynamic driver loading functionality that has been added to NT 5.0 to reload the driver, and consequently will not work on NT 4.0 or older systems. It will also not work if the VGA driver cannot be loaded on the graphics device, or if the native display driver supports a mode of 640x480x16 colors, instead of letting that mode be handled by the VGA driver.