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.
 
 
 
 
 
 
Shaswata Das 5c6fe3db62
Create README.md
4 years ago
..
htm commiting as it is 4 years ago
ddmlapp.rc commiting as it is 4 years ago
main.cxx commiting as it is 4 years ago
makefile commiting as it is 4 years ago
mirror.inf commiting as it is 4 years ago
mirror.reg commiting as it is 4 years ago
readme.htm commiting as it is 4 years ago
sources commiting as it is 4 years ago

readme.htm

<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>