A device extension is each miniport driver's primary and only global storage area for adapter-specific state information.
Each miniport driver defines the size, internal structure, and contents of its device extension. The video port driver passes a pointer to the device extension as an input parameter to every system-defined miniport driver function except DriverEntry and, if implemented, the HwVidSynchronizeExecutionCallback and SvgaHwIoPortXxx functions. Many VideoPortXxx functions require this pointer as an argument as well.
The miniport driver must also use the device extension to maintain the state information for a single adapter. Each adapter detected by the system will have separate state information maintained in a separate device extension. The miniport driver must not use global variables to store any per-adapter state. This is especially critical in order to provide seamless multiple monitor support.