Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
4.5 KiB

  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
  5. <meta name="ProgId" content="FrontPage.Editor.Document">
  6. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  7. <title>To install</title>
  8. </head>
  9. <body>
  10. <p>To install:<br>
  11. <br>
  12. 1. Copy mirror.dll to %winnt%\system32, mirror.sys to %winnt%\system32\drivers</p>
  13. <p><br>
  14. 2. These are added during .inf file installation:<br>
  15. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sets registry values (where '#' is a
  16. number):<br>
  17. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  18. HKLM\System\CurrentControlSet\Services\mirror<br>
  19. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  20. device#\Device Description &quot;Microsoft Mirror Driver&quot; (SZ)<br>
  21. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  22. device#\Installed Display Drivers &quot;mirror&quot; (MULTI_SZ)<br>
  23. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  24. device#\MirrorDriver 0x1 (DWORD)<br>
  25. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  26. device#\xxx possibly other keys<br>
  27. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  28. enum\xxx keys for enumerating devices<br>
  29. <br>
  30. 3. When invoking the mirrored driver on a mirrored device:</p>
  31. <blockquote>
  32. <p><br>
  33. To change the settings for your mirrored device, you must know the
  34. '\\.\DISPLAY#' name<br>
  35. associated with your mirrored display. In the case of multiple instances, '#'
  36. will be<br>
  37. a different number. This can be found by iterating through the available
  38. display devices<br>
  39. using EnumDisplayDevices(). For reference/testing only, this information can
  40. be<br>
  41. found under the following key:<br>
  42. <br>
  43. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HKLM\Hardware\DeviceMap\Video<br>
  44. <br>
  45. To attach the mirrored device to the desktop pdev list, you must add a
  46. registry value<br>
  47. 'Attach.ToDesktop' = 0x1. Subsequent ChangeDisplaySettings() will then
  48. dynamically load<br>
  49. the mirrored display driver for use.<br>
  50. <br>
  51. HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\<br>
  52. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Services\mirror [where 'mirror' is
  53. short name of mirrored surface]<br>
  54. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; device#\Attach.ToDesktop
  55. 0x1 (DWORD)<br>
  56. <br>
  57. To disable the attachment, set 'Attach.ToDesktop' to 0x0. Otherwise your
  58. driver will<br>
  59. invoked again at boot up time. There are also other Default.Settings values
  60. saved under<br>
  61. this key, use ChangeDisplaySettings() with dwFlags=CDS_UPDATEREGISTRY to
  62. properly save<br>
  63. them.<br>
  64. <br>
  65. To create a DC, device managed bitmap, etc. using the mirrored surface, use
  66. the<br>
  67. ordinary GDI APIs. To create the DC specify, use the following:<br>
  68. <br>
  69. HDC hdc = CreateDC(&quot;DISPLAY&quot;, // driver name<br>
  70. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  71. deviceName, // example 'mirror' device name<br>
  72. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  73. NULL,<br>
  74. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  75. NULL);<br>
  76. <br>
  77. See DDK sample for a working demonstration.</p>
  78. </blockquote>
  79. <p><br>
  80. Minimum requirements for barebones mirrored display driver:<br>
  81. <br>
  82. DrvEnableDriver [exported]<br>
  83. DrvEnablePDEV<br>
  84. DrvCompletePDEV<br>
  85. DrvDisablePDEV<br>
  86. DrvEnableSurface<br>
  87. DrvDisableSurface<br>
  88. DrvBitBlt<br>
  89. DrvCopyBits<br>
  90. DrvCreateDeviceBitmap<br>
  91. DrvDeleteDeviceBitmap<br>
  92. DrvTextOut<br>
  93. <br>
  94. Minimum requirements for barebones mirrored miniport driver:<br>
  95. <br>
  96. DriverEntry [exported]<br>
  97. HwFindAdapter<br>
  98. HwInitialize<br>
  99. HwStartIO<br>
  100. <br>
  101. Since there is no physical display device associated with a mirrored surface,
  102. these routines<br>
  103. can return positive results.<br>
  104. &nbsp;</p>
  105. </body>
  106. </html>