3.2.3 Virtual-Display Device Services

The grabber calls several virtual-display device functions to carry out requests to update, paint, or grab the screen. To call a virtual-display device function, the grabber first retrieves the virtual-display device entry point address using Get Device Entry Point Address (Interrupt 2Fh Function 1684h). The grabber then can set registers and call the address to carry out a function.

The grabber calls the Get_Version function to verify that it is matched with the correct virtual-display device. Whenever the grabber needs access to the video memory or the video controller context, it queries the virtual display device. The virtual-display device returns a structure describing the requested memory or controller context.

The grabber calls the Get_Mem function to get the current contents of the video memory while updating the windowed display. The grabber calls the Get_GrbMem function to get a snapshot of the entire screen in response to the user pressing the ALT+PRNTSCRN key combination in a full-screen VM.

The grabber calls the Free_Mem and Free_Grab functions to tell the virtual-display device that the grabber is no longer using this memory. Get_State and Get_GrbState return the current and grabbed controller context, respectively.

The grabber calls the Get_Mod function to update the windowed display
incrementally. Get_Mod returns a structure that indicates modifications to the
current display. The grabber modifies only those parts of the window that have changed, and then calls the Clear_Mod function to inform the virtual-display device that the modifications have been carried out.

To make sure that the video memory or context will not change when the grabber is accessing the memory, the VM should suspend operations immediately after a call to the Get_Mem or Get_Mod function. The VM can continue operations only after a call to the Free_Mem function or an explicit call to the Unlock_App function from the grabber.