windows-nt/Source/XPSP1/NT/drivers/video/ms/mirror/app
2020-09-26 16:20:57 +08:00
..
htm Add source files 2020-09-26 16:20:57 +08:00
ddmlapp.rc Add source files 2020-09-26 16:20:57 +08:00
main.cxx Add source files 2020-09-26 16:20:57 +08:00
makefile Add source files 2020-09-26 16:20:57 +08:00
mirror.inf Add source files 2020-09-26 16:20:57 +08:00
mirror.reg Add source files 2020-09-26 16:20:57 +08:00
readme.htm Add source files 2020-09-26 16:20:57 +08:00
sources Add source files 2020-09-26 16:20:57 +08:00

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>To install</title>
</head>

<body>

<p>To install:<br>
<br>
1. Copy mirror.dll to %winnt%\system32, mirror.sys to %winnt%\system32\drivers</p>
<p><br>
2. These are added during .inf file installation:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sets registry values (where '#' is a 
number):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
HKLM\System\CurrentControlSet\Services\mirror<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
device#\Device Description &quot;Microsoft Mirror Driver&quot; (SZ)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
device#\Installed Display Drivers &quot;mirror&quot; (MULTI_SZ)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
device#\MirrorDriver 0x1 (DWORD)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
device#\xxx possibly other keys<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
enum\xxx keys for enumerating devices<br>
<br>
3. When invoking the mirrored driver on a mirrored device:</p>
<blockquote>
  <p><br>
  To change the settings for your mirrored device, you must know the 
  '\\.\DISPLAY#' name<br>
  associated with your mirrored display. In the case of multiple instances, '#' 
  will be<br>
  a different number. This can be found by iterating through the available 
  display devices<br>
  using EnumDisplayDevices(). For reference/testing only, this information can 
  be<br>
  found under the following key:<br>
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HKLM\Hardware\DeviceMap\Video<br>
  <br>
  To attach the mirrored device to the desktop pdev list, you must add a 
  registry value<br>
  'Attach.ToDesktop' = 0x1. Subsequent ChangeDisplaySettings() will then 
  dynamically load<br>
  the mirrored display driver for use.<br>
  <br>
  HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Services\mirror [where 'mirror' is 
  short name of mirrored surface]<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; device#\Attach.ToDesktop 
  0x1 (DWORD)<br>
  <br>
  To disable the attachment, set 'Attach.ToDesktop' to 0x0. Otherwise your 
  driver will<br>
  invoked again at boot up time. There are also other Default.Settings values 
  saved under<br>
  this key, use ChangeDisplaySettings() with dwFlags=CDS_UPDATEREGISTRY to 
  properly save<br>
  them.<br>
  <br>
  To create a DC, device managed bitmap, etc. using the mirrored surface, use 
  the<br>
  ordinary GDI APIs. To create the DC specify, use the following:<br>
  <br>
  HDC hdc = CreateDC(&quot;DISPLAY&quot;, // driver name<br>
&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; 
  deviceName, // example 'mirror' device name<br>
&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; 
  NULL,<br>
&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; 
  NULL);<br>
  <br>
  See DDK sample for a working demonstration.</p>
</blockquote>
<p><br>
Minimum requirements for barebones mirrored display driver:<br>
<br>
DrvEnableDriver [exported]<br>
DrvEnablePDEV<br>
DrvCompletePDEV<br>
DrvDisablePDEV<br>
DrvEnableSurface<br>
DrvDisableSurface<br>
DrvBitBlt<br>
DrvCopyBits<br>
DrvCreateDeviceBitmap<br>
DrvDeleteDeviceBitmap<br>
DrvTextOut<br>
<br>
Minimum requirements for barebones mirrored miniport driver:<br>
<br>
DriverEntry [exported]<br>
HwFindAdapter<br>
HwInitialize<br>
HwStartIO<br>
<br>
Since there is no physical display device associated with a mirrored surface, 
these routines<br>
can return positive results.<br>
&nbsp;</p>

</body>

</html>