ResetHiResMode


FAR PROC ResetHiResMode()

Used by the Windows 95 VDD to cause the video hardware to be reinitialized after returning to Windows from a full-screen MS-DOS session.

This function must be placed in a FIXED code segment, preferably the TEXT segment as defined in your display driver's .DEF file.

Drivers must register the address of ResetHiResMode with the Windows 95 VDD module by calling the VDD function VDD_DRIVER_REGISTER. Subsequently, every time that the user switches to a full-screen MS-DOS session, ResetHiResMode is called to do the work.

When ResetHiResMode is called, the DS register will not be pointing to the driver's data segment. The driver should be very careful to establish the segment registers when ResetHiResMode is called.

ResetHiResMode has several tasks:

It must set the display hardware back into the Windows running mode that it was in before running the full-screen MS-DOS session.

It must reinitialize and reenable the hardware cursor. Because the SetCursor function will not be called in response to returning from a full-screen VM, the display driver should save the complete lpCursorShape data structure in its data segment every time SetCursor is called. Then, if the user switches to full-screen and then returns, the cursor can be restored from this saved lpCursorShape data structure.

It must reinitialize the Windows palette. Again, the display driver should save a copy of the Windows palette (if running at 8 BPP) and track all of its updates in its data segment so that it can be restored during ResetHiResMode.

It must clear the BUSY bit in the driver's PDEVICE structure so that the drawing routines can access the hardware again.

It should call the VDD VDD_DRIVER_REGISTER function just as was done at the initial PhysicalEnable routine when Windows was first started. This will allow the VDD and mini-VDD to reinitialize themselves for running Windows again.

It should call the VDD VDD_SAVE_DRIVER_STATE function after the hardware has been completely resetup for Windows. This allows the VDD to snapshot the hardware state and make sure it is accurate for running the Windows VM again.

See also VDD_DRIVER_REGISTER