6.1.6 Display Grabber API

The display grabber is a dynamic-link library that calls the VDD to retrieve information it can use to draw the display output from a non-Windows application in a window. The display grabber calls the VDD_Get_Version service to verify that it is matched with the correct VDD. Whenever the display grabber needs access to the video memory or the video controller state, it queries the VDD. The VDD returns a data structure describing the requested memory or controller state.

The VDD_Get_Mem function is used to get the current contents of the video memory, while updating the windowed display. The VDD_Get_GrbMem function is used to get a snapshot of the entire screen in response to an ALT+PRTSCN key combination from the user in a full screen virtual machine. The VDD_Free_Mem and VDD_Free_Grab functions are used to tell the VDD that the display grabber is no longer using this memory. The VDD_Get_State and VDD_Get_GrbState functions return the current and grabbed controller states, respectively.

The VDD_Get_Mod function is used to update the windowed display incrementally. VDD_Get_Mod returns a data structure that indicates modifications to the current display. The display grabber modifies only those parts of the window that have changed and then calls the VDD_Clear_Mod function to inform the VDD that the modifications have been carried out.

To make sure that the video memory or state will not change when the display grabber is accessing the memory, the virtual machine should not run after a call to the VDD_Get_Mem or VDD_Get_Mod function. The virtual machine can continue to run only after a call to the VDD_Free_Mem or VDD_Unlock_App function.

For more information about 386 enhanced-mode display grabbers, see the Microsoft Windows Device Driver Adaptation Guide.