This section contains porting notes that pertain to display drivers only.
The Win32 DeviceIoControl function has been replaced with EngDeviceIoControl. The return value is the inverse of what it used to be: 0 (ERROR_SUCCESS) for success, and non-zero for failure. The new function also takes one less parameter; DeviceIoControl’s last parameter, lpoverlapped, is no longer necessary.
DCI support has been permanently removed from the system. Therefore, all DCI code used in your driver must be removed.
VFLATD functionality is not supported for kernel-mode threads. This means that your driver can no longer use this functionality to map a banked frame buffer in the miniport for GDI to write to.
For drivers that work on the DEC ALPHA only: all calls to the special TRANSLATE_ADDR access macros should be removed. Calls to the WRITE_FAST access macros should be changed to use the WRITE_REGISTER access macros. On the ALPHA, the WRITE_REGISTER and WRITE_PORT macros handle all required address translation by calling into the HAL.
Note The GDI engine is still not equipped to handle sparse frame buffer access.
Because all Windows NT 3.51 drivers are incompatible in Windows NT 4.0, a few things have been cleaned up in the display drivers:
The following is a copy of the sample code found in every Microsoft display driver:
// Zero the entire structure to start off with. memset(pdm, 0, sizeof(DEVMODEW)); // Set the name of the device to the name of the DLL. memcpy(pdm->dmDeviceName, DLL_NAME, sizeof(DLL_NAME)); pdm->dmSpecVersion = DM_SPECVERSION; pdm->dmDriverVersion = DM_SPECVERSION; pdm->dmSize = sizeof(DEVMODEW); pdm->dmDriverExtra = DRIVER_EXTRA_SIZE; pdm->dmBitsPerPel = pVideoTemp->NumberOfPlanes * pVideoTemp->BitsPerPlane; pdm->dmPelsWidth = pVideoTemp->VisScreenWidth; pdm->dmPelsHeight = pVideoTemp->VisScreenHeight; pdm->dmDisplayFrequency = pVideoTemp->Frequency; pdm->dmDisplayFlags = 0; pdm->dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY | DM_DISPLAYFLAGS ;
In order for the applet to install the new driver, the OptionType = VIDEO line in the driver's .inf file must be changed to:
OptionType = VIDEO40BETA