Mirror Diverwindows
A mirror driver is a display driver for a virtual device that mirrors the drawing operations of one or more additional physical display devices. It is implemented and behaves much like any other display driver; however, its paired video miniport driver is minimal in comparison to a typical miniport driver. See Mirror Driver Support in Video Miniport Drivers (Windows 2000 Model) for more information about miniport drivers in mirroring systems. The Windows Driver Kit (WDK) through the Windows 7 edition (Version 7600) contains a sample mirror driver which includes component source files that are contained in three directories.app
學習mirror driver以前,先編譯一下sampleide
1. 下載windows driver kit工具
驅動的全套開發工具,WDK,能夠在微軟的官方網站下載,下載網址:學習
該WDK適用於Windows 8如下的系統,目前在微觀官網上陳列的只有適合Windows8系統的WDK網站
https://msdn.microsoft.com/en-us/library/windows/hardware/ff557573%28v=vs.85%29.aspx
ui
並要求以Visual Studio 2013做爲開發工具。spa
2. 安裝選擇默認路徑,c:\WinDDK\ 便可component
WinDDK安裝成功後,有若干各編譯環境
個人系統是intel 64位, windows7, 因此操做以下:
開始始菜單-> windows driver kits -> wdk 7600 xxxx -> build environment -> win7 -> ia64 free build environment
3. 進入sample的路徑, 輸入 build sZ 命令進行編譯
sample下有三個文件夾,其中:
\app 下是一個關於如何使用mirror driver的例子,以及mirror driver 的inf文件。
\mini下是driver pair的miniport部分
\disp 下是driver pair的另一個部分
關於driver pair詳見:
https://msdn.microsoft.com/en-us/library/windows/hardware/hh439643%28v=vs.85%29.aspx
編譯時,須要對於每一個文件夾下的文件都進行編譯,使用編譯腳本命令build sZ,獲得對應的二進制輸出。
獲得的輸出以下:
\mini\objfre_win7_amd64\amd64\mirror.sys
\disp\objfre_win7_amd64\amd64\mirror.dll
把這兩個文件, 以及\app>mirror.inf複製到一個文件夾下。