Remove obsolete readme.htm files

This commit is contained in:
Barry Golden 2015-08-06 20:06:07 -07:00
Родитель bd17fd844b
Коммит 9026073a41
42 изменённых файлов: 0 добавлений и 25277 удалений

Просмотреть файл

@ -1,458 +0,0 @@
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="avshws_files/filelist.xml">
<title>AVSHwS</title>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>130</w:Zoom>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:\5B8B\4F53;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-format:other;
mso-font-pitch:variable;
mso-font-signature:1 135135232 16 0 262144 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"\@SimSun";
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
h2
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman";
font-weight:bold;}
h3
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman";
font-weight:bold;}
h4
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman";
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";}
ins
{mso-style-type:export-only;
text-decoration:none;}
span.msoIns
{mso-style-type:export-only;
mso-style-name:"";
text-decoration:underline;
text-underline:single;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:53240075;
mso-list-template-ids:2131904850;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l1
{mso-list-id:966544645;
mso-list-template-ids:-673255552;}
@list l1:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l1:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
</head>
<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
<div class=Section1>
<h2><span class=SpellE><span style='font-family:Verdana'>AVSHwS</span></span><span
style='font-family:Verdana'>: <span class=SpellE>AVStream</span> Simulated
Hardware Sample Driver <o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>SUMMARY<o:p></o:p></span></h3>
<p><a name="OLE_LINK1"></a><a name="OLE_LINK2"><span style='mso-bookmark:OLE_LINK1'><span
style='font-size:10.0pt;font-family:Verdana'>The </span></span></a><span
class=SpellE><span style='mso-bookmark:OLE_LINK2'><span style='mso-bookmark:
OLE_LINK1'><span style='font-size:10.0pt;font-family:Verdana'>AVSHwS</span></span></span></span><span
style='mso-bookmark:OLE_LINK2'><span style='mso-bookmark:OLE_LINK1'><span
style='font-size:10.0pt;font-family:Verdana'> sample provides a pin-centric <span
class=SpellE>AVStream</span> capture driver for a simulated piece of hardware. The
driver performs captures at 320x240 in either an RGB24 or YUV422 format via
direct DMA into capture buffers. The purpose of the sample is to demonstrate
how to write a pin-centric <span class=SpellE>AVStream</span> <span
class=SpellE>minidriver</span>. The sample also shows how to implement DMA by
using the related functionality provided by <span class=SpellE>AVStream</span>.<span
style='mso-spacerun:yes'>  </span><o:p></o:p></span></span></span></p>
<p><span style='mso-bookmark:OLE_LINK2'><span style='mso-bookmark:OLE_LINK1'><span
style='font-size:10.0pt;font-family:Verdana'>This sample features enhanced
parameter validation and overflow detection.<o:p></o:p></span></span></span></p>
<span style='mso-bookmark:OLE_LINK1'></span><span style='mso-bookmark:OLE_LINK2'></span>
<h3><span style='font-family:Verdana'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p>Build the sample by typing <span style='mso-bidi-font-weight:bold'>build -<span
class=SpellE>c<span class=msoIns><ins cite="mailto:Sathya%20"
datetime="2006-02-20T10:01">ez</ins></span></span></span> in either the standard
checked or free WDK build environment. A successful build produces <span
class=SpellE><span style='mso-bidi-font-style:italic'>AVSHwS.sys</span></span><span
style='mso-bidi-font-style:italic'>.</span> <span style='font-size:10.0pt;
font-family:Verdana'><o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The sample works on
32-bit x86 and 64-bit amd64 platforms running Vista Beta 2 or higher, Windows XP
SP2, Windows Server 2003 SP1 and Windows 2000 (If DirectX 8 or higher is
installed on the system)<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Installation
instructions:<o:p></o:p></span></p>
<ul type=disc>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Copy </span><span class=SpellE>AVSHwS<span
style='font-size:10.0pt;font-family:Verdana'>.sys</span></span><span
style='font-size:10.0pt;font-family:Verdana'> and </span><span
class=SpellE>AVSHwS<span style='font-size:10.0pt;font-family:Verdana'>.INF</span></span><span
style='font-size:10.0pt;font-family:Verdana'> to a directory <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Open “Add Hardware” wizard from Control Panel <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Select &quot;Install the hardware that I manually
select from a list (Advanced)&quot; <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>When you see &quot;What type of hardware do you want
to install&quot;, select Sound, Video, and Game Controllers<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Select &quot;Have Disk...&quot; <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Browse to &quot; </span><span class=SpellE>AVSHwS<span
style='font-size:10.0pt;font-family:Verdana'>.INF</span></span><span
style='font-size:10.0pt;font-family:Verdana'> &quot;<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Follow the on screen instructions</span> <span
style='font-size:10.0pt;font-family:Verdana'><o:p></o:p></span></li>
</ul>
<h3>PROGRAMMING TOUR<span style='font-family:Verdana'><o:p></o:p></span></h3>
<p><span class=SpellE><b><span style='font-size:10.0pt;font-family:Verdana'>DriverEntry</span></b></span><span
style='font-size:10.0pt;font-family:Verdana'> in <span class=SpellE><i>device.cpp</i></span>
is the initial point of entry. This routine passes control to <span
class=SpellE>AVStream</span> through a call to <span class=SpellE><b>KsInitializeDriver</b></span>.
In this call, the <span class=SpellE>minidriver</span> passes the device
descriptor, an <span class=SpellE>AVStream</span> structure that recursively
defines the <span class=SpellE>AVStream</span> object hierarchy for a driver.
This is common behavior for an <span class=SpellE>AVStream</span> <span
class=SpellE>minidriver</span>. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>At device start time (see
the <span class=SpellE><b>CcaptureDevice::PnpStart</b></span> method in <span
class=SpellE><i>device.cpp</i></span>), a simulated piece of capture hardware
is created (the <span class=SpellE>ChardwareSimulation</span> class)<span
class=GramE>,</span> a DMA adapter is acquired from the operating system and is
registered with <span class=SpellE>AVStream</span> through a call to <span
class=SpellE><b>KsDeviceRegisterAdapterObject</b></span>. This call is required
for a sample that performs DMA directly into the capture buffers, instead of
using DMA to write to a common buffer. In <span class=SpellE>PnPStart</span>
the driver creates the KS Filter for this device dynamically by calling </span><span
class=SpellE><span style='font-family:"Courier New"'>KsCreateFilterFactory</span></span><span
style='font-size:10.0pt;font-family:Verdana'>.<o:p></o:p></span></p>
<p><span class=SpellE><i><span style='font-size:10.0pt;font-family:Verdana'>Filter.cpp</span></i></span><span
style='font-size:10.0pt;font-family:Verdana'> is where the sample lays out the
KSPIN_DESCRIPTOR_EX structure for the single capture pin. In addition, a
KSFILTER_DISPATCH structure and a KSFILTER_DESCRIPTOR structure are provided in
this source file. The filter dispatch provides only a create dispatch, a
routine that is included in <span class=SpellE><i>Filter.cpp</i></span>. The
process dispatch is provided on the pin, since this is a pin-centric sample.<span
class=msoIns><ins cite="mailto:Sathya%20" datetime="2005-11-04T16:16"> </ins></span><o:p></o:p></span></p>
<p><span class=SpellE><i><span style='font-size:10.0pt;font-family:Verdana'>Capture.cpp</span></i></span><span
style='font-size:10.0pt;font-family:Verdana'> contains source for the video
capture pin on the capture filter. This is where the KSPIN_DISPATCH structure
for the unique pin is provided. This dispatch structure specifies a Process
callback routine, also defined in this source file. This routine is where
stream pointer manipulation and cloning occurs.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The process callback is
one of two routines of interest in <span class=SpellE><i>Capture.cpp</i></span>
that demonstrate how to do DMA transfers using <span class=SpellE>AVStream</span>
functionality. The other is <span class=SpellE><b>CCapturePin::CompleteMappings</b></span>.
These two methods show how to use the queue, obtain clone pointers, use
scatter/gather lists, and perform other DMA-related tasks.<o:p></o:p></span></p>
<p><span class=SpellE><i><span style='font-size:10.0pt;font-family:Verdana'>Hwsim.cpp</span></i></span><span
style='font-size:10.0pt;font-family:Verdana'> contains the hardware simulation
code and also code that fills the scatter/gather mappings. This source file
includes the Start, Pause and Stop methods for the hardware simulation class (<span
class=SpellE>CHardwaresimulation</span>). Image synthesis and overlay code is
also here. The supplied objects provide image synthesis (pixel, color-bar,
etc...) to RGB24 and UYVY buffers as well as software string overlay into these
buffers. The <span class=SpellE><i>Image.cpp</i></span> file, including data,
must exist in locked segments. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>See comments in all .<span
class=SpellE>cpp</span> files. Also see complete <span class=SpellE>AVStream</span>
documentation in the WDK documentation. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>RUNNING THE SAMPLE<o:p></o:p></span></h3>
<p><span class=GramE><span style='font-size:10.0pt;font-family:Verdana'>Once
installation is complete, access the driver through the <span class=SpellE>graphedt</span>
tool.</span></span><span style='font-size:10.0pt;font-family:Verdana'> <i>Graphedt.exe</i>
is available in the <i>Tools</i> directory of the WDK. In the <span
class=SpellE>Graphedt</span> application, click the Graph menu and select
Insert Filters. The sample appears under &quot;WDM Streaming Capture
Devices&quot; as &quot;<span class=SpellE>avshws</span> Source.&quot; Click
Insert Filter and the sample appears in the graph as a single filter <span
class=SpellE>labelled</span> <span class=GramE>as ”</span><span class=SpellE>avshws</span>
Source”. There is one output pin which is the video capture pin. It sends out
video in YUY2 format. Attach this filter to either a DirectShow Video <span
class=SpellE>Renderer</span> or the VMR default video <span class=SpellE>renderer</span>
and click Play. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The output produced by
the sample is a 320x240 image of standard EIA-189-A color bars. In the middle
of the image near the bottom, a clock appears over the image. This clock
displays the elapsed time since the graph was introduced into the run state
following the last stop. The clock shows MINUTES<span class=GramE>:SECONDS.HUNDREDTHS</span>.
<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>In the top left corner of
the image, a counter counts the number of frames that have been dropped since
the graph was introduced into the run state after the last stop. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>COMMENTS<o:p></o:p></span></h3>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'>For more
information on <span class=SpellE>AVStream</span>, see the WDK documentation. <o:p></o:p></span></p>
<h3><span lang=FR style='font-family:Verdana;mso-ansi-language:FR'>CODE TOUR<o:p></o:p></span></h3>
<h4><span lang=FR style='font-family:Verdana;mso-ansi-language:FR'>File
Manifest<o:p></o:p></span></h4>
<pre><u><span lang=FR style='mso-ansi-language:FR'>File</span></u><span
lang=FR style='mso-ansi-language:FR'><span style='mso-tab-count:2'>           </span><u>Description<o:p></o:p></u></span></pre><pre><span
lang=FR style='mso-ansi-language:FR'><o:p>&nbsp;</o:p></span></pre><pre>AVSHwS.htm<span
style='mso-tab-count:1'>     </span>The Sample Tour documentation for this sample (this file).</pre><pre><span
class=GramE>Sources<span style='mso-tab-count:2'>        </span>The generic file for building the code sample.</span></pre><pre><span
class=SpellE>AVSHwS.inf</span><span style='mso-tab-count:1'>     </span>A sample installation file.</pre><pre><span
class=SpellE>AVSHwS.h</span><span style='mso-tab-count:1'>       </span>The main <span
class=GramE>header file</span> for the sample.</pre><pre><span class=SpellE><span
class=GramE>device.cpp</span></span><span style='mso-tab-count:1'>     </span><span
class=SpellE>DriverEntry</span>, Plug and Play handling, initialization, device level code.</pre><pre><span
class=SpellE><span class=GramE>device.h</span></span><span style='mso-tab-count:
1'>       </span>Header file for above.</pre><pre><span class=SpellE><span
class=GramE>filter.cpp</span></span><span style='mso-tab-count:1'>     </span>Filter level code for the capture filter.</pre><pre><span
class=SpellE><span class=GramE>filter.h</span></span><span style='mso-tab-count:
1'>       </span>Header file for above.</pre><pre><span class=SpellE><span
class=GramE>capture.cpp</span></span><span style='mso-tab-count:1'>    </span>Pin level code for the capture pin, DMA handling.</pre><pre><span
class=SpellE><span class=GramE>capture.h</span></span><span style='mso-tab-count:
1'>      </span>Header file for above.</pre><pre><span class=SpellE><span
class=GramE>hwsim.cpp</span></span><span style='mso-tab-count:1'>      </span>Hardware simulation code, filling scatter/gather mappings, etc.</pre><pre><span
class=SpellE><span class=GramE>hwsim.h</span></span><span style='mso-tab-count:
2'>        </span>Header file for above.</pre><pre><span class=SpellE><span
class=GramE>image.cpp</span></span><span class=GramE><span style='mso-tab-count:
1'>      </span>RGB24 and UYVY image synthesis and overlay code.</span></pre><pre><span
class=SpellE><span class=GramE>image.h</span></span><span style='mso-tab-count:
2'>        </span>Header file for above.</pre><pre><span class=SpellE><span
class=GramE>purecall.c</span></span><span style='mso-tab-count:1'>     </span><span
class=SpellE>P<span style='mso-fareast-font-family:SimSun;mso-no-proof:yes'>urecall</span></span><span
style='mso-fareast-font-family:SimSun;mso-no-proof:yes'> stub for virtual function usage</span></pre><pre><span
class=SpellE>AVSHwS.rc</span><span style='mso-tab-count:1'>      </span>Resource <span
class=GramE>file</span> mainly for version.</pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-padding-alt:0in 5.4pt 0in 5.4pt'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><span style='font-size:2.0pt;mso-bidi-font-size:12.0pt'><o:p>&nbsp;</o:p></span></p>
</td>
</tr>
</table>
<pre><o:p>&nbsp;</o:p></pre>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>©
2004- 2006 Microsoft Corporation<span style='font-size:10.0pt;font-family:Verdana'>
</span><span style='font-size:10.0pt;font-family:Verdana;mso-bidi-font-family:
"Courier New"'><o:p></o:p></span></p>
<pre><o:p>&nbsp;</o:p></pre>
<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='mso-bidi-font-size:10.0pt'><o:p>&nbsp;</o:p></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,297 +0,0 @@
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="avssamp_files/filelist.xml">
<title>Avssamp</title>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
h2
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman";
font-weight:bold;}
h3
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman";
font-weight:bold;}
h4
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman";
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
</head>
<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
<div class=Section1>
<h2><span class=SpellE><span style='font-family:Verdana'>Avssamp</span></span><span
style='font-family:Verdana'>: Sample Filter-Centric <span class=SpellE>AVStream</span>
Simulated Capture Driver <o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>SUMMARY<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>The <span class=SpellE>Avssamp</span>
sample provides a filter-centric <span class=SpellE>AVStream</span> capture
driver with functional audio. The driver performs captures at 320x240 in either
an RGB24 or YUV422 format while playing a user-provided PCM wave audio file in
a loop. The purpose of the sample is to demonstrate how to write a
filter-centric <span class=SpellE>AVStream</span> <span class=SpellE>minidriver</span>.
This sample was significantly redesigned for the Microsoft® Windows Server
2003® DDK. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>Build the sample by
typing <b>build -<span class=SpellE><span class=GramE>zc</span></span></b> in
either the standard checked or free build environment. A successful build
produces <span class=SpellE><i>avssamp.sys</i></span><i>.</i> To install the
driver, right click on <span class=SpellE><i>avssamp.inf</i></span> and select
Install. When prompted for <span class=SpellE><i>avssamp.sys</i></span>, select
the built binary.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The sample works on x86
platforms and builds correctly using Microsoft® Visual C® 6.0. The driver uses
Plug and Play. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>This sample runs on
Microsoft® Windows XP®, and Windows Server 2003® or any platform Windows 98®
gold or beyond, including Windows 2000<span class=GramE>®, that</span> has
DirectX 8.0 or beyond installed.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>PROGRAMMING TOUR<o:p></o:p></span></h3>
<p><span class=SpellE><b><span style='font-size:10.0pt;font-family:Verdana'>DriverEntry</span></b></span><span
style='font-size:10.0pt;font-family:Verdana'> in <span class=SpellE><i>avssamp.cpp</i></span>
is the initial point of entry. This routine passes control to <span
class=SpellE>AVStream</span> through a call to <span class=SpellE><b>KsInitializeDriver</b></span>.
In this call, the <span class=SpellE>minidriver</span> passes the device
descriptor, an <span class=SpellE>AVStream</span> structure that recursively
defines the <span class=SpellE>AVStream</span> object hierarchy for a driver.
This is common behavior for an <span class=SpellE>AVStream</span> <span
class=SpellE>minidriver</span>. <o:p></o:p></span></p>
<p><span class=SpellE><i><span style='font-size:10.0pt;font-family:Verdana'>Filter.cpp</span></i></span><span
style='font-size:10.0pt;font-family:Verdana'> is where the sample lays out the
KSPIN_DESCRIPTOR_EX structure for the single video pin. <span class=SpellE><i>Audio.cpp</i></span>
contains the KSPIN_DESCRIPTOR_EX structure for the audio capture pin. This pin
is dynamically created only if <i>c:\avssamp.wav</i> exists and is a valid and
readable PCM format wave file. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The filter dispatch
structure in <span class=SpellE><i>filter.cpp</i></span> provides dispatches to
create and process. The <span class=SpellE><b>DispatchProcess</b></span> method
is defined inline in <span class=SpellE><i>filter.h</i></span>. It calls the <b>Process</b>
method in <span class=SpellE><i>filter.cpp</i></span> in the context of the <span
class=SpellE>CCaptureFilter</span>. Note that the process dispatch is provided
in KSFILTER_DISPATCH since this sample is filter-centric.<o:p></o:p></span></p>
<p><span class=SpellE><i><span style='font-size:10.0pt;font-family:Verdana'>Audio.cpp</span></i></span><span
style='font-size:10.0pt;font-family:Verdana'> lays out a KSPIN_DISPATCH
structure which contains the dispatch table for the audio pin. Note that the
Process member of this structure is NULL since the sample is filter-centric.
Similarly, <span class=SpellE><i>video.cpp</i></span> contains the pin dispatch
structure for the video capture pin, again with the Process member set to NULL.
<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>See comments in all .<span
class=SpellE>cpp</span> files. Also see complete <span class=SpellE>AVStream</span>
documentation in the DDK documentation. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>RUNNING THE SAMPLE<o:p></o:p></span></h3>
<p><span class=GramE><span style='font-size:10.0pt;font-family:Verdana'>Once
installation is complete, access the driver using the <span class=SpellE>Graphedt</span>
tool.</span></span><span style='font-size:10.0pt;font-family:Verdana'> <i>Graphedt.exe</i>
is available under the <i>Tools\<span class=SpellE>AVStream</span></i>
directory of the DDK. In the <span class=SpellE>Graphedt</span> application,
click the Graph menu and select Insert Filters. The sample appears under
&quot;WDM Streaming Capture Devices&quot; as &quot;<span class=SpellE>avssamp</span>
Source.&quot; Click Insert Filter and the sample <span class=GramE>appears</span>
in the graph as a single filter <span class=SpellE>labelled</span> as <span
class=SpellE>avssamp</span> Source. Attach this filter to either a DirectShow
Video <span class=SpellE>Renderer</span> or the VMR default video <span
class=SpellE>renderer</span> and click Play. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>To play audio, before
inserting the <span class=SpellE>avssamp</span> filter, make sure that a valid
PCM wave file exists at <i>c:\avssamp.wav</i>. Then insert the <span
class=SpellE>avssamp</span> filter. If a valid file exists at this location,
the <span class=SpellE>avssamp</span> filter will appear with an audio capture
pin. Connect the video pin to the DirectShow Smart Tee filter and connect the
Tee's preview pin as described for video above (note that this is only
necessary for synchronized preview -- not capture). Attach the audio pin to a
Default <span class=SpellE>Waveout</span> Device filter from the Audio <span
class=SpellE>Renderer</span> list. Click play. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The output produced by
the sample is a 320x240 image of standard EIA-189-A color bars. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>COMMENTS<o:p></o:p></span></h3>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'>For more
information on <span class=SpellE>AVStream</span>, see the DDK documentation. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><u>File</u><span style='mso-tab-count:2'>           </span><u>Description<o:p></o:p></u></pre><pre><o:p>&nbsp;</o:p></pre><pre><span
class=SpellE><span class=GramE>audio.cpp</span></span><span style='mso-tab-count:
1'>      </span>Audio capture pin implementation.</pre><pre><span class=SpellE><span
class=GramE>audio.h</span></span><span style='mso-tab-count:2'>        </span>Audio capture pin header.</pre><pre><span
class=SpellE><span class=GramE>avssamp.cpp</span></span><span style='mso-tab-count:
1'>    </span>The main file for the filter-centric sample.</pre><pre><span
class=SpellE><span class=GramE>avssamp.h</span></span><span style='mso-tab-count:
1'>      </span>The main header file for the sample.</pre><pre><span
class=GramE>avssamp.htm</span><span style='mso-tab-count:1'>    </span>The Sample Tour documentation for this sample (this file).</pre><pre><span
class=SpellE><span class=GramE>avssamp.inf</span></span><span style='mso-tab-count:
1'>    </span>A sample installation file.</pre><pre><span class=SpellE><span
class=GramE>avssamp.rc</span></span><span style='mso-tab-count:1'>     </span>Resource file mainly for version.</pre><pre><span
class=SpellE><span class=GramE>capture.cpp</span></span><span style='mso-tab-count:
1'>    </span>The capture pin implementation for all capture pins on the sample filter.</pre><pre><span
class=SpellE><span class=GramE>capture.h</span></span><span style='mso-tab-count:
1'>      </span>The capture pin header for all capture pins on the sample filter.</pre><pre><span
class=SpellE><span class=GramE>filter.cpp</span></span><span style='mso-tab-count:
1'>     </span>The capture filter implementation (including frame synthesis) for the fake capture filter.</pre><pre><span
class=SpellE><span class=GramE>filter.h</span></span><span style='mso-tab-count:
1'>       </span>Header for the capture filter implementation for the fake capture filter.</pre><pre><span
class=SpellE><span class=GramE>image.cpp</span></span><span style='mso-tab-count:
1'>      </span>Image synthesis and overlay code. See comments in file.</pre><pre><span
class=SpellE><span class=GramE>image.h</span></span><span style='mso-tab-count:
2'>        </span>Image synthesis and overlay header.</pre><pre><span
class=GramE>Sources<span style='mso-tab-count:2'>        </span>The generic file for building the code sample.</span></pre><pre><span
class=SpellE><span class=GramE>video.cpp</span></span><span style='mso-tab-count:
1'>      </span>Video capture pin implementation.</pre><pre><span class=SpellE><span
class=GramE>video.h</span></span><span style='mso-tab-count:2'>        </span>Video capture pin header.</pre><pre><span
class=SpellE><span class=GramE>wave.cpp</span></span><span style='mso-tab-count:
1'>       </span>Wave object implementation.</pre><pre><span class=SpellE><span
class=GramE>wave.h</span></span><span style='mso-tab-count:2'>         </span>Wave object header.</pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><span style='font-size:2.0pt;mso-bidi-font-size:12.0pt'><o:p>&nbsp;</o:p></span></p>
</td>
</tr>
</table>
<pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif";mso-bidi-font-family:"Courier New"'>©
2004 Microsoft Corporation</span><span style='font-size:10.0pt;font-family:
Verdana;mso-bidi-font-family:"Courier New"'> <o:p></o:p></span></p>
<pre><o:p>&nbsp;</o:p></pre></div>
</body>
</html>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,741 +0,0 @@
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 12">
<meta name=Originator content="Microsoft Word 12">
<link rel=File-List href="sdma_files/filelist.xml">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:RemovePersonalInformation/>
<o:RemoveDateAndTime/>
</o:OfficeDocumentSettings>
</xml><![endif]-->
<link rel=themeData href="sdma_files/themedata.thmx">
<link rel=colorSchemeMapping href="sdma_files/colorschememapping.xml">
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:TrackMoves>false</w:TrackMoves>
<w:TrackFormatting/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:DontVertAlignCellWithSp/>
<w:DontBreakConstrainedForcedTables/>
<w:DontVertAlignInTxbx/>
<w:Word11KerningPairs/>
<w:CachedColBalance/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="&#45;-"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-pitch:variable;
mso-font-signature:-1610611985 1107304683 0 0 159 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-1593833729 1073750107 16 0 415 0;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;
mso-font-charset:0;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:-1610611985 1073750091 0 0 159 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;}
h2
{mso-style-priority:9;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"Heading 2 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;
font-weight:bold;}
h3
{mso-style-priority:9;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"Heading 3 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;
font-weight:bold;}
h4
{mso-style-priority:9;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"Heading 4 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;
font-weight:bold;}
p.MsoHeader, li.MsoHeader, div.MsoHeader
{mso-style-noshow:yes;
mso-style-priority:99;
mso-style-link:"Header Char";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:center 3.25in right 6.5in;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;}
p.MsoFooter, li.MsoFooter, div.MsoFooter
{mso-style-noshow:yes;
mso-style-priority:99;
mso-style-link:"Footer Char";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:center 3.25in right 6.5in;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;}
a:link, span.MsoHyperlink
{mso-style-noshow:yes;
mso-style-priority:99;
color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-noshow:yes;
mso-style-priority:99;
color:purple;
text-decoration:underline;
text-underline:single;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;}
span.Heading2Char
{mso-style-name:"Heading 2 Char";
mso-style-noshow:yes;
mso-style-priority:9;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 2";
mso-ansi-font-size:13.0pt;
mso-bidi-font-size:13.0pt;
font-family:"Cambria","serif";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;}
span.Heading3Char
{mso-style-name:"Heading 3 Char";
mso-style-noshow:yes;
mso-style-priority:9;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 3";
mso-ansi-font-size:12.0pt;
mso-bidi-font-size:12.0pt;
font-family:"Cambria","serif";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;}
span.Heading4Char
{mso-style-name:"Heading 4 Char";
mso-style-noshow:yes;
mso-style-priority:9;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 4";
mso-ansi-font-size:12.0pt;
mso-bidi-font-size:12.0pt;
font-family:"Cambria","serif";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;
font-style:italic;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
mso-ascii-font-family:Consolas;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Consolas;
color:black;}
span.HeaderChar
{mso-style-name:"Header Char";
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:Header;
mso-ansi-font-size:12.0pt;
mso-bidi-font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;}
span.FooterChar
{mso-style-name:"Footer Char";
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:Footer;
mso-ansi-font-size:12.0pt;
mso-bidi-font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
font-size:10.0pt;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;}
/* Page Definitions */
@page
{mso-footnote-separator:url("sdma_files/header.htm") fs;
mso-footnote-continuation-separator:url("sdma_files/header.htm") fcs;
mso-endnote-separator:url("sdma_files/header.htm") es;
mso-endnote-continuation-separator:url("sdma_files/header.htm") ecs;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-even-header:url("sdma_files/header.htm") eh1;
mso-header:url("sdma_files/header.htm") h1;
mso-even-footer:url("sdma_files/header.htm") ef1;
mso-footer:url("sdma_files/header.htm") f1;
mso-first-header:url("sdma_files/header.htm") fh1;
mso-first-footer:url("sdma_files/header.htm") ff1;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
</style>
<![endif]-->
<meta name=Template content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="4098"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple style='tab-interval:.5in'
leftmargin=8>
<div class=Section1>
<h2><a name=MYSAMPLE><span style='font-family:"Verdana","sans-serif";
mso-fareast-font-family:"Times New Roman"'>SDMA</span></a><span
style='font-family:"Verdana","sans-serif";mso-fareast-font-family:"Times New Roman"'>
<o:p></o:p></span></h2>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>SUMMARY<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>This
sample demonstrates the usage of V3 System DMA. It shows how a driver
could use a system DMA controller supported by Windows to
write data to a hardware location using DMA.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>The sample
consists of a legacy device driver and a Win32 console mode test application.
The test application opens a handle to the device exposed by the driver and makes
a DeviceIoControl call to initiate the example system DMA. To understand how
the V3 system DMA calls are invoked please study SDmaWrite() in SDma.c.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>This
driver will work on Windows 2000 and later operating systems.<o:p></o:p></span></p>
<p><b><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>This
sample driver is not a PnP driver. This is a minimal driver meant to
demonstrate an OS feature. Neither it nor its sample programs are intended for
use in a production environment. Rather, they are intended for educational
purposes and as a skeleton driver.</span></b><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'><o:p></o:p></span></p>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Click the
Free Build Environment or Checked Build Environment icon under Development Kits
program group to set basic environment variables. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Change to
the directory containing the sample source code, such as CD Src\General\sdma\wdm.
<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Run build
-ceZ, or use the macro BLD. This command invokes the Microsoft make routines to
build the components. If the build succeeds, you will find the driver,
sdma.sys, and the test application, SystemDmaApp.exe, in the binary output
directory specified for the build environment. You can get the output path from
the buildxxx.log file (for example, buildfre_win7_arm.log). If the build fails
you can find errors and warnings in the buildxxx.err and buildxxx.wrn respectively,
where xxx is either chk or fre depending on the build environment. <o:p></o:p></span></p>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>TESTING<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>To test
this driver, copy the test app, SystemDmaApp.exe, and the driver to the same
directory, and run the application. The application will automatically load the
driver if it's not already loaded and interact with the driver. When you exit
the app, the driver will be stopped, unloaded and removed. Because no system DMA
controller exists for Windows which uses the advertised DRQ, the sample driver
will not proceed any further than failing to acquire a system DMA adapter.<o:p></o:p></span></p>
<h3><span style='mso-fareast-font-family:"Times New Roman"'>CODE TOUR</span><span
style='font-family:"Verdana","sans-serif";mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h3>
<h4><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>File Manifest<o:p></o:p></span></h4>
<pre><u>File<span style='mso-tab-count:2'>           </span>Description<o:p></o:p></u></pre><pre><o:p>&nbsp;</o:p></pre><pre>SystemDma.htm<span
style='mso-tab-count:1'>  </span>Sample Tour documentation for this sample (this file).<o:p></o:p></pre><pre>Sources<span
style='mso-tab-count:2'>        </span>Generic file that lists source files and all the build options.<o:p></o:p></pre><pre>SDma.c<span
style='mso-tab-count:1'>        </span>Source file of the sample driver.<o:p></o:p></pre><pre>SDma.h<span
style='mso-tab-count:1'>        </span>Header file for defining ioctls; included by driver and the test application.<o:p></o:p></pre><pre>Testapp.c<span
style='mso-tab-count:1'>      </span>Source file of the test application. Contains routines to send one IOCTL to the driver.<o:p></o:p></pre><pre>Install.c<span
style='mso-tab-count:1'>      </span>Source file of the test application. Contains routines to load and unload the driver.<o:p></o:p></pre><pre>SDma.rc<span
style='mso-tab-count:1'>       </span>Resource file that specifies information such as file type, version, etc.<o:p></o:p></pre><pre>Makefile<span
style='mso-tab-count:1'>       </span>This file merely indirects to the real makefile that is shared by all the driver components of the Windows NT DDK.<o:p></o:p></pre><pre> <o:p></o:p></pre>
<p align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
href="#top"><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Top
of page</span></a><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>
<o:p></o:p></span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-yfti-tbllook:1184;mso-padding-alt:
0in 5.4pt 0in 5.4pt'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'></td>
</tr>
</table>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif","serif"'>© 1998 Microsoft
Corporation</span><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>
<o:p></o:p></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,302 +0,0 @@
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="cancel_files/filelist.xml">
<title>CANCEL</title>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>BestFit</w:Zoom>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
h2
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman";
font-weight:bold;}
h3
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman";
font-weight:bold;}
h4
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman";
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
<meta name=Template content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="3074"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple style='tab-interval:.5in'
leftmargin=8>
<div class=Section1>
<h2><a name=MYSAMPLE><span style='font-family:Verdana'>CANCEL</span></a><span
style='font-family:Verdana'> <o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>SUMMARY<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>This sample demonstrates
the use of <span class=GramE>new <span style='mso-spacerun:yes'> </span>cancel</span>-safe
queue (<span class=SpellE>IoCsqInitialize</span>, <span class=SpellE>IoCsqInsertIrp</span>,
<span class=SpellE>IoCsqRemoveIrp</span>, <span class=SpellE>IoCsqRemoveNextIrp</span>)
APIs introduced on Windows XP for queuing <span class=SpellE>IRPs</span> in the
driver's internal device queue. By using these APIs, driver writers do not have
to worry about any IRP cancellation race condition issues. A common problem
with cancellation of <span class=SpellE>IRPs</span> in a driver is
synchronization between the cancel lock <span class=GramE>or</span> the <span
class=SpellE>InterlockedExchange</span> in the I/O Manager with the driver's
queue lock. These APIs abstract the cancel logic while allowing the driver to
implement the queue and associated synchronization. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The sample is accompanied
by a simple multithreaded Win32 console application to stress-test the driver's
cancel and cleanup routines.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>This driver is written
for <span class=GramE>an</span> hypothetical data acquisition device that
requires polling at a regular interval. The device has some settling period
between two reads. Upon user request the driver reads data and records the
time. When the next read request comes in, it checks the interval to see if
it's reading the device too soon. If so, it <span class=SpellE>pends</span> the
IRP and sleeps for a while and tries again. Upon arrival, <span class=SpellE>IRPs</span>
are queued in a cancel-safe queue and a semaphore is signaled. A polling thread
waiting indefinitely on the semaphore wakes up to the signal and processes <span
class=GramE>queued</span> <span class=SpellE>IRPs</span> sequentially. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>This sample is adapted
from the original cancel sample
(http://support.microsoft.com/support/kb/articles/Q188/2/76.asp) written for
NT4.0. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The building and
installation instructions given here apply to Windows® 2000 and later operating systems.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>This sample driver is not
a PnP driver. This is a minimal driver meant to demonstrate an OS feature.
Neither it nor its sample programs are intended for use in a production
environment. Rather, they are intended for educational purposes and as a
skeleton driver. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>Click the Free Build
Environment or Checked Build Environment icon under Development Kits program
group to set basic environment variables. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Change to the directory
containing the device source code, such as CD <span class=SpellE>Src</span>\General\Cancel.
<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Run <b>build -<span
class=SpellE>ceZ</span>,</b> or use the macro <b>BLD</b>. This command invokes
the Microsoft make routines to build the components. If the build </span>s<span
style='font-size:10.0pt;font-family:Verdana'>ucceeds, you will find the driver,
<span class=SpellE>cancel.sys</span>, and the test application, canclapp.exe,
in the binary output directory specified for the build environment. You can get the output path from the buildxxx.log file. If it fails you can find errors and warnings in the <span class=SpellE>buildxxx.err</span>
and <span class=SpellE>buildxxx.err</span> respectively, where xxx is either <span
class=SpellE>chk</span> or <span class=SpellE>fre</span> depending on the build
environment. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>STARTIO IMPLEMENTATION<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>In the <span
class=SpellE>startio</span> directory is another version of the sample driver
that shows how to use <span class=GramE>the <span
style='mso-spacerun:yes'> </span>cancel</span>-safe queues to implement IO
queuing functionality similar to the <span class=SpellE>IoStartPacket/IoStartNextPacket</span>
APIs. The same test application works with this driver as well.</span><span
style='font-family:Verdana'><o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>TESTING<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>To test this driver, run
Testapp.exe, a simple Win32 multithreaded console mode application. The driver
will be automatically loaded and started. When you exit the app, the driver
will stopped and removed.<o:p></o:p></span></p>
<p><span class=SpellE><span style='font-size:10.0pt;font-family:Verdana'>Usage<span
class=GramE>:testapp</span></span></span><span style='font-size:10.0pt;
font-family:Verdana'> (<span class=SpellE>NumberOfThreads</span>)<o:p></o:p></span></p>
<p><b><span style='font-size:10.0pt;font-family:Verdana'>Note</span></b><span
style='font-size:10.0pt;font-family:Verdana'>: <span class=SpellE>NumberOfThreads</span>
is limited to a maximum of 10 threads; the default value if run without the option
is 1. The main thread waits for user input. If you press Q, the application
exits gracefully; otherwise it exits the process abruptly forcing all the
threads to be terminated and all pending I/Os to be canceled. Other threads
perform I/O asynchronously in a loop. After every overlapped read, the thread
goes into an <span class=SpellE>alertable</span> sleep and wakes as soon as
completion routines is executed, when the read IRP gets completed by the
driver. You should run multiple instances of the application to stress test the
driver.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><u>File<span style='mso-tab-count:2'>           </span>Description<o:p></o:p></u></pre><pre><o:p>&nbsp;</o:p></pre><pre><span
class=GramE>Cancel.htm<span style='mso-tab-count:1'>     </span>Documentation for this sample (this file).</span></pre><pre><span
class=SpellE>Cancel.c</span><span style='mso-tab-count:1'>       </span>Source <span
class=GramE>file</span> of the sample driver.</pre><pre><span class=GramE>Sources<span
style='mso-tab-count:2'>        </span>Generic file that lists source files and all the build options.</span></pre><pre><span
class=SpellE>Testapp.c</span><span style='mso-tab-count:1'>      </span>Source <span
class=GramE>file</span> of the test application.</pre><pre><span class=SpellE>Install.c</span><span
style='mso-tab-count:1'>      </span>Contains functions to load/start/stop/remove the driver.</pre><pre><span
class=SpellE>Testapp.h</span><span style='mso-tab-count:1'>      </span>Header <span
class=GramE>file</span> for common definitions and function prototypes.</pre><pre><span
class=SpellE>Cancel.rc</span><span style='mso-tab-count:1'>      </span>Resource file that specify information such as file type, version, etc.</pre><pre><span
class=SpellE>Makefile</span><span style='mso-tab-count:1'>       </span><span
class=GramE>This file</span> merely <span class=SpellE>indirects</span> to the real <span
class=SpellE>makefile</span> that is shared by all the driver components of the Windows NT DDK.</pre>
<p align=center style='text-align:center'><a href="#top"><span
style='font-size:10.0pt;font-family:Verdana'>Top of page</span></a><span
style='font-size:10.0pt;font-family:Verdana'> <o:p></o:p></span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-padding-alt:0in 5.4pt 0in 5.4pt'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><span style='color:black'><o:p>&nbsp;</o:p></span></p>
</td>
</tr>
</table>
<p><span style='font-size:7.5pt;font-family:"MS Sans Serif"'>© 2004 Microsoft
Corporation</span><span style='font-size:10.0pt;font-family:Verdana'> <span
style='color:black'><o:p></o:p></span></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,229 +0,0 @@
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=Generator content="Microsoft Word 12 (filtered)">
<title>EVENT</title>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";
color:black;}
h2
{mso-style-link:"Heading 2 Char";
margin-right:0in;
margin-left:0in;
font-size:18.0pt;
font-family:"Times New Roman","serif";
color:black;
font-weight:bold;}
h3
{mso-style-link:"Heading 3 Char";
margin-right:0in;
margin-left:0in;
font-size:13.5pt;
font-family:"Times New Roman","serif";
color:black;
font-weight:bold;}
h4
{mso-style-link:"Heading 4 Char";
margin-right:0in;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";
color:black;
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p
{margin-right:0in;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";
color:black;}
pre
{mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
span.Heading2Char
{mso-style-name:"Heading 2 Char";
mso-style-link:"Heading 2";
font-family:"Cambria","serif";
color:#4F81BD;
font-weight:bold;}
span.Heading3Char
{mso-style-name:"Heading 3 Char";
mso-style-link:"Heading 3";
font-family:"Cambria","serif";
color:#4F81BD;
font-weight:bold;}
span.Heading4Char
{mso-style-name:"Heading 4 Char";
mso-style-link:"Heading 4";
font-family:"Cambria","serif";
color:#4F81BD;
font-weight:bold;
font-style:italic;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
.MsoChpDefault
{font-size:10.0pt;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<meta name=Template content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple leftmargin=8>
<div class=Section1>
<h2><a name=MYSAMPLE><span style='font-family:"Verdana","sans-serif"'>EVENT</span></a><span
style='font-family:"Verdana","sans-serif"'> </span></h2>
<h3><span style='font-family:"Verdana","sans-serif"'>SUMMARY</span></h3>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>This
sample demonstrates two different ways a Windows NT kernel-mode driver can
notify an application about a hardware event. One is event based method and the
other is an IRP based method. Since the sample driver is not talking to any
real hardware, it uses a timer DPC to simulate hardware events. The test
application informs the driver whether it wants to be notified by signaling an
event or by completing the pending IRP and also gives a relative time at which
the DPC timer has to fire. </span></p>
<p><b><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Event
based approach:</span></b><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>
The application creates an event using CreateEvent(). It then passes the event
handle to the driver in a private ioctl IOCTL_REGISTER_EVENT. Since the driver
is a monolithic toplevel driver, its IRP dispatch routines run in the
application process context and as a result the event handle is still valid in
the driver. The driver dereferences the user-mode handle into system space
&amp; saves the event object pointer for later use and queues a custom timer
DPC. When the DPC fires, the driver signals the event via KeSetEvent() at
DISPATCH_LEVEL and deletes the references to the event object. You can't use
this approach if your driver is not a monolithic - toplevel driver, because you
can't guarantee the process context in a multi-level driver stack if you are
not at the top.</span></p>
<p><b><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Pending
IRP based approach:</span></b><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>
The application make a synchronous ioctl(IOCTL_REGISTER_EVENT) request. The
driver marks the device I/O control IRP pending and queues a timer DPC and
returns STATUS_PENDING. When the timer fires to indicate a hardware event, the
driver completes the pending IRP to notify the application about the hardware
event. </span></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>There are
two advantages of this method over the event based approach. One is that you
can send a message to the application along with your notification and other
one is that the driver routines don't have to be in the context of the process
that made the request. The application can do a synchronous or asynchronous
(overlapped) ioctl to the driver. </span></p>
<p><b><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>This
sample driver is not a PnP driver. This is a minimal driver meant to
demonstrate an OS feature. Neither it nor its sample programs are intended for
use in a production environment. Rather, they are intended for educational
purposes and as a skeleton driver.</span></b></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>This driver
will work on Windows NT 4.0, Windows 2000 and later operating systems.</span></p>
<h3><span style='font-family:"Verdana","sans-serif"'>BUILDING THE SAMPLE</span></h3>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Click the
Free Build Environment or Checked Build Environment icon under Development Kits
program group to set basic environment variables. </span></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Change to
the directory containing the device source code, such as CD Src\General\Event. </span></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Run <b>build
-ceZ,</b> or use the macro <b>BLD</b>. This command invokes the Microsoft make
routines to build the components. If the build succeeds, you will find the
driver, event.sys, and the test application, event.exe, in the binary output directory specified for the build environment. You can get the output path from the buildxxx.log file. If the build
fails you can find errors and warnings in the buildxxx.err and buildxxx.err
respectively, where xxx is eithr chk or fre depending on the build environment.
</span></p>
<h3><span style='font-family:"Verdana","sans-serif"'>TESTING</span></h3>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>To test
this driver, copy the test app, event.exe, and the driver to the same
directory, and run the application. The application will automatically load the
driver if it's not already loaded and interact with the driver. When you exit
the app, the driver will be stopped, unloaded and removed. </span></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>c:\&gt;Event.exe
DELAY </span><0/1></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>where
DELAY equals the time to delay the Event signal in seconds.</span></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Specify O
for IRP based notification and 1 for event based notification.</span></p>
<h3><span style='font-family:"Verdana","sans-serif"'>CODE TOUR</span></h3>
<h4><span style='font-family:"Verdana","sans-serif"'>File Manifest</span></h4>
<pre><u>File           Description</u></pre><pre>&nbsp;</pre><pre>&nbsp;</pre><pre>Event.htm      Documentation for the sample (this file)</pre><pre>&nbsp;</pre><pre>Exe\Sources    Generic file for building the test app</pre><pre>Exe\Eventtest.c Simple console test application</pre><pre>Exe\install.c  Code for registering and starting the driver service</pre><pre>&nbsp;</pre><pre>Wdm\Sources    Generic file for building the driver</pre><pre>Wdm\Event.h    Header file private to the driver</pre><pre>Wdm\public.h   Common header file between app and driver</pre><pre>Wdm\Event.c    Main driver file</pre><pre>Wdm\Event.rc   Driver resource file</pre><pre>&nbsp;</pre>
<p align=center style='text-align:center'><span style='font-size:10.0pt;
font-family:"Courier New"'><a href="#top"><span style='font-family:"Verdana","sans-serif"'>Top
of page</span></a></span><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>
</span></p>
<pre>&nbsp;</pre>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in'>
<tr style='height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'></td>
</tr>
</table>
<pre>&nbsp;</pre><pre>&nbsp;</pre>
<p><span style='font-size:7.5pt;font-family:"MS Sans Serif","serif"'>© 1998
Microsoft Corporation</span><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>
</span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,742 +0,0 @@
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 12">
<meta name=Originator content="Microsoft Word 12">
<link rel=File-List href="ioctl_files/filelist.xml">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:RemovePersonalInformation/>
<o:RemoveDateAndTime/>
</o:OfficeDocumentSettings>
</xml><![endif]-->
<link rel=themeData href="ioctl_files/themedata.thmx">
<link rel=colorSchemeMapping href="ioctl_files/colorschememapping.xml">
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:TrackMoves>false</w:TrackMoves>
<w:TrackFormatting/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:DontVertAlignCellWithSp/>
<w:DontBreakConstrainedForcedTables/>
<w:DontVertAlignInTxbx/>
<w:Word11KerningPairs/>
<w:CachedColBalance/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="&#45;-"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-pitch:variable;
mso-font-signature:-1610611985 1107304683 0 0 159 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-1593833729 1073750107 16 0 415 0;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;
mso-font-charset:0;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:-1610611985 1073750091 0 0 159 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;}
h2
{mso-style-priority:9;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"Heading 2 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;
font-weight:bold;}
h3
{mso-style-priority:9;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"Heading 3 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;
font-weight:bold;}
h4
{mso-style-priority:9;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"Heading 4 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;
font-weight:bold;}
p.MsoHeader, li.MsoHeader, div.MsoHeader
{mso-style-noshow:yes;
mso-style-priority:99;
mso-style-link:"Header Char";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:center 3.25in right 6.5in;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;}
p.MsoFooter, li.MsoFooter, div.MsoFooter
{mso-style-noshow:yes;
mso-style-priority:99;
mso-style-link:"Footer Char";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:center 3.25in right 6.5in;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;}
a:link, span.MsoHyperlink
{mso-style-noshow:yes;
mso-style-priority:99;
color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-noshow:yes;
mso-style-priority:99;
color:purple;
text-decoration:underline;
text-underline:single;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;}
span.Heading2Char
{mso-style-name:"Heading 2 Char";
mso-style-noshow:yes;
mso-style-priority:9;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 2";
mso-ansi-font-size:13.0pt;
mso-bidi-font-size:13.0pt;
font-family:"Cambria","serif";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;}
span.Heading3Char
{mso-style-name:"Heading 3 Char";
mso-style-noshow:yes;
mso-style-priority:9;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 3";
mso-ansi-font-size:12.0pt;
mso-bidi-font-size:12.0pt;
font-family:"Cambria","serif";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;}
span.Heading4Char
{mso-style-name:"Heading 4 Char";
mso-style-noshow:yes;
mso-style-priority:9;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 4";
mso-ansi-font-size:12.0pt;
mso-bidi-font-size:12.0pt;
font-family:"Cambria","serif";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;
font-style:italic;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
mso-ascii-font-family:Consolas;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Consolas;
color:black;}
span.HeaderChar
{mso-style-name:"Header Char";
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:Header;
mso-ansi-font-size:12.0pt;
mso-bidi-font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;}
span.FooterChar
{mso-style-name:"Footer Char";
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:Footer;
mso-ansi-font-size:12.0pt;
mso-bidi-font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
font-size:10.0pt;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;}
/* Page Definitions */
@page
{mso-footnote-separator:url("ioctl_files/header.htm") fs;
mso-footnote-continuation-separator:url("ioctl_files/header.htm") fcs;
mso-endnote-separator:url("ioctl_files/header.htm") es;
mso-endnote-continuation-separator:url("ioctl_files/header.htm") ecs;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-even-header:url("ioctl_files/header.htm") eh1;
mso-header:url("ioctl_files/header.htm") h1;
mso-even-footer:url("ioctl_files/header.htm") ef1;
mso-footer:url("ioctl_files/header.htm") f1;
mso-first-header:url("ioctl_files/header.htm") fh1;
mso-first-footer:url("ioctl_files/header.htm") ff1;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
</style>
<![endif]-->
<meta name=Template content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="4098"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple style='tab-interval:.5in'
leftmargin=8>
<div class=Section1>
<h2><a name=MYSAMPLE><span style='font-family:"Verdana","sans-serif";
mso-fareast-font-family:"Times New Roman"'>IOCTL</span></a><span
style='font-family:"Verdana","sans-serif";mso-fareast-font-family:"Times New Roman"'>
<o:p></o:p></span></h2>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>SUMMARY<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>This
sample demonstrates the usage of four different types of IOCTLs
(METHOD_IN_DIRECT, METHOD_OUT_DIRECT, METHOD_NEITHER, and METHOD_BUFFERED)
supported by Windows, and how the user input &amp; output buffer specified in
the DeviceControl function is handled by the I/O subsystem and the driver in
each case.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>The sample
consists of a legacy device driver and a Win32 console mode test application.
The test application opens a handle to the device exposed by the driver and makes
all four different DeviceIoControl calls one after another. To understand how
the IRP fields are set the I/O manager, you should run the checked build version
of the driver and see the debug output.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>This
driver will work on Windows 2000 and later operating systems.<o:p></o:p></span></p>
<p><b><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>This
sample driver is not a PnP driver. This is a minimal driver meant to
demonstrate an OS feature. Neither it nor its sample programs are intended for
use in a production environment. Rather, they are intended for educational
purposes and as a skeleton driver.</span></b><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'><o:p></o:p></span></p>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Click the
Free Build Environment or Checked Build Environment icon under Development Kits
program group to set basic environment variables. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Change to
the directory containing the sample source code, such as CD Src\General\ioctl\wdm.
<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Run build
-ceZ, or use the macro BLD. This command invokes the Microsoft make routines to
build the components. If the build succeeds, you will find the driver,
sioctl.sys, and the test application, ioctlapp.exe, in the binary output
directory specified for the build environment. You can get the output path from
the buildxxx.log file (for example, buildfre_win7_x86.log). If the build fails
you can find errors and warnings in the buildxxx.err and buildxxx.wrn respectively,
where xxx is either chk or fre depending on the build environment. <o:p></o:p></span></p>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>TESTING<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>To test
this driver, copy the test app, ioctlapp.exe, and the driver to the same
directory, and run the application. The application will automatically load the
driver if it's not already loaded and interact with the driver. When you exit
the app, the driver will be stopped, unloaded and removed. <o:p></o:p></span></p>
<h3><span style='mso-fareast-font-family:"Times New Roman"'>CODE TOUR</span><span
style='font-family:"Verdana","sans-serif";mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h3>
<h4><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>File Manifest<o:p></o:p></span></h4>
<pre><u>File<span style='mso-tab-count:2'>           </span>Description<o:p></o:p></u></pre><pre><o:p>&nbsp;</o:p></pre><pre>Ioctl.htm<span
style='mso-tab-count:1'>      </span>Sample Tour documentation for this sample (this file).<o:p></o:p></pre><pre>Sources<span
style='mso-tab-count:2'>        </span>Generic file that lists source files and all the build options.<o:p></o:p></pre><pre>Sioctl.c<span
style='mso-tab-count:1'>       </span>Source file of the sample driver.<o:p></o:p></pre><pre>Sioctl.h<span
style='mso-tab-count:1'>       </span>Header file for defining ioctls; included by driver and the test application.<o:p></o:p></pre><pre>Testapp.c<span
style='mso-tab-count:1'>      </span>Source file of the test application. Contains routines to send IOCTLs to the driver.<o:p></o:p></pre><pre>Install.c<span
style='mso-tab-count:1'>      </span>Source file of the test application. Contains routines to load and unload the driver.<o:p></o:p></pre><pre>Sioctl.rc<span
style='mso-tab-count:1'>      </span>Resource file that specifies information such as file type, version, etc.<o:p></o:p></pre><pre>Makefile<span
style='mso-tab-count:1'>       </span>This file merely indirects to the real makefile that is shared by all the driver components of the Windows NT DDK.<o:p></o:p></pre><pre> <o:p></o:p></pre>
<p align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
href="#top"><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Top
of page</span></a><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>
<o:p></o:p></span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-yfti-tbllook:1184;mso-padding-alt:
0in 5.4pt 0in 5.4pt'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'></td>
</tr>
</table>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif","serif"'>© 1998 Microsoft
Corporation</span><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>
<o:p></o:p></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,757 +0,0 @@
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 14">
<meta name=Originator content="Microsoft Word 14">
<link rel=File-List href="kcs_files/filelist.xml">
<title>Sample Name</title>
<link rel=themeData href="kcs_files/themedata.thmx">
<link rel=colorSchemeMapping href="kcs_files/colorschememapping.xml">
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>104</w:Zoom>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:TrackMoves>false</w:TrackMoves>
<w:TrackFormatting/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SplitPgBreakAndParaMark/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="&#45;-"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="false"
DefSemiHidden="false" DefQFormat="false" LatentStyleCount="267">
<w:LsdException Locked="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
QFormat="true" Name="caption"/>
<w:LsdException Locked="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="99" Name="No List"/>
<w:LsdException Locked="false" Priority="99" SemiHidden="true"
Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" Priority="99" SemiHidden="true" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" QFormat="true"
Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" QFormat="true"
Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" QFormat="true"
Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" QFormat="true"
Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" QFormat="true"
Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" QFormat="true"
Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" SemiHidden="true"
UnhideWhenUsed="true" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:\5B8B\4F53;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 680460288 22 0 262145 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-pitch:variable;
mso-font-signature:-536870145 1107305727 0 0 415 0;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-520081665 -1073717157 41 0 66047 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-1593833729 1073750107 16 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 680460288 22 0 262145 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";}
h1
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"Heading 1 Char";
mso-style-next:Normal;
margin-top:12.0pt;
margin-right:0in;
margin-bottom:3.0pt;
margin-left:0in;
mso-pagination:widow-orphan;
page-break-after:avoid;
mso-outline-level:1;
font-size:16.0pt;
font-family:"Arial","sans-serif";
mso-fareast-font-family:SimSun;
mso-fareast-theme-font:minor-fareast;
mso-font-kerning:16.0pt;
font-weight:bold;}
h2
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"Heading 2 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:SimSun;
mso-fareast-theme-font:minor-fareast;
font-weight:bold;}
h3
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"Heading 3 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:SimSun;
mso-fareast-theme-font:minor-fareast;
font-weight:bold;}
p.MsoCommentText, li.MsoCommentText, div.MsoCommentText
{mso-style-noshow:yes;
mso-style-unhide:no;
mso-style-link:"Comment Text Char";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";}
span.MsoCommentReference
{mso-style-noshow:yes;
mso-style-unhide:no;
mso-ansi-font-size:8.0pt;
mso-bidi-font-size:8.0pt;}
a:link, span.MsoHyperlink
{mso-style-unhide:no;
color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-unhide:no;
color:blue;
text-decoration:underline;
text-underline:single;}
p
{mso-style-unhide:no;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";}
p.MsoCommentSubject, li.MsoCommentSubject, div.MsoCommentSubject
{mso-style-noshow:yes;
mso-style-unhide:no;
mso-style-parent:"Comment Text";
mso-style-link:"Comment Subject Char";
mso-style-next:"Comment Text";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
font-weight:bold;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-noshow:yes;
mso-style-unhide:no;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-fareast-font-family:"Times New Roman";}
span.Heading1Char
{mso-style-name:"Heading 1 Char";
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 1";
mso-ansi-font-size:14.0pt;
mso-bidi-font-size:14.0pt;
font-family:"Cambria","serif";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:SimSun;
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#365F91;
mso-themecolor:accent1;
mso-themeshade:191;
font-weight:bold;}
span.Heading2Char
{mso-style-name:"Heading 2 Char";
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 2";
mso-ansi-font-size:13.0pt;
mso-bidi-font-size:13.0pt;
font-family:"Cambria","serif";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:SimSun;
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;}
span.Heading3Char
{mso-style-name:"Heading 3 Char";
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 3";
mso-ansi-font-size:12.0pt;
mso-bidi-font-size:12.0pt;
font-family:"Cambria","serif";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:SimSun;
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;}
span.CommentTextChar
{mso-style-name:"Comment Text Char";
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Comment Text";}
span.CommentSubjectChar
{mso-style-name:"Comment Subject Char";
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-parent:"Comment Text Char";
mso-style-link:"Comment Subject";
font-weight:bold;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Balloon Text";
mso-ansi-font-size:8.0pt;
mso-bidi-font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-ascii-font-family:Tahoma;
mso-hansi-font-family:Tahoma;
mso-bidi-font-family:Tahoma;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
font-size:10.0pt;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:572357372;
mso-list-template-ids:266362772;}
@list l0:level1
{mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1
{mso-list-id:1790778369;
mso-list-template-ids:266362772;}
@list l1:level1
{mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
<div class=WordSection1>
<h2><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>Kernel Counter Sample (<span class=SpellE>Kcs</span>)<o:p></o:p></span></h2>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>SUMMARY<o:p></o:p></span></h3>
<p class=MsoNormal><span class=SpellE><span class=GramE>kcs</span></span> is a
sample to demonstrate the use of kernel mode <span class=SpellE>perflib</span>
API. The driver does not control any hardware; it simple provides counters. The
code contains comments to explain what each function does. </p>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>USING THE SAMPLE<o:p></o:p></span></h3>
<p class=MsoNormal>To test the <span class=SpellE>Kcs</span> counter provider,
use the following procedure.</p>
<ol start=1 type=1>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo1;tab-stops:list .5in'>Copy<i style='mso-bidi-font-style:
normal'> kcs.sys </i>and<i style='mso-bidi-font-style:normal'> <span
class=SpellE>kcs.man</span> </i>files in <span class=GramE>%<span
class=SpellE>windir</span>%\system32 <span class=SpellE>dir</span>, and <span
class=SpellE><i style='mso-bidi-font-style:normal'>kcs.sys.mui</i></span><i
style='mso-bidi-font-style:normal'> </i>in %<span class=SpellE>windir</span>%\system32\en-US</span>
<span class=SpellE>dir</span> if <span class=SpellE><i style='mso-bidi-font-style:
normal'>kcs.sys.mui</i></span><i style='mso-bidi-font-style:normal'> </i>was
generated. <br style='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo1;tab-stops:list .5in'>Sign the sample driver. For
details about how to sign the driver, see &quot;SIGNNING THE SAMPLE
DRIVER&quot; section. <br style='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo1;tab-stops:list .5in'>Install the counters.</li>
</ol>
<p class=MsoNormal style='margin-left:1.0in'><span style='font-size:10.0pt;
font-family:"Courier New"'>lodctr.exe /<span class=SpellE>m<span class=GramE>:kcs.man</span></span><o:p></o:p></span></p>
<ol start=4 type=1>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo1;tab-stops:list .5in'>Create a service to control
the driver.</li>
</ol>
<p class=MsoNormal style='margin-left:1.0in'><span class=SpellE><span
class=GramE><span style='font-size:10.0pt;font-family:"Courier New"'>sc</span></span></span><span
style='font-size:10.0pt;font-family:"Courier New"'> create <span class=SpellE>kcs</span>
<span class=SpellE>binpath</span>= %<span class=SpellE>windir</span>%\system32\kcs.sys
type= kernel start= demand<o:p></o:p></span></p>
<ol start=5 type=1>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo1;tab-stops:list .5in'>Start the service</li>
</ol>
<p class=MsoNormal style='margin-left:1.0in'><span class=GramE><span
style='font-size:10.0pt;font-family:"Courier New"'>net</span></span><span
style='font-size:10.0pt;font-family:"Courier New"'> start <span class=SpellE>kcs</span><o:p></o:p></span></p>
<ol start=6 type=1>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo1;tab-stops:list .5in'>Run <span class=SpellE>perfmon</span>
and add Geometric Wave and <span class=SpellE>Trignometric</span> Wave
Counter Sets</li>
</ol>
<p class=MsoNormal style='margin-left:1.0in'><span style='font-size:10.0pt;
font-family:"Courier New"'>perfmon.exe<o:p></o:p></span></p>
<ol start=7 type=1>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo1;tab-stops:list .5in'>To stop the service, run</li>
</ol>
<p class=MsoNormal style='margin-left:1.0in'><span class=GramE><span
style='font-size:10.0pt;font-family:"Courier New"'>net</span></span><span
style='font-size:10.0pt;font-family:"Courier New"'> stop <span class=SpellE>kcs</span><o:p></o:p></span></p>
<ol start=8 type=1>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo1;tab-stops:list .5in'>To un-install the counters,
run</li>
</ol>
<p class=MsoNormal style='margin-left:1.0in'><span style='font-size:10.0pt;
font-family:"Courier New"'>unlodctr.exe /<span class=SpellE>m<span class=GramE>:kcs.man</span></span><o:p></o:p></span></p>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>BUILD THE SAMPLE<o:p></o:p></span></h3>
<p class=MsoNormal>To get the simple driver (kcs.sys), use the following
procedure.</p>
<ol start=1 type=1>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo2;tab-stops:list .5in'>Click <span class=SpellE>kcs.vcxproj</span>
to open the sample.</li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo2;tab-stops:list .5in'>Right click project, select
Properties, <span class=SpellE>goto</span> Linker -&gt; Manifest File, <span
class=GramE>make</span> sure &quot;<span style='mso-fareast-font-family:
SimSun'>Generate Manifest</span>&quot; is &quot;No&quot;.</li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo2;tab-stops:list .5in'>Build the project.</li>
<ol start=1 type=1>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l0 level2 lfo2;tab-stops:list 1.0in'>You can press &quot;F7&quot;
or choose Build-&gt;Build Solution.</li>
</ol>
</ol>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>LIMITATIONS<o:p></o:p></span></h3>
<p class=MsoNormal>This sample driver should not be used in a production
environment. </p>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
<p class=MsoNormal><span class=SpellE>Kcs</span> is designed for Windows&nbsp;7
and later versions of Windows. </p>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>FILE LIST<o:p></o:p></span></h3>
<p class=MsoNormal><span class=SpellE>kcs.h</span></p>
<p class=MsoNormal><span class=SpellE><span class=GramE>makefile</span></span></p>
<p class=MsoNormal><span class=GramE>sources</span></p>
<p class=MsoNormal><span class=SpellE>kcs.c</span></p>
<p class=MsoNormal><span class=SpellE>kcs.rc</span></p>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>LOCATION<o:p></o:p></span></h3>
<p class=MsoNormal>The files that comprise <span class=SpellE>Kcs</span> are
included in the Windows DDK in the \<span class=SpellE>src</span>\general\<span
class=SpellE>perfcounters</span>\<span class=SpellE>kcs</span> directory.</p>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'><o:p>&nbsp;</o:p></span></h3>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>FEEDBACK<o:p></o:p></span></h3>
<p align=center style='text-align:center'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'><a href="kcs.htm#top">Top of page</a> <o:p></o:p></span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-yfti-tbllook:1184;mso-padding-alt:
0in 5.4pt 0in 5.4pt'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><span style='font-size:2.0pt;mso-bidi-font-size:12.0pt'><o:p>&nbsp;</o:p></span></p>
</td>
</tr>
</table>
<p><span style='font-size:7.5pt;font-family:"MS Sans Serif","serif"'>©
Microsoft Corporation</span><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>
<o:p></o:p></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,186 +0,0 @@
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-
1252">
<META NAME="Generator" CONTENT="Microsoft Word 97">
<TITLE>Toaster Installation Package</TITLE>
</HEAD>
<BODY LINK="#0000ff">
<FONT FACE="Verdana" SIZE=5><H2>Toaster Installation Package</H2>
</FONT><FONT FACE="Verdana" SIZE=2>
<H3>SUMMARY</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
This document discusses the different approaches that end users take when adding new hardware to their computer, and describes an approach that addresses these scenarios in a consistent, robust manner that works cooperatively with Plug and Play in Windows 2000 and Windows XP. It also outlines the mechanisms provided to facilitate additional vendor requirements such as the installation of value-added software.
<H3>INTRODUCTION</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
The installation of software to support an instance of a given device (known as "device installation" or "driver installation") is done in a device-centric fashion in Windows operating systems. A device INF that matches up with one of the device's hardware or compatible IDs is used to identify the required driver file(s), registry modifications, etc., that are needed to make the device fully operational. This INF, along with the files copied thereby and a catalog that contains the digital signatures of the INF and these other files, constitute what is known as a "driver package".
<p>
Because device installation is done for a specific instance of a device, the "natural" method of adding devices to a computer running a Plug and Play operating system is by plugging in the device first, letting Plug and Play find the device and automatically initiate an installation for that device. The device installation may then proceed using a driver package supplied with the OS, or a "3rd-party" driver package (supplied via CD-ROM, the Internet, or some other distribution mechanism). When the device installation is initiated by the addition of hardware, this is termed a "hardware-first" device
installation.
<p>
Users may, however, take an alternate approach to adding hardware to their computer. In this scenario, they first run a setup program (perhaps launched as an autorun application when the vendor-supplied CD-ROM is inserted). This setup program may perform installation activities, and then prompt the user to insert their hardware. Upon the hardware's insertion, the vendor-supplied driver package (which was "pre-installed" by the setup program) is then found by Plug and Play, and the installation proceeds as in the hardware-first scenario. When the device installation is initiated by running a setup program, this is termed a "software-first" device installation. This approach to adding new hardware is just as valid as the hardware-first scenario, and some vendors may even instruct their users (via documentation that ships with the hardware) that this is the preferred method.
<p>
Vendors must support the hardware-first scenario (by providing a driver package that may be supplied to the "Found New Hardware" wizard with no
"pre-configuration" performed by a setup program or other mechanism). Vendors may optionally support the software-first scenario as well, but the
actual installation of the device instance is done by Plug and Play upon the device's arrival, as described above.
<p>
Vendors may also wish to perform additional activities as part of the device installation. For example, the vendor may want to allow the user to optionally install one or more applications that ship with the device (e.g., a scanner that ships with an image processing application). Such software is termed "value-added software". Value-added software is distinct from the files that comprise the driver package because, unlike the core driver files, the device does not require value-added software to function properly. In the previous example of a scanner, for instance, perhaps the user already has an image processing application that they prefer. The user should be given the option of whether or not they want to install any value-added software. Additional activities (such as allowing the user to select value-added software offerings) may be accomplished by using a vendor-supplied
device-specific co-installer.
<H3>INTRODUCTION TO THE TOASTER INSTALLATION SAMPLE</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
This sample contains <B>inf, toastapp, toastcd, toastco, </B> and<B> toastva</B> directories. The following summary describes the directories and key files.
<P>
<I>inf</I>
<BLOCKQUOTE>
This directory contains the device INF (<B>toastpkg.inf</B>) that is used in device installation of toaster devices enumerated by the toaster bus enumerator. It registers a device-specific co-installer (<B>tostrco2.dll</B>) that provides additional functionality during the installation.
<p>
Also contained in this directory is the <B>autorun.inf</B> file that would be placed in the root of the vendor's setup media (e.g., CD-ROM). This INF will launch the <B>toastva.exe</B> application (described below) when the media is inserted in an autorun-capable drive, or when the user double-clicks on the drive icon in Explorer. Additionally, this INF illustrates the [DeviceInstall] section that is a new feature introduced in Windows XP for
autorun INF files:
<BLOCKQUOTE>
<p>
[DeviceInstall]
<p>
DriverPath=\
</BLOCKQUOTE>
<p>
The DriverPath entry in a [DeviceInstall] section indicates to the Found New Hardware and Update Driver wizards that Plug and Play should search for
device INFs in the specified directory only. This provides a performance improvement for media layouts that contain many subdirectories, since the default
behavior is for Plug and Play to recursively search the entire CD. Additionally, specifying no DriverPath entry in this section indicates that the CD contains no drivers, thus Plug and Play can quickly determine that it can ignore this media. Absence of the [DeviceInstall] section will cause the media to be treated as it was in previous versions of Windows (e.g., as in Windows Me and Windows 2000, the entire media will be searched recursively for applicable INFs).
</BLOCKQUOTE>
<I>toastapp</I> <BLOCKQUOTE>
This directory contains the source code for the <B>toastapp.exe</B> program that is used as value-added software that may optionally be installed by the user as part of device installation. This program is installed via the InstallShield(tm) (Microsoft Installer-based) setup program in the <I>toastcd\ToastApp</I> directory.
</BLOCKQUOTE>
<I>toastcd</I> <BLOCKQUOTE>
This directory contains the CD image that would be used by the vendor to distribute the toaster package. In the root of the image, we have the
<B>autorun.inf</B> which launches either the x86 or ia64 version of <B>toastva.exe</B> (depending on platform). Also in the root we have the device INF,
<B>toastpkg.inf</B>, and the two associated catalogs, <B>tostx86.cat</B> and <B>tostia64.cat</B>, for the x86 and ia64 platforms respectively. Finally,
in the root we also have the zero-length tag file <B>toastpkg.tag</B>, which is used to identify the media in case it must be prompted for. This tagfile is
referenced in the <I>SourceDisksNames</I> sections of <B>toastpkg.inf</B>:
<BLOCKQUOTE>
<p>
[SourceDisksNames.x86]
<p>
1 = %DiskId1%, toastpkg.tag,,\i386
<p>
[SourceDisksNames.ia64]
<p>
1 = %DiskId1%, toastpkg.tag,,\ia64
</BLOCKQUOTE>
<p>
The i386 and ia64 subdirectories contain the driver files that, along with the INF and CAT, constitute the driver package. These files are
<B>toaster.sys</B>, <B>tostrcls.dll</B>, and <B>tostrco2.dll</B>. Their corresponding debug (.PDB) files are located there as well, although
these arent installed. Additionally, as mentioned above, the <B>toastva.exe</B> program (and its .PDB file) is located here. Note that this
is not part of the driver package—it is merely used to facilitate software-first installation. Since this executable is not part of the driver
package, it may be modified without affecting the digital signature of the package.
<p>
Finally, the <I>ToastApp</I> subdirectory contains the <B>setup.exe</B> program that installs the value-added software package, <B>toastapp.exe</B>. This
<B>setup.exe</B> is a standalone package that contains the files it installs within this single binary. This is meant to represent an example of the kind
of software that might be supplied to a vendor by an ISV for distribution with that vendor's hardware. While this particular setup program was authored
with InstallShield(tm), other installation methods are equally valid. For example, the setup program could have been written using C/C++, directly
leveraging the Microsoft Installer (MSI) application programming interfaces (API).
<p>
The <B>tostrco2.dll</B> module is constructed so that there is no requirement on how the value-added software is installed--it simply creates a process to initiate the setup program, then waits for that process to terminate before continuing. For the sample, the description of the value-added software offerings and details of launching the value-added setup application are hard-coded, but in a real-world scenario, the value-added software supplied might be listed in some sort of data file (perhaps an INF file) and the value-added software selection page would be completely data driven, using the information contained in that data file. This would be advantageous, for example, because a vendor could submit just their core driver package for Windows Logo testing without any value-added software (and without this data file). The vendor could then construct setup media containing the core driver package plus value-added software as they see fit. The contents of their setup media could be modified at any time by adding or removing value-added software, and no changes to the core driver package would be required (hence, no need to re-submit for Windows Logo testing). This works because the data file containing details about the
value-added software offerings isn't a part of the driver package, and thus can be changed without affecting that package. A co-installer DLL written
to accommodate such a scheme could have default behavior that would not display the value-added software selection page in the absence of this data file.
</BLOCKQUOTE>
<I>toastco</I> <BLOCKQUOTE>
This directory contains the co-installer, <B>tostrco2.dll</B>, which is used during device installation of toaster devices enumerated by the toaster bus enumerator. This co-installer supplies a finish-install wizard page that allows the user to select the value-added software, if any, that they wish to install. It does not supply a finish-install wizard page if the user has previously responded to the wizard page (whether or not they opted to install value-added software) so that the user isn't prompted multiple times in the case where they plug in multiple toasters (or the same toaster is plugged into multiple ports, which will appear to Plug and Play as different instances of that device).
<p>
This DLL also supplies the same value-added software selection page for use by the <B>toastva.exe</B> setup program. This avoids code duplication and ensures a consistent user experience for the hardware-first and software-first scenarios.
<p>
Finally, this co-installer performs the same function as its version 1 counterpart (in the <I>coinstaller</I> directory under the main toaster directory). It provides a friendly name for the device that incorporates its serial number. However, this version retrieves the friendly name template from the INF, and since the template is stored in the [Strings] section, it may be localized for other languages.
<p>
The reason this co-installers filename includes version number is to illustrate the technique that must be used when updating the driver for a device that may already have a previous version of the co-installer installed. If the name is not changed, then the old co-installer will be loaded early-on during the processing of DIF codes, and the updated version wont be able to “get in the loop” to perform its new actions when installing the device. Thus, co-installers should include a version number in their filename, so that the new version can be copied and can participate in the device installation.
</BLOCKQUOTE>
<I>toastva</I> <BLOCKQUOTE>
This directory contains the autorun installation application, <B>toastva.exe</B>, which is launched when the user inserts the vendor-provided CD-ROM. This application is used to "pre-install" the necessary INF and catalog, along with any value-added software the user chooses. In addition, it uses the <B>UpdateDriverForPlugAndPlayDevices</B> API to update the existing installed drivers for any toasters that may already be present. Examples of scenarios where this would apply are:
<OL>
<LI>
The user previously plugged in a toaster, and there was no in-box support (i.e., no supporting driver was included with Windows) for it. The user didn't supply a vendor provided driver package at that time (perhaps because they didn't have the media), so no driver was installed for the device (this is sometimes referred to as a "null driver install").
<LI>
The user previously plugged in a toaster, and there was in-box support for it (perhaps using an older or reduced-functionality driver).
<LI>
The user previously plugged in a toaster, and at that time supplied an older version of the driver provided by the vendor.
</UL>
<P>
In all the above cases, the <B>UpdateDriverForPlugAndPlayDevices</B> API will seek out any toaster device instances matching the specified hardware or compatible ID, and determine whether the specified driver package is "better" (i.e., lower rank or newer). If so, the device instance will be updated with the specified driver package.
</BLOCKQUOTE>
<H3>BUILDING THE SAMPLE</H3></FONT><FONT FACE="Verdana"
SIZE=2><P>
To build the Toaster Installation Sample components, you must first set up the DDK environment on your host machine. The “Installation and Release Notes”
topic in the Windows XP DDK has a complete description on how to do this.
<P>
Run the build –cZ command in the <I>toastpkg</I> directory to build <B>tostrco2.dll</B>, <B>toastapp.exe</B>, and <B>toastva.exe</B>. Run the build –cZ
command in the <I>classinstaller</I> and <I>func</I> subdirectories of the main <I>Toaster</I> directory (parent of the <I>toastpkg</I> directory) to build
<B>tostrcls.dll</B> and <B>toaster.sys</B>. The <I>toastcd</I> directory contains all these components already built with full debugging information. The
reason is so that the sample could be digitally signed (thus exactly reproducing the ideal user experience).
<P>
To experiment with certain behaviors of this package (e.g., <B>toastva.exe</B> launched via CD autorun), it is necessary to copy the entire contents of the <I>toastcd</I> tree onto a writeable CD.
<P>
<H3>RUNNING THE SAMPLE</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
The sample can be run in two different ways, corresponding to the hardware-first and software-first scenarios.
<P>
<B>Hardware-First Device Installation Walk-Through</B>
<P>
Simulate the plugging in of a toaster by typing the following at a command prompt (see the documentation for the toaster sample driver for more information on setting up the toaster bus enumerator and using the "enum" application to simulate plugging and unplugging of toaster devices):
<BLOCKQUOTE>
<P>
C:\>enum -p 1
</BLOCKQUOTE>
<P>
Since there is no in-box driver for this device, the Found New Hardware wizard will appear, prompting for a driver package. If you constructed the setup image on autorun-capable media (e.g., writeable CD or DVD), you may insert that media in the drive, and Windows XP will automatically initiate a driver search on that media. On Windows 2000, you must click "Next" to initiate the driver search on that media. If you constructed the setup image in a directory on your hard disk, then you must click the "Install from a list or specific location (Advanced)" radio button, then click "Next". On the next page, click the "Include this location in the search:" checkbox, and type the path to the directory. Clicking "Next" will then initiate a driver search in the directory you specified.
<P>
The install will proceed using the <B>toastpkg.inf </B>file in the root of the install location. The co-installer, <B>tostrco2.dll</B>, will assign the device a friendly name during <B>DIF_INSTALLDEVICE</B>, and will supply a value-add software selection wizard page in response to <B>DIF_NEWDEVICEWIZARD_FINISHINSTALL</B>. This page will only be supplied if the user hasnt been given the option previously of selecting value-added software (of if theyve since uninstalled said software). This allows subsequent toasters to be installed server-side, without any user interaction whatsoever (even if a non-admin user or no user is logged in).
<P>
<B>Software-First Device Installation Walk-Through</B>
<P>
If you constructed the setup image on auto-run capable media (e.g., writeable CD or DVD), you can simply insert the media, and the <B>toastva.exe</B> program will automatically launch. Note that <B>toastva.exe</B> suppresses itself when invoked while a device installation is in progress, which is why this application doesnt appear during the hardware-first scenario described above.
<P>
After the Welcome page, the wizard will attempt to update the driver for any existing toaster devices (via the <B>UpdateDriverForPlugAndPlayDevices</B>) API.
If there arent any, it will instead “pre-install” the INF using the <B>SetupCopyOEMInf</B> API so that Plug and Play will automatically find a match when
the hardware is subsequently inserted. <B>SetupCopyOEMInf</B> also stores away information that allows Plug and Play to know where the INF came from, thus allowing the Found New Hardware wizard to prompt for media in the correct location if it ever needs to. In this scenario, it is presumed that the user will plug in their toaster upon completion of the wizard, when theyre instructed to do so. As such, they should never actually be prompted to reinsert the CD, since they wouldnt have removed it. However, if they had removed it, Plug and Play would prompt them to reinsert it. It is possible to “pre-install” all the driver files as well so that the user would never be prompted, even if they did remove the CD. The Windows XP DDK has a discussion of this technique in the section titled “Writing a Device Installation Application” in the Device Installation chapter.
<P>
Next, the wizard displays the same value-add software selection page as the user would receive if theyd performed a hardware-first install, as described above. After clicking “Next” on this page, any selected applications are installed (the wizard is hidden while these setup processes run), then the Finish wizard page appears. If the wizard didnt find any devices during its call to <B>UpdateDriverForPlugAndPlayDevices</B>, it prompts the user to plug in their hardware now. When the user does plug in the hardware (i.e., by typing “enum –p 1” as described above), then the install will proceed without requiring any user interaction.
<H3>FEEDBACK</H3>
<P>We welcome your comments, problem reports and wish-list requests. Please
submit them by pointing your Internet browser to <A
href="http://www.microsoft.com/whdc/default.mspx">http://www.microsoft.com/whdc/default.mspx</A>.
</P>
<P>
<FONT FACE="MS Sans Serif" SIZE=1><P>&copy; 2005 Microsoft Corporation</FONT><FONT FACE="Verdana" SIZE=2> </P></FONT></BODY>
</HTML>

Просмотреть файл

@ -1,189 +0,0 @@
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=Generator content="Microsoft Word 12 (filtered)">
<title>Eventdrv</title>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
.MsoChpDefault
{font-size:10.0pt;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<meta http-equiv=Content-Language content=en-us>
</head>
<body lang=EN-US>
<div class=Section1>
<div style='left:12px;position:absolute;top:-30px'>
<div u1:shape="_x0000_s1030">
<p class=MsoNormal>&nbsp;</p>
<p class=MsoNormal><b><span lang=EN style='font-size:16.0pt'>Eventdrv<u2:p></u2:p></span></b></p>
<p class=MsoNormal><b><span lang=EN style='font-size:14.0pt'>Summary</span></b></p>
<u2:p></u2:p>
<p class=MsoNormal><span lang=EN>Eventdrv is a sample kernel mode trace
provider/driver. The driver does not control any hardware; it simply generates
trace events. It is designed to demonstrate the use of ETW tracing in a driver.<u2:p></u2:p></span></p>
<p class=MsoNormal><span lang=EN>Eventdrv registers as a provider by calling
the EtwRegister API. If successful, it logs a StartEvent event with the
devices name, the length of the name, and the status code. Then, when it
receives a DeviceIOControl call, it logs a SampleEventA event. Finally, when
the driver gets unloaded, it logs an UnloadEvent event with a pointer to the
device object.<u2:p> Note that Windows Pre-Processor (WPP) Tracing tools such
as TraceView.exe cannot be used to start/stop and view traces.</u2:p></span></p>
<p class=MsoNormal><span lang=EN>&nbsp;&nbsp;<u2:p></u2:p></span></p>
<p class=MsoNormal><b><span lang=EN style='font-size:14.0pt'>Using the Sample</span></b></p>
<u2:p></u2:p>
<p class=MsoNormal><span lang=EN style='font-size:14.0pt'>&nbsp;</span><span
lang=EN>To test the Eventdrv event tracing provider, use the following
procedure:<u2:p></u2:p></span></p>
<p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'><span lang=EN
style='color:black'>1.</span>&nbsp;<span lang=EN>Build the Eventdrv sample
driver (in evntdrv\Eventdrv) by using the -cZg switch.</span></p>
<p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'>2.&nbsp;&nbsp;
Install the manifest located in the evntdrv\Eventdrv folder by using the
following command:</p>
<p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
wevtutil im evntdrv.xml<br>
<br>
Installing the manifest will create registry keys which allows tools to be able
to find the resource and message file(s) which contains event provider
information. Search MSDN for further details on the wevtutil tool.</p>
<p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'>3<span lang=EN
style='color:black'>.</span>&nbsp;<span lang=EN>Build the evntctrl executable
file (in evntdrv\evntctrl) by using the -cZg switch. Evntctrl sends IOCTLs to
Eventdrv, which then generates trace messages when it receives the IOCTLs.</span></p>
<p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'>4<span lang=EN
style='color:black'>.</span>&nbsp;Make a folder in the system directory called
ETWD<span lang=EN>riverSample. For example, C:\ETWDriverSample. Copy <u2:p>Eventdrv.sys
and evntctrl.exe to this folder. Also, copy Tracelog.exe from the tools\tracing
folder in the Driver Kit to this folder. This directory must be created because
the path to the resource file specified in the manifest evntdrv.xml points to
the %systemroot%\ETWDriverSample folder. If this folder is not created and the
Evntdrv.sys binary is not copied, decoding tools will not be able to find the
event information to decode the trace file. </u2:p></span></p>
<p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'>5<span lang=EN
style='color:black'>.</span>&nbsp;<span lang=EN>Use Tracelog to start a trace
session that is called “TestEventdrv”. The following command starts the trace
session and creates a trace log file, Eventdrv.etl, in the local directory.<br>
<br>
Tracelog -start TestEventdrv -guid #<span style='color:black'>b5a0bda9-50fe-4d0e-a83d-bae3f58c94d6
-f Eventdrv.etl</span></span></p>
<p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'>6<span lang=EN
style='color:black'>.</span>&nbsp;<span lang=EN>To generate trace messages, run
Evntctrl.exe. This executable file is built in step 3. Each time you type a
character other than Q or q, Evntctrl sends an IOCTL to the driver that signals
it to generate trace messages. To stop Evntctrl, type Q or q.</span></p>
<u2:p></u2:p>
<p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'>7<span lang=EN
style='color:black'>.</span>&nbsp;<span lang=EN>To stop the trace session, use
the following Tracelog command:<br>
<br>
tracelog -stop TestEventdrv</span></p>
<p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'>8<span lang=EN
style='color:black'>.</span>&nbsp;<span lang=EN>To display the trace messages
in the Tracedrv.etl file, use Tracerpt. Type the following <br>
command:<br>
<br>
tracerpt Eventdrv.etl</span></p>
<p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
This creates two files: summary.txt and dumpfile.xml. Dumpfile.xml will contain
the event information in an XML format. For additional options, do tracerpt /?.</p>
<p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'>9. <span
lang=EN>&nbsp; To uninstall the manifest, use the following command:</span></p>
<p class=MsoNormal style='margin-left:.25in;text-indent:-.25in'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
wevtutil um evntdrv.xml<span lang=EN><br>
&nbsp;</span></p>
<u2:p></u2:p>
<p class=MsoNormal><b><span lang=EN style='font-size:14.0pt'>Limitations</span></b></p>
<u2:p></u2:p>
<p class=MsoNormal><span lang=EN>Eventdrv is designed for Windows Vista and
later versions of Windows.<br>
This sample driver should not be used in a production environment.</span></p>
<p class=MsoNormal>&nbsp;</p>
<p class=MsoNormal><b><span lang=EN style='font-size:14.0pt'>File List</span></b></p>
<u2:p></u2:p>
<p class=MsoNormal><b><span lang=EN>Eventdrv<br>
</span></b><span lang=EN>Drvioctl.h<br>
Evntdrv.c<br>
Evntdrv.xml<br>
Makefile<br>
Makefile.inc<br>
Sources<u2:p></u2:p></span></p>
<p class=MsoNormal><b><u><span lang=EN>Evntctrl</span></u></b><br>
<span lang=EN>Install.c<u><br>
</u>Install.h<u><br>
</u>Makefile<u><br>
</u>Sources<u><br>
</u>Tracectl.c</span></p>
<p class=MsoNormal>&nbsp;</p>
<p class=MsoNormal><b><span lang=EN style='font-size:14.0pt'>Location</span></b></p>
<p class=MsoNormal><span lang=EN>The files that comprise Eventdrv are included
in the Windows Driver Kit in the \src\general\tracing\evntdrv folder.</span></p>
<p class=MsoNormal>&nbsp;</p>
</div>
</div>
</div>
<u2:p></u2:p>
</body>
</html>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,101 +0,0 @@
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<META NAME="Generator" CONTENT="Microsoft FrontPage 5.0">
<TITLE>Firefly</TITLE>
</HEAD>
<BODY LINK="#0000ff">
<FONT FACE="Verdana" SIZE=5><H2>Firefly</H2>
</FONT><FONT FACE="Verdana" SIZE=2>
<H3>SUMMARY</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
Firefly is a filter driver for an HID device. Along with illustrating how to write a filter driver, this sample shows how to use remote I/O target interfaces to open a HID collection in kernel-mode and send IOCTL requests to set and get feature reports, how an application can use WMI interfaces to send commands to a filter driver.
<H3>Introduction to firefly sample</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
Firefly sample is installed as an upper filter driver of Microsoft USB Intellimouse Optical. An application provided with the sample can cause the light of the optical mouse to blink by sending commands to the filter driver using WMI interface. The sample consists of:
<p>
<B>Driver </B>(firefly.sys): It's an upper device filter driver of mouse (mouhid.sys). This is a generic filter driver based on toaster filter driver sample available in this DDK. During start device, the driver registers a WMI class (FireflyDeviceInformation). The usermode application connects to WMI namespace (root\wmi) and opens this class using COM interfaces and makes call to set or get dataitem value (TailLit) of this class. In response to set WMI request, driver opens the HID collection using IoTarget and sends IOCTL_HID_GET_COLLECTION_INFORMATION & IOCTL_HID_GET_COLLECTION_DESCRIPTOR ioctls to get the preparsed data. It then calls HidP_GetCaps using the preparsed data to get the capabilities of the device. After getting the capabilities of the device, the driver creates a feature report to set or clear the feature that causes the light to toggle.
<p>
<B>Library</B> (luminous.lib): The sources for this file is located in the WINDDK\<ddk ver. #>\src\wdm\hid\firefly\lib folder. You will need to build it before using it. This is shared by the WDM and WDF sample. All the interfaces required to access the WMI is defined in this library and exposed as CLuminous class.
<p>
<B>Application </B>(flicker.exe): The sources for this file is located in the WINDDK\<ddk ver. #>\src\wdm\hid\firefly\app folder. You will need to build it before using it. This is shared by the WDM and WDF sample. The application links to luminous lib to open the WMI interfaces and send set request to toggle the light.
<p>
<B>Sauron </B>(sauron.dll): The sources for this file is located in the WINDDK\<ddk ver. #>\src\wdm\hid\firefly\sauron folder. You will need to build it before using it. This is shared by the WDM and WDF sample. This is a windows media player visualization DLL. This DLL is created based on a sample from the Windows Media player SDK kit. By using this DLL, you can cause the mouse lights to blink to the beats of the music. Fun stuff to try out.
<p>
<H3>BUILDING THE SAMPLE</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
To build the sample driver and test applications, you must first set up the DDK environment on your host machine. The WDK documentation has complete description on how to do this.
<OL>
<LI>
Once the build environment is set up, run the build –ceZ command in the firefly directory. This will build the luminous.lib, firefly.sys, flicker.exe, and sauron.dll and place all these bits under the appropriate target build and platform specific sub directories of firefly/disk directory.<p>
<LI>
Copy the KMDF coinstaller (wdfcoinstallerMMmmm.dll), .sys, .exe and the INF file (firefly.inf) to a floppy disk or a temporary directory on the target system.
</OL>
<P>
<H3>INSTALLING THE SAMPLE</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
To install the driver on Windows XP and later operating systems: <p>
<OL>
<LI>Get Microsoft's USB Optical mouse and plug that into your target machine and make sure the mouse works. The drivers for this mouse comes with the operating system so the device will start working automatically when you plug in.
<LI>Copy the firefly.sys and the INF file (firefly.inf) to a floppy disk or a temporary directory on the target system.
<LI>Bring up the device manager (type devmgmt.msc in the Start/Run window and press enter).
<LI>Find the Microsoft Optical mouse under "Mice and other pointing devices"
<LI>Right click on the device and choose "Update Driver..."
<LI>Select the "Install from a list of specific location (Advanced)", and click Next.
<LI>Select "Don't search. I will choose the driver to Install" and click Next.
<LI>Click on "Have Disk..." and specify the floppy or temporary directory where the INF and the sys files are present.
<LI>The system will show "Shiny Things Firefly mouse" in the list of compatible hardware. Choose that and click Next.
<LI>You will get a warning about installing a driver that the system cannot verify whether it's compatible with your hardware. Ignore that and say Yes to installing the driver.
<LI>The system will go ahead and install the driver. At this point, you will get a warning dialog about installing an unsigned driver. Ignore that and click on "Continue Anyway" button.
<LI>The system will copy all the files and restart the mouse device to install the upper filter. Click on Finish button and you are ready to run the test app.
</OL>
To install the driver on Windows 2000: <p>
<OL>
<LI>Find the mouse device in the Device manager. On Windows 2000, this device might come up as a "HID compliant mouse" under "Mice and other pointing devices".
<LI>Double click on the device to bring up the properties dialog.
<LI>Go to the Driver Tab and click on "Update Driver..." button. Click Next.
<LI>Select "Display a list of the known driver..." option and click Next.
<LI>Click on "Have Disk..." and specify the floppy or temporary directory where the INF and the sys files are present.
<LI>Click Next. You will get warning about installing an unsigned driver. Click on Yes to continue the driver installation.
<LI>The system will copy all the files and restart the mouse device to install the upper filter. Click on Finish and close the Device manager property dialog. You are ready to run the test app.
</OL>
<H3>TESTING THE SAMPLE</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
Copy the flicker.exe to the target machine and run it from command line. The usage is:
<BLOCKQUOTE>
Usage: Flicker <-0 | -1 | -2> <br>
-0 turns off light <br>
-1 turns on light <br>
-2 flashes light
</BLOCKQUOTE>
<p>
<B>Testing the DLL:</B>
<OL>
<LI>Copy the sauron.dll to the Windows Media player Visualization directory (C:\Program Files\Windows Media Player\Visualizations).
<LI>Register the DLL with COM by calling "regsvr32 sauron.dll" in command shell.
<LI>Start the Windows Media player and click on "Now Playing".
<LI>Right click on the Visualization window and you will see a menu item called "Sauron".
<LI>Choose either Firefly Bars or Firefly Flash and play some music.
<LI>You will see the mouse light dancing to the tune of the music.
<LI>You can unregister the DLL by calling "regsvr32 -u sauron.dll".
</OL>
<P>
</FONT><P ALIGN="CENTER"><A HREF="#top"><FONT FACE="Verdana" SIZE=2>Top of page</FONT></A><FONT FACE="Verdana" SIZE=2> </P></FONT>
<TABLE CELLSPACING=0 BORDER=0 WIDTH=624>
<TR><TD VALIGN="MIDDLE" BGCOLOR="#00ffff" HEIGHT=2>
<P></TD>
</TR>
</TABLE>
<FONT FACE="MS Sans Serif" SIZE=1><P>&copy; Microsoft Corporation 2007</FONT><FONT FACE="Verdana" SIZE=2> </P></FONT></BODY>
</HTML>

Просмотреть файл

@ -1,775 +0,0 @@
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="hclient_files/filelist.xml">
<title>HCLIENT</title>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="State"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]--><!--[if !mso]><object
classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></object>
<style>
st1\:*{behavior:url(#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Courier;
panose-1:2 7 4 9 2 2 5 2 4 4;
mso-font-charset:0;
mso-generic-font-family:modern;
mso-font-format:other;
mso-font-pitch:fixed;
mso-font-signature:3 0 0 0 1 0;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;
mso-font-charset:2;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:0 268435456 0 0 -2147483648 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
h2
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman";
font-weight:bold;}
h3
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman";
font-weight:bold;}
h4
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman";
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:338625954;
mso-list-template-ids:-1497861504;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l1
{mso-list-id:361787635;
mso-list-template-ids:-756894292;}
@list l1:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l2
{mso-list-id:517618851;
mso-list-template-ids:-711566768;}
@list l2:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l3
{mso-list-id:1205487990;
mso-list-template-ids:-543120596;}
@list l3:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l4
{mso-list-id:1374160723;
mso-list-template-ids:1440887904;}
@list l5
{mso-list-id:1777210894;
mso-list-template-ids:-1505962734;}
@list l5:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
<meta name=Template content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple style='tab-interval:.5in'
leftmargin=8>
<div class=Section1>
<h2><a name=MYSAMPLE><span style='font-family:Verdana'>HCLIENT</span></a><span
style='font-family:Verdana'> <o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>SUMMARY<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>This document and
associated sample code describe how to write a user-mode client application to
communicate with devices that conform to the HID device class specification.
This article is useful to application writers who need to develop a user-mode
application that communicates with and extracts information from an
HID-compatible device. This sample illustrates the method for detecting HID
devices, opening those HID devices for communication, and extracting and
formatting the data into or from device reports.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The HID class consists
primarily of devices that are used by humans to control the operation of
computer systems. Typical HID devices include keyboards, mice, and joysticks.
Non-typical devices might include front-panel controls (knobs, switches, or
buttons) or controls found on devices such as telephones, VCR remote controls,
games, and simulation devices. The underlying common feature of all HID devices
is the need for guaranteed delivery of small amounts of non-periodic data. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The basic communication
mechanism for HID class devices is the HID report. Every HID device must supply
a report descriptor that details the format of the different reports that it
creates for its device. The HID class drivers and HID.DLL is <span class=GramE>provide</span>
an interface for extracting the relevant data from these reports.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Although the <span
class=SpellE>HClient</span> sample is a user-mode application, many of the
functions available in HID.DLL are available to kernel-mode HID clients as
well. The functions exported by HID.DLL have a prefix of either <span
class=SpellE>HidD</span>_ or <span class=SpellE>HidP</span>_. All functions
with a <span class=SpellE>HidP</span>_ prefix are available to kernel-mode
clients. However, the mechanism for opening HID devices and obtaining the
necessary information such as <span class=SpellE>preparsed</span> data is
different in this context. </span></p>
<h3>BUILDING THE SAMPLE</h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>To build the HClient.exe
sample, follow these instructions.<o:p></o:p></span></p>
<ol start=1 type=1>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l4 level1 lfo1;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Run the standard Windows NT®/Windows® 2000 DDK build
environment (checked or free)<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l4 level1 lfo1;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Change to the .\<span class=SpellE>src\wdm\hid\hclient</span>
directory<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l4 level1 lfo1;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Execute <b>build</b><o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l4 level1 lfo1;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>The built HClient.exe will be found in
.\lib\&lt;i386|alpha&gt;\&lt;<span class=SpellE>checked|free</span>&gt;<o:p></o:p></span></li>
</ol>
<p><span style='font-size:10.0pt;font-family:Verdana'>The <span class=SpellE>HClient</span>
sources are dependent on the following system include files and libraries.<o:p></o:p></span></p>
<pre>&nbsp;<span style='mso-tab-count:1'>       </span>HIDSDI.H <span
style='mso-tab-count:1'>      </span>User-mode only definitions and declarations</pre><pre><span
style='mso-tab-count:1'>        </span>HIDPI.H <span style='mso-tab-count:1'>       </span>Definitions and declarations for user-mode and kernel-mode HID clients</pre><pre><span
style='mso-tab-count:1'>        </span>HIDUSAGE.H <span style='mso-tab-count:
1'>    </span>Macro definitions for predefined usage table and usage values as </pre><pre><span
style='mso-tab-count:3'>                       </span><span class=GramE>defined</span> in the HID Spec 1.0 and HID Usage Table Spec 1.0</pre><pre><span
style='mso-tab-count:1'>        </span>HID.LIB <span style='mso-tab-count:1'>       </span>Library file needed to resolve exported HID.DLL functions</pre>
<p><span style='font-size:10.0pt;font-family:Verdana'>Kernel-mode clients may
also need the following files:<o:p></o:p></span></p>
<pre>&nbsp;<span style='mso-tab-count:1'>       </span>HIDPDDI.H <span
style='mso-tab-count:1'>     </span>Declarations and definitions for features available through the HID <span
class=SpellE>ioctl</span> interface</pre><pre><span style='mso-tab-count:1'>        </span>HIDPARSE.LIB <span
style='mso-tab-count:1'>  </span>Library file needed to resolve exported HIDPARSE.SYS functions</pre>
<h3><span style='font-family:Verdana'>TOOLS<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>The only tools needed to
work with <span class=SpellE>HClient</span> are HID devices. In the Windows
NT/Windows 2000 system, file handles cannot be opened on mice and keyboards.
However, all other HID devices will be available and recognized by <span
class=SpellE>HClient</span> for testing purposes.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>RESOURCES<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>See the <a
href="http://www.usb.org/">Universal Serial Bus</a> Device Class Definition for
Human Interface Devices (HID) Version 1.0 and Universal Serial Bus HID Usage
Tables 1.0. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4>File Manifest</h4>
<pre><u>Files<span style='mso-spacerun:yes'>         </span>Description</u></pre><pre><span
style='font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><span
style='font-family:Courier'>HCLIENT.HTM<span style='mso-tab-count:1'>    </span>The documentation for this sample (this file)<o:p></o:p></span></pre><pre><span
style='font-family:Courier'>SOURCES<span style='mso-tab-count:2'>        </span>The generic file for building the code sample<o:p></o:p></span></pre><pre><span
style='font-family:Courier'>BUFFERS.C<span style='mso-tab-count:1'>      </span>Code for displaying HID report buffers in the extended calls <o:p></o:p></span></pre><pre><span
style='font-family:Courier'><span style='mso-tab-count:2'>               </span><span
class=GramE>dialog</span> box.<span style='mso-tab-count:2'>            </span><o:p></o:p></span></pre><pre><span
style='font-family:Courier'>BUFFERS.H<span style='mso-tab-count:1'>      </span>Function and structure declaration visible to other modules<o:p></o:p></span></pre><pre><span
style='font-family:Courier'>DEBUG.C<span style='mso-tab-count:2'>        </span>Contains the function definitions for debug memory allocation tracking<span
style='mso-tab-count:1'>      </span><o:p></o:p></span></pre><pre><span
style='font-family:Courier'>DEBUG.H <span style='mso-tab-count:1'>       </span>Contains public macro definitions and function declarations for <o:p></o:p></span></pre><pre><span
style='font-family:Courier'><span style='mso-tab-count:2'>               </span><span
class=GramE>the</span> debugging routines to deal with asserts, traps, and memory allocations<o:p></o:p></span></pre><pre><span
style='font-family:Courier'>ECDISP.C<span style='mso-spacerun:yes'>    </span><span
style='mso-tab-count:1'>   </span>Code to handle the extended calls dialog box<o:p></o:p></span></pre><pre><span
style='font-family:Courier'>ECDISP.H<span style='mso-spacerun:yes'>    </span><span
style='mso-tab-count:1'>   </span>Contains public declarations for the extended calls dialog<o:p></o:p></span></pre><pre><span
style='font-family:Courier'><span style='mso-tab-count:2'>               </span><span
class=GramE>box</span><o:p></o:p></span></pre><pre><span style='font-family:
Courier'>HCLIENT.C<span style='mso-tab-count:1'>      </span>Code for handling <span
class=SpellE>HClient's</span> main dialog box <o:p></o:p></span></pre><pre><span
style='font-family:Courier'>HCLIENT.H<span style='mso-tab-count:1'>      </span>Contains public declarations and definitions for HCLIENT.C and<o:p></o:p></span></pre><pre><span
style='font-family:Courier'><span style='mso-tab-count:2'>               </span><span
class=GramE>visible</span> to other modules<o:p></o:p></span></pre><pre><span
style='font-family:Courier'>HCLIENT.RC<span style='mso-tab-count:1'>     </span>Visual C++ generated resource file for <span
class=SpellE>HClient</span><o:p></o:p></span></pre><pre><span style='font-family:
Courier'>HID.H <span style='mso-tab-count:2'>         </span>Contains declarations and definitions for handling devices and<o:p></o:p></span></pre><pre><span
style='font-family:Courier'><span style='mso-tab-count:2'>               </span><span
class=GramE>data</span> within <span class=SpellE>HClient</span><o:p></o:p></span></pre><pre><span
style='font-family:Courier'>LIST.H <span style='mso-tab-count:2'>        </span>Contains public macro definitions for manipulating doubly-linked lists<o:p></o:p></span></pre><pre><span
style='font-family:Courier'>LOGPNP.C<span style='mso-tab-count:1'>       </span>Code for finding, loading and building logical HID device <o:p></o:p></span></pre><pre><span
style='font-family:Courier'><span style='mso-tab-count:2'>               </span><span
class=GramE>structures</span> <o:p></o:p></span></pre><pre><span
style='font-family:Courier'>LOGPNP.H<span style='mso-spacerun:yes'>    </span><span
style='mso-tab-count:1'>   </span>Contains public function declarations for LOGPNP.C<o:p></o:p></span></pre><pre><st1:place
w:st="on"><st1:City w:st="on"><span style='font-family:Courier'>MAKEFILE</span></st1:City><span
style='mso-tab-count:1'>       </span><st1:State w:st="on"><span
style='font-family:Courier'>NT</span></st1:State></st1:place><span
style='font-family:Courier'> DDK build environment <span class=SpellE>makefile</span><span
style='mso-tab-count:1'>     </span><o:p></o:p></span></pre><pre><span
style='font-family:Courier'>PNP.C <span style='mso-tab-count:2'>         </span>Contains the code for finding, adding, removing, and<o:p></o:p></span></pre><pre><span
style='font-family:Courier'><span style='mso-tab-count:2'>               </span><span
class=GramE>identifying</span> hid devices.<o:p></o:p></span></pre><pre><span
style='font-family:Courier'>REPORT.C<span style='mso-spacerun:yes'>   </span><span
style='mso-tab-count:1'>    </span>Contains the code for reading/writing hid reports and<o:p></o:p></span></pre><pre><span
style='font-family:Courier'><span style='mso-tab-count:2'>               </span><span
class=GramE>translating</span> those HID reports into useful information.<o:p></o:p></span></pre><pre><span
style='font-family:Courier'>RESOURCE.H<span style='mso-tab-count:1'>     </span>Visual C++ generated resource definition file<o:p></o:p></span></pre><pre><span
style='font-family:Courier'>STRINGS.C<span style='mso-tab-count:1'>      </span>Code for converting data buffers and integer values<o:p></o:p></span></pre><pre><span
style='font-family:Courier'><span style='mso-tab-count:2'>               </span><span
class=GramE>to</span> and from string representation for display.<o:p></o:p></span></pre><pre><span
style='font-family:Courier'>STRINGS.H<span style='mso-tab-count:1'>      </span>Contains public function definitions for STRINGS.C<o:p></o:p></span></pre>
<h4>Programming Tour</h4>
<p><span style='font-size:10.0pt;font-family:Verdana'>The core functionality
relevant to HID client applications is contained in the files REPORT.C and
PNP.C. The code in these files implements the basic features that most clients
will require. Most of the other source files contain code for handling the user
interface and calling the main tasks that are in the above two files. This
section covers those relevant topics. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The major topics covered
in this tour are: <o:p></o:p></span></p>
<ul type=disc>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l5 level1 lfo2;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Detecting Installed HID devices <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l5 level1 lfo2;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Opening HID Devices <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l5 level1 lfo2;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Communicating with HID Devices <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l5 level1 lfo2;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Building/Interpreting HID Reports<o:p></o:p></span></li>
</ul>
<p><u><span style='font-size:10.0pt;font-family:Verdana'>Detecting Installed
HID Devices</span></u><span style='font-size:10.0pt;font-family:Verdana'><o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>A necessary component of
a HID client application is the detection of installed HID devices. The
function <span class=SpellE><span class=GramE>FindKnownHidDevices</span></span><span
class=GramE>(</span>) in PNP.C details how to do that work. The basic steps for
identifying attached HID devices are:<o:p></o:p></span></p>
<ul type=disc>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l3 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Call <span class=SpellE>HidD_GetHidGuid</span>() –
Get the HID device class GUID <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l3 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Call <span class=SpellE>SetupDiGetClassDevs</span>()
– Get a handle to a set of devices which implement the HID interface <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l3 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Call <span class=SpellE><span class=GramE>SetupDiEnumDeviceInterfaces</span></span><span
class=GramE>(</span>) – For each device in the returned set of devices,
obtain the interface information for all exposed HID interfaces. <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l3 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Call <span class=SpellE><span class=GramE>SetupDiGetDeviceInterfaceDetail</span></span><span
class=GramE>(</span>) – For each interface obtained in the previous call,
get the detailed information block for that interface. This detailed
information includes the string that can be passed to <span class=SpellE>CreateFile</span>()
to open a handle to the device <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l3 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Call <span class=SpellE><span class=GramE>SetupDiDestroyDeviceInfoList</span></span><span
class=GramE>(</span>) – Free up the device information set that was
obtained in the call to <span class=SpellE>SetupDiGetClassDevs</span>().<o:p></o:p></span></li>
</ul>
<p><span style='font-size:10.0pt;font-family:Verdana'>The remainder of the code
implemented in the function deals with creating a list of HID_DEVICE structures
which contain information for each HID device in the system. This sample client
accesses all HID devices in the system. A more specific implementation may only
be looking for a certain type of HID device such as a joystick/<span
class=SpellE>gamepad</span>.<o:p></o:p></span></p>
<p><u><span style='font-size:10.0pt;font-family:Verdana'>Opening HID Devices</span></u><span
style='font-size:10.0pt;font-family:Verdana'><o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>After detecting a HID
device, <span class=SpellE>HClient</span> proceeds to open that device. When
opening the device, <span class=SpellE>HClient</span> creates a HID_DEVICE
structure to contain any information about the device that further routines
might use. HID_DEVICE is defined as follows in HID.H:<o:p></o:p></span></p>
<div align=center>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=499
style='width:374.25pt;mso-cellspacing:0in'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'>
<td style='padding:.75pt .75pt .75pt .75pt'><pre>&nbsp;<span class=SpellE>typedef</span> <span
class=SpellE>struct</span> _HID_DEVICE {<span style='mso-spacerun:yes'>   </span></pre><pre><span style='mso-spacerun:yes'>    </span>HANDLE<span style='mso-spacerun:yes'>               </span><span
class=SpellE>HidDevice</span>; // A file handle to the hid device.</pre><pre><span style='mso-spacerun:yes'>    </span>PHIDP_PREPARSED_DATA <span
class=SpellE>Ppd</span>;<span style='mso-spacerun:yes'>       </span>// The opaque parser info describing this device</pre><pre><span style='mso-spacerun:yes'>    </span>HIDP_CAPS<span style='mso-spacerun:yes'>            </span>Caps;<span style='mso-spacerun:yes'>      </span>// The Capabilities of this hid device.</pre><pre><span style='mso-spacerun:yes'>    </span>HIDD_ATTRIBUTES<span style='mso-spacerun:yes'>      </span>Attributes;</pre><pre><o:p>&nbsp;</o:p></pre><pre><span style='mso-spacerun:yes'>    </span>PCHAR<span style='mso-spacerun:yes'>                </span><span
class=SpellE>InputReportBuffer</span>;</pre><pre><span style='mso-spacerun:yes'>    </span>PHID_DATA<span style='mso-spacerun:yes'>            </span><span
class=SpellE>InputData</span>;<span style='mso-spacerun:yes'>       </span>// array of hid data structures</pre><pre><span style='mso-spacerun:yes'>    </span>ULONG<span style='mso-spacerun:yes'>                </span><span
class=SpellE>InputDataLength</span>; // Num elements in this array.</pre><pre><span style='mso-spacerun:yes'>    </span>PHIDP_BUTTON_CAPS<span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span><span
class=SpellE>InputButtonCaps</span>;</pre><pre><span style='mso-spacerun:yes'>    </span>PHIDP_VALUE_CAPS<span style='mso-spacerun:yes'>     </span><span
class=SpellE>InputValueCaps</span>;</pre><pre><o:p>&nbsp;</o:p></pre><pre><span style='mso-spacerun:yes'>    </span>PCHAR<span style='mso-spacerun:yes'>                </span><span
class=SpellE>OutputReportBuffer</span>;</pre><pre><span style='mso-spacerun:yes'>    </span>PHID_DATA<span style='mso-spacerun:yes'>            </span><span
class=SpellE>OutputData</span>;</pre><pre><span style='mso-spacerun:yes'>    </span>ULONG<span style='mso-spacerun:yes'>                </span><span
class=SpellE>OutputDataLength</span>;</pre><pre><span style='mso-spacerun:yes'>    </span>PHIDP_BUTTON_CAPS<span style='mso-spacerun:yes'>    </span><span
class=SpellE>OutputButtonCaps</span>;</pre><pre><span style='mso-spacerun:yes'>    </span>PHIDP_VALUE_CAPS<span style='mso-spacerun:yes'>     </span><span
class=SpellE>OutputValueCaps</span>;</pre><pre><o:p>&nbsp;</o:p></pre><pre><span style='mso-spacerun:yes'>    </span>PCHAR<span style='mso-spacerun:yes'>                </span><span
class=SpellE>FeatureReportBuffer</span>;</pre><pre><span style='mso-spacerun:yes'>    </span>PHID_DATA<span style='mso-spacerun:yes'>            </span><span
class=SpellE>FeatureData</span>;</pre><pre><span style='mso-spacerun:yes'>    </span>ULONG<span style='mso-spacerun:yes'>                </span><span
class=SpellE>FeatureDataLength</span>;</pre><pre><span style='mso-spacerun:yes'>    </span>PHIDP_BUTTON_CAPS<span style='mso-spacerun:yes'>    </span><span
class=SpellE>FeatureButtonCaps</span>;</pre><pre><span style='mso-spacerun:yes'>    </span>PHIDP_VALUE_CAPS<span style='mso-spacerun:yes'>     </span><span
class=SpellE>FeatureValueCaps</span>;</pre><pre><o:p>&nbsp;</o:p></pre><pre>} HID_DEVICE, *PHID_DEVICE;</pre></td>
</tr>
</table>
</div>
<p><span style='font-size:10.0pt;font-family:Verdana'>In addition to storing
the basic HID structures as defined in HIDPI.H and HIDSDI.H, the HID_DEVICE
structure also maintains an array of HID_DATA structures for each report type.
These structures contain the most recent value used for each of the controls
defined in the HIDP_VALUE_CAPS list and HIDP_BUTTON_CAPS list for the given
report type. The fields within this structure are used by routines that
pack/unpack data reports. The usage of these fields is discussed further in the
section entitled <i>Building/Interpreting HID Reports</i>.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The function <span
class=SpellE><span class=GramE>OpenHidDevice</span></span><span class=GramE>(</span>)
in PNP.C performs the necessary steps to fill a HID_DEVICE structure for a
device. In order to do so, it performs the following steps:<o:p></o:p></span></p>
<ul type=disc>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo4;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Call <span class=SpellE><span class=GramE>CreateFile</span></span><span
class=GramE>(</span>) – Open a handle to the specific HID device. In this
case, we request read/write access to the device, allow the device to be
shared, and synchronize access to the device handle (no OVERLAPPED flag). <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo4;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Call <span class=SpellE>HidD_<span class=GramE>GetPreparsedData</span></span><span
class=GramE>(</span>) – Get the <span class=SpellE>preparsed</span> data
for the device. The <span class=SpellE>preparsed</span> data is a HID
parser specific block of data used for processing HID reports. The memory
for this structure is allocated by the HID.DLL function and must be freed
when no longer needed with <span class=SpellE>HidD_<span class=GramE>FreePreparsedData</span></span><span
class=GramE>(</span>). <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo4;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Call <span class=SpellE>HidD_<span class=GramE>GetAttributes</span></span><span
class=GramE>(</span>) – Get the attributes of the device. The attributes
structure contains the vendor ID, product ID and version number of the
given HID device <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo4;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Call <span class=SpellE>HidD_<span class=GramE>GetCaps</span></span><span
class=GramE>(</span>) – Get the capabilities of the device. The device
capabilities include the usage page and usage of the device, the required
buffer length for the different reports on the device, the number of link
collection nodes on the device and a count of the number of buttons and
values for each of the different report types. <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo4;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Call <span class=SpellE><span class=GramE>FillDeviceInfo</span></span><span
class=GramE>(</span>) – Fill in the rest of the HID_DEVICE structure. This
function allocates space for and retrieves the link collection nodes, the
value caps, and the button caps for the device.<o:p></o:p></span></li>
</ul>
<p><span style='font-size:10.0pt;font-family:Verdana'>A given client application
may not need to perform all of the above steps. For instance, if a client
application only operates with a specific HID device (<span class=SpellE>ie</span>.
vendor ID/product ID), it may forego any more processing after retrieving the
attributes if the device it is currently opening is not the one its interested
in. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>A client application may
also work only for a given usage page/usage combination. For example, a monitor
control application would only need to open devices that match the monitor
usage page and usage combination. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Lastly, a HID client may
require only a subset of the detailed information currently stored in the
HID_DEVICE structure. This sample application performs a broad range of
functionality to provide a detailed sample.<o:p></o:p></span></p>
<p><u><span style='font-size:10.0pt;font-family:Verdana'>Communicating with HID
Devices</span></u><span style='font-size:10.0pt;font-family:Verdana'><o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>As mentioned above, a HID
devices basic method of communication is through reports. A HID device can
contain as many as 255 reports for each report type (Input, Output, and
Feature). In order to properly communicate with a device, a client application
must be able to create reports (when sending data) or extract data from reports
(when receiving data). See the section titled: <i>Building/Interpreting HID
Reports</i> for information on how to manipulate these report buffers. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>A HID device reports
information to the host through Input reports or Feature Reports. Typically,
input reports contain the data generated by user interaction, such as a button
press. Feature reports, on the other hand, report the current state or settings
for a device. The methods for obtaining these two different reports are
implemented in the functions <span class=GramE>Read(</span>) and <span
class=SpellE>GetFeature</span>() in REPORT.C. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>In order to receive data,
<span class=SpellE>HClient</span> must use the file handle created in <span
class=SpellE>OpenHidDevice</span> that has READ access and the buffer allocated
for the given report type. For input reports, <span class=GramE>Read(</span>)
calls the Win32 API <span class=SpellE>ReadFile</span>() and waits for the
device to return a report. For feature reports, <span class=SpellE><span
class=GramE>GetFeature</span></span><span class=GramE>(</span>) sets the first
byte of the report buffer to the desired report ID and calls <span
class=SpellE>HidD_GetFeature</span>() to obtain that feature report. After
receiving a report back from the underlying drivers, these routines call <span
class=SpellE><span class=GramE>UnpackReport</span></span><span class=GramE>(</span>)
to fill in the corresponding HID_DATA structures.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Outputting data to a
device is a bit more complicated. Once again, there are two different types of
reports that can be sent to a device, Output and Feature. The corresponding
functions for outputting data are <span class=GramE>Write(</span>) and <span
class=SpellE>SetFeature</span>() in REPORT.C.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The first step that both
of these functions perform is creating the desired report buffer. First, the
HID_DATA structure with the desired report ID value is found. Then, these
functions call <span class=SpellE><span class=GramE>PackReport</span></span><span
class=GramE>(</span>) to set the data values within the allocated report buffer
for that report ID. Once the report buffer has been created, either <span
class=SpellE><span class=GramE>WriteFile</span></span><span class=GramE>(</span>)
or <span class=SpellE>HidD_SetFeature</span>() is called to send the report
packet to the device. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>It is important to
understand that all access to a HID device file handle is synchronized.
Therefore, all threads using that handle will block until all previous requests
to the device have completed. One possible client implementation would have one
thread continuously read input reports while another thread sends or receives
feature reports. Since the <span class=SpellE>HidD_<span class=GramE>GetFeature</span></span><span
class=GramE>(</span>) and <span class=SpellE>HidD_SetFeature</span> functions
are implemented as <span class=SpellE>DeviceIoControl</span> calls, they are
also synchronized with <span class=SpellE>ReadFile</span> and <span
class=SpellE>WriteFile</span>(). There are two solutions to this scenario. One <span
class=GramE>solutions</span> uses overlapped I/O for asynchronous control. The
second is to open two handles for the device, one for the read thread and one
for the feature thread. <o:p></o:p></span></p>
<p><u><span style='font-size:10.0pt;font-family:Verdana'>Building/Interpreting
HID Reports</span></u><span style='font-size:10.0pt;font-family:Verdana'><o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The last important idea
when dealing with reports is extracting/setting data values from/in a given
report buffer. The section covers the details of the functions <span
class=SpellE><span class=GramE>PackReport</span></span><span class=GramE>(</span>)
and <span class=SpellE>UnpackReport</span>() as implemented in REPORT.C. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>As mentioned above, in
order to communicate with a HID device, the client application must be able to
either create the appropriate report to send to the device or extract the
relevant information from a report received from the device. When <span
class=SpellE>Hclient</span> initially opened the HID device and created the
HID_DEVICE structure for that device, it also created an array of HID_DATA
structures for each of the report types. The format of this HID_DATA structure
is as follows:<o:p></o:p></span></p>
<div align=center>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=499
style='width:374.25pt;mso-cellspacing:0in'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'>
<td style='padding:.75pt .75pt .75pt .75pt'><pre>&nbsp;<span class=SpellE>typedef</span> <span
class=SpellE>struct</span> _HID_DATA {</pre><pre><span style='mso-spacerun:yes'>   </span>BOOLEAN<span style='mso-spacerun:yes'>     </span><span
class=SpellE>IsButtonData</span>;</pre><pre><span style='mso-spacerun:yes'>   </span>UCHAR<span style='mso-spacerun:yes'>       </span>Reserved;</pre><pre><span style='mso-spacerun:yes'>   </span>USAGE<span style='mso-spacerun:yes'>       </span><span
class=SpellE>UsagePage</span>;<span style='mso-spacerun:yes'>   </span>// The usage page for which we are looking.</pre><pre><span style='mso-spacerun:yes'>   </span>ULONG<span style='mso-spacerun:yes'>       </span>Status;<span style='mso-spacerun:yes'>      </span>// The last status returned from the <span
class=SpellE>accessor</span> function</pre><pre><span style='mso-spacerun:yes'>                            </span>// when updating this field.</pre><pre><span style='mso-spacerun:yes'>   </span>ULONG<span style='mso-spacerun:yes'>       </span><span
class=SpellE>ReportID</span>;<span style='mso-spacerun:yes'>    </span>// <span
class=SpellE>ReportID</span> for this given data structure</pre><pre><span style='mso-spacerun:yes'>   </span>BOOLEAN<span style='mso-spacerun:yes'>     </span><span
class=SpellE>IsDataSet</span>;<span style='mso-spacerun:yes'>   </span>// Variable to track whether a given data structure</pre><pre><span style='mso-spacerun:yes'>                            </span>//<span style='mso-spacerun:yes'>  </span>has already been added to a report structure</pre><pre><o:p>&nbsp;</o:p></pre><pre><span style='mso-spacerun:yes'>   </span>union {</pre><pre><span style='mso-spacerun:yes'>      </span><span
class=SpellE>struct</span> {</pre><pre><span style='mso-spacerun:yes'>         </span>ULONG<span style='mso-spacerun:yes'>       </span><span
class=SpellE>UsageMin</span>;<span style='mso-spacerun:yes'>       </span>// Variables to track the usage minimum and max</pre><pre><span style='mso-spacerun:yes'>         </span>ULONG<span style='mso-spacerun:yes'>       </span><span
class=SpellE>UsageMax</span>;<span style='mso-spacerun:yes'>       </span>// If equal, then only a single usage</pre><pre><span style='mso-spacerun:yes'>         </span>ULONG<span style='mso-spacerun:yes'>       </span><span
class=SpellE>MaxUsageLength</span>; // Usages buffer length.</pre><pre><span style='mso-spacerun:yes'>       </span><span style='mso-spacerun:yes'>  </span>PUSAGE<span style='mso-spacerun:yes'>      </span>Usages;<span style='mso-spacerun:yes'>         </span>// list of usages (buttons ``down'' on the device.</pre><pre><o:p>&nbsp;</o:p></pre><pre><span style='mso-spacerun:yes'>      </span>} <span
class=SpellE>ButtonData</span>;</pre><pre><span style='mso-spacerun:yes'>      </span><span
class=SpellE>struct</span> {</pre><pre><span style='mso-spacerun:yes'>         </span>USAGE<span style='mso-spacerun:yes'>       </span><span
class=SpellE>Usage</span>; // The usage describing this value;</pre><pre><span style='mso-spacerun:yes'>         </span>USHORT<span style='mso-spacerun:yes'>      </span>Reserved;</pre><pre><o:p>&nbsp;</o:p></pre><pre><span style='mso-spacerun:yes'>         </span>ULONG<span style='mso-spacerun:yes'>       </span>Value;</pre><pre><span style='mso-spacerun:yes'>         </span>LONG<span style='mso-spacerun:yes'>  </span><span style='mso-spacerun:yes'>      </span><span
class=SpellE>ScaledValue</span>;</pre><pre><span style='mso-spacerun:yes'>      </span>} <span
class=SpellE>ValueData</span>;</pre><pre><span style='mso-spacerun:yes'>   </span>};</pre><pre>} HID_DATA, *PHID_DATA;</pre></td>
</tr>
</table>
</div>
<p><span style='font-size:10.0pt;font-family:Verdana'>When creating the HID
reports for sending to the device, the function <span class=SpellE><span
class=GramE>PackReport</span></span><span class=GramE>(</span>) is used. <span
class=SpellE>PackReport</span> takes as input a pointer to a HID_DATA structure
and the appropriate report buffer. The pointer should point to the first
HID_DATA structure in the array that contains the report ID for the report to
be created. With this information, <span class=SpellE><span class=GramE>PackReport</span></span><span
class=GramE>(</span>) performs the following steps:<o:p></o:p></span></p>
<ul type=disc>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo5;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Zeroes out the current report buffer <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo5;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Searches the array of HID_DATA structures looking all
data values that match the report ID <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo5;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>For each data value structure found, it calls <span
class=SpellE>HidP_SetUsageValue</span> to set the value currently stored
in the structure into the report. <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo5;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>For each button structure found, it calls <span
class=SpellE>HidP_SetUsages</span> with the corresponding usage value to
set the button state in the report to &quot;On&quot;. <o:p></o:p></span></li>
</ul>
<p><span style='font-size:10.0pt;font-family:Verdana'>After having looped
through the array of HID_DATA structures, the report buffer will have the
appropriate report ID set as the first byte in the buffer and is ready to be
sent to the device.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>In a similar manner, <span
class=SpellE><span class=GramE>UnpackReport</span></span><span class=GramE>(</span>)
extracts data from a given report. Like <span class=SpellE><span class=GramE>PackReport</span></span><span
class=GramE>(</span>), this function receives a report buffer returned by the
device and an array of HID_DATA structures that could possibly be filled in.
This routine performs the following steps:<o:p></o:p></span></p>
<ul type=disc>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo6;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Extracts the report ID from the first byte of the
report buffer <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo6;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Searches the array of HID_DATA structures looking for
all structures that match the report ID <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo6;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>For each data value structure found, it <span
class=GramE>call</span> <span class=SpellE>HidP_GetUsageValue</span> and <span
class=SpellE>HidP_GetScaledUsageValue</span> to set the Value and <span
class=SpellE>ScaledValue</span> fields. <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo6;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>For each button structure, <span class=SpellE><span
class=GramE>UnpackReport</span></span><span class=GramE>(</span>) calls <span
class=SpellE>HidP_GetUsages</span>() to retrieve all the &quot;On&quot;
buttons for that data structure.<o:p></o:p></span></li>
</ul>
<p><span style='font-size:10.0pt;font-family:Verdana'>Once finished, the array
of HID_DATA structures will contain the new settings based on the information
returned in the report buffer.<o:p></o:p></span></p>
<p align=center style='text-align:center'><span style='font-size:10.0pt;
font-family:Verdana'><a href="#top">Top of page</a> <o:p></o:p></span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><span style='color:black'><o:p>&nbsp;</o:p></span></p>
</td>
</tr>
</table>
<p><span style='font-size:7.5pt;font-family:"MS Sans Serif"'>© 2004 Microsoft
Corporation</span><span style='font-size:10.0pt;font-family:Verdana'> <o:p></o:p></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,465 +0,0 @@
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="kbfiltr_files/filelist.xml">
<title>Kbfiltr</title>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>110</w:Zoom>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
h2
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman";
font-weight:bold;}
h3
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman";
font-weight:bold;}
h4
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman";
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:71007566;
mso-list-template-ids:-534640722;}
@list l0:level1
{mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1
{mso-list-id:681972489;
mso-list-template-ids:-534640722;}
@list l1:level1
{mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2
{mso-list-id:1281690663;
mso-list-template-ids:-534640722;}
@list l3
{mso-list-id:1533613307;
mso-list-template-ids:-534640722;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
</head>
<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
<div class=Section1>
<h2><span class=SpellE><span style='font-family:Verdana'>Kbfiltr</span></span><span
style='font-family:Verdana'><o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>SUMMARY<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>This sample is WDF
version of WDM filter driver. The WDM version of this filter has been deprecated. This is an upper device filter driver sample for
PS/2 keyboard. This driver layers in between the <span class=SpellE>KbdClass</span>
driver and i8042prt driver and hooks the callback routine that moves keyboard
inputs from the port driver to class driver. In its current state, it only
hooks into the keyboard packet report chain, the keyboard initialization
function, and the keyboard ISR, but does not do any processing of the data that
it sees. (The hooking of the initialization function and ISR is only available
in the i8042prt stack.) With additions to this current filter-only code base,
the filter could conceivably add, remove, or modify input as needed. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>This sample also creates
a raw PDO and registers an interface so that application can talk to the filter
driver directly without going thru the PS/2 <span class=SpellE>devicestack</span>.
The reason for providing this additional interface is because the keyboard
device is an exclusive secure device and it's not possible to open the device
from <span class=SpellE>usermode</span> and send custom <span class=SpellE>ioctls</span>
through it. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>This driver filters input
for a particular keyboard on the system. If you want to filter keyboard inputs
from all the keyboards plugged into the system then you can install this driver
as a class filter below the <span class=SpellE>kbdclass</span> filter driver by
adding the service name of this filter driver before the <span class=SpellE>kbdclass</span>
filter in the registry at &quot;HKEY_LOCAL_MACHINE\SYSTEM\<span class=SpellE>CurrentControlSet</span>\Control\Class<span
class=GramE>\{</span>4D36E96B-E325-11CE-BFC1-08002BE10318}\<span class=SpellE>UpperFilters</span>&quot;.
<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>Click the Free Build
Environment or Checked Build Environment icon under Development Kits program
group to set basic environment variables. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Change to the directory
containing the device source code, such as CD <span class=SpellE>src\input</span>\kbfiltr.
<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Run <b>build -<span
class=SpellE>ceZ</span>,</b> or use the macro <b>BLD</b>. This command invokes
the Microsoft make routines to build the components. If the build </span>s<span
style='font-size:10.0pt;font-family:Verdana'>ucceeds, you will find the driver,
<span class=SpellE>kbfiltr.sys,</span>
in the binary output directory specified for the build environment. You can get the output path from the buildxxx.log file. If it fails you can find errors and warnings in the <span class=SpellE>buildxxx.err</span>
and <span class=SpellE>buildxxx.wrn</span> respectively, where xxx is <span
class=SpellE>either</span> <span class=SpellE>chk</span> or <span class=SpellE>fre</span>
depending on the build environment. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>INSTALLATION<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>
Copy the KMDF coinstaller (wdfcoinstallerMMmmm.dll), driver binary and the kbfiltr.inf file to a floppy disk or a temp folder. </span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>This sample is installed
via an .<span class=SpellE>inf</span> file. The .<span class=SpellE>inf</span>
file included in this sample is designed to filter a PS/2 keyboard. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Use the following rules
regarding the .<span class=SpellE>inf</span> file that installs the filter
driver.<o:p></o:p></span></p>
<p class=MsoNormal><span class=GramE><span style='font-size:10.0pt;font-family:
Symbol;mso-ascii-font-family:Verdana'>·</span><span style='font-size:10.0pt;
font-family:Verdana'><span style='mso-spacerun:yes'>  </span>The</span></span><span
style='font-size:10.0pt;font-family:Verdana'> .<span class=SpellE>inf</span>
file must install the class driver (<span class=SpellE>Kbdclass</span>) and the
port driver (i8042prt, <span class=SpellE>Kbdhid</span>, etc.) by using <span
class=SpellE>Keyboard.inf</span> and the INF directives &quot;Needs&quot; and
&quot;Include&quot;. <o:p></o:p></span></p>
<p class=MsoNormal><span class=GramE><span style='font-size:10.0pt;font-family:
Symbol;mso-ascii-font-family:Verdana'>·</span><span style='font-size:10.0pt;
font-family:Verdana'><span style='mso-spacerun:yes'>  </span>The</span></span><span
style='font-size:10.0pt;font-family:Verdana'> .<span class=SpellE>inf</span>
file must add the correct registry values for the class and port driver, as
well as using the new directives. <o:p></o:p></span></p>
<p><b><span style='font-size:10.0pt;font-family:Verdana'>To
install this filter, follow these steps:</span></b><span style='font-size:10.0pt;
font-family:Verdana'><o:p></o:p></span></p>
<ol start=1 type=1>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Open the <b>Device Manager</b>. <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Open the <b>Properties</b> of the PS/2 keyboard
installed on the system.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Click the <b>Driver</b> tab, and then click <b>Update
Driver</b>.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Click the <b>Browse my computer for drivers software</b></span>.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Click the <b>Let me pick from a list of device drivers on my computer</b></span>.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Click <b>Have Disk</b> and point to the location of
the .<span class=SpellE>inf</span> file.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Proceed through the rest of the install. You will
need to reboot the machine if you are filtering a PS/2 device.<o:p></o:p></span></li>
</ol>
<p><span style='font-size:10.0pt;font-family:Verdana'>To install this driver as
a class filter, you have to use registry APIs to directly update the registry
with an installer and reboot your machine.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'>Once
built, the sample produces <span class=SpellE>Kbfiltr.sys</span> and <span class=SpellE>Kbftest.exe</span>.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span
style='font-size:10.0pt;font-family:Verdana'>NULL INF file for Windows 2000:<o:p></o:p></span></b></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'>On
Windows 2000, you have to provide an INF file to install a NULL driver for the
RAW PDO enumerated by the filter driver for sideband communication from <span
class=SpellE>usermode</span>. Without this INF file, the raw PDO wouldnt get
started. On XP and later <span class=SpellE>OSes</span>, you dont need to
provide an INF. Here are steps for installing the NULL driver:<o:p></o:p></span></p>
<ol start=1 type=1>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo6;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Open the <span style='mso-bidi-font-weight:bold'>Device
Manager</span>. <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo6;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Select “Show Hidden Devices” in View Menu.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo6;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Find the <span class=SpellE>Keyboard_Filter_nnn</span>
device with a yellow “!” in “Other” class of devices. <span class=SpellE><span
class=GramE>nnn</span></span> stands for the instance number of the
device.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo6;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Double click on the device to open the properties.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo6;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Click the Driver tab, and then click Update Driver.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo6;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Follow the wizard's prompts, and when prompted, select
the <span style='mso-bidi-font-weight:bold'>Search for a suitable driver
for my device (recommended)</span> option, and then click <span
class=GramE><span style='mso-bidi-font-weight:bold'>Next</span></span>.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo6;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Select <span style='mso-bidi-font-weight:bold'>Specify
a location</span>, clear the other choices, and click <span class=GramE><span
style='mso-bidi-font-weight:bold'>Next</span></span><span
style='mso-bidi-font-weight:bold'>.</span> Point to the location of the <span
class=SpellE>sideband.inf</span> file.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo6;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Proceed through the rest of the install. <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo6;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>After install, you should see the Keyboard device
under “Sample Device” class in the device manager.<o:p></o:p></span></li>
</ol>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><u>File<span style='mso-tab-count:2'>           </span>Description<o:p></o:p></u></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>Kbfiltr.htm<span
style='mso-tab-count:1'>    </span>The documentation for this sample (this file)</pre><pre><span
class=SpellE>Kbfiltr.c</span><span style='mso-tab-count:1'>      </span>Hooks into the reporting chain, the initialization of a PS/2 keyboard, and the PS/2 keyboard ISR</pre><pre><span
class=SpellE>Kbfiltr.h</span><span style='mso-tab-count:1'>      </span>Definitions</pre><pre><span
class=SpellE>public.h</span><span style='mso-tab-count:1'>      </span>Shared definitions with the exe</pre><pre><span
class=SpellE>Kbfiltr.rc</span><span style='mso-tab-count:1'>     </span>Resources</pre><pre><span
class=SpellE>Kbfiltr.inx</span><span style='mso-tab-count:1'>    </span>Sample .<span
class=SpellE>inf</span> file </pre><pre><span
class=SpellE>Sideband.inf</span><span style='mso-spacerun:yes'>   </span>INF to install a NULL driver for the Raw PDO on Windows 2000</pre><pre><span
class=SpellE>Kbftest.c</span><span style='mso-tab-count:1'>    </span>Simple test application</pre><pre><span
class=SpellE>Makefile.inc</span><span style='mso-tab-count:1'> </span>A makefile that defines custom build actions. This includes the conversion of the .INX file into a .INF file</pre>
<pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<p align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:"Courier New"'><a href="#top"><span
style='font-family:Verdana'>Top of page</span></a></span><span
style='font-size:10.0pt;font-family:Verdana;mso-bidi-font-family:"Courier New"'>
<o:p></o:p></span></p>
<pre><o:p>&nbsp;</o:p></pre>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-padding-alt:0in 5.4pt 0in 5.4pt'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</td>
</tr>
</table>
<pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif";mso-bidi-font-family:"Courier New"'>©
Microsoft Corporation 1999</span><span style='font-size:10.0pt;font-family:
Verdana;mso-bidi-font-family:"Courier New"'> <o:p></o:p></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,699 +0,0 @@
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 12">
<meta name=Originator content="Microsoft Word 12">
<link rel=File-List href="Moufiltr_files/filelist.xml">
<title>Moufiltr</title>
<link rel=themeData href="Moufiltr_files/themedata.thmx">
<link rel=colorSchemeMapping href="Moufiltr_files/colorschememapping.xml">
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:TrackMoves>false</w:TrackMoves>
<w:TrackFormatting/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:DontVertAlignCellWithSp/>
<w:DontBreakConstrainedForcedTables/>
<w:DontVertAlignInTxbx/>
<w:Word11KerningPairs/>
<w:CachedColBalance/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="&#45;-"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="false"
DefSemiHidden="false" DefQFormat="false" LatentStyleCount="267">
<w:LsdException Locked="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
QFormat="true" Name="caption"/>
<w:LsdException Locked="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="99" Name="No List"/>
<w:LsdException Locked="false" Priority="99" SemiHidden="true"
Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" Priority="99" SemiHidden="true" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" QFormat="true"
Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" QFormat="true"
Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" QFormat="true"
Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" QFormat="true"
Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" QFormat="true"
Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" QFormat="true"
Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" SemiHidden="true"
UnhideWhenUsed="true" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-pitch:variable;
mso-font-signature:-1610611985 1107304683 0 0 159 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-1593833729 1073750107 16 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;
mso-font-charset:0;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:-1610611985 1073750091 0 0 159 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
color:black;}
h2
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"Heading 2 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;
font-weight:bold;}
h3
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"Heading 3 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;
font-weight:bold;}
h4
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"Heading 4 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:black;
font-weight:bold;}
a:link, span.MsoHyperlink
{mso-style-unhide:no;
color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-unhide:no;
color:purple;
text-decoration:underline;
text-underline:single;}
p
{mso-style-unhide:no;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
color:black;}
pre
{mso-style-unhide:no;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";
color:black;}
span.Heading2Char
{mso-style-name:"Heading 2 Char";
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 2";
mso-ansi-font-size:13.0pt;
mso-bidi-font-size:13.0pt;
font-family:"Cambria","serif";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;}
span.Heading3Char
{mso-style-name:"Heading 3 Char";
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 3";
mso-ansi-font-size:12.0pt;
mso-bidi-font-size:12.0pt;
font-family:"Cambria","serif";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;}
span.Heading4Char
{mso-style-name:"Heading 4 Char";
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 4";
mso-ansi-font-size:12.0pt;
mso-bidi-font-size:12.0pt;
font-family:"Cambria","serif";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;
font-style:italic;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
mso-ascii-font-family:Consolas;
mso-hansi-font-family:Consolas;
color:black;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
font-size:10.0pt;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:435291962;
mso-list-template-ids:-741705326;}
@list l0:level1
{mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1
{mso-list-id:950281396;
mso-list-template-ids:-189597544;}
@list l1:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l2
{mso-list-id:1292129342;
mso-list-template-ids:97144484;}
@list l3
{mso-list-id:1686593596;
mso-list-template-ids:1385997532;}
@list l3:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l3:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l3:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l3:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l3:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l3:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l3:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l3:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l3:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="3074"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple style='tab-interval:.5in'
leftmargin=8>
<div class=Section1>
<h2><a name=MYSAMPLE></a><span class=SpellE><span style='mso-bookmark:MYSAMPLE'><span
style='font-family:"Verdana","sans-serif";mso-fareast-font-family:"Times New Roman"'>Moufiltr</span></span></span><span
style='mso-bookmark:MYSAMPLE'></span><span style='font-family:"Verdana","sans-serif";
mso-fareast-font-family:"Times New Roman"'> <o:p></o:p></span></h2>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>SUMMARY<o:p></o:p></span></h3>
<h3><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
font-weight:normal;mso-bidi-font-weight:bold'>This sample is WDF version of WDM
filter driver sample. The WDM version of this sample has been deprecated.<o:p></o:p></span></h3>
<h3><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
font-weight:normal;mso-bidi-font-weight:bold'>This driver filters input for a
particular mouse on the system. In its current state, it only hooks into the
mouse packet report chain and the mouse ISR, and does not do any processing of
the data that it sees. (The hooking of the ISR is only available in the
i8042prt stack.) With additions to this current filter-only code base, the
filter could conceivably add, remove, or modify input as needed. </span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman";font-weight:normal;mso-bidi-font-weight:bold'><o:p></o:p></span></h3>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>Click the Free Build
Environment or Checked Build Environment icon under Development Kits program
group to set basic environment variables. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Change to the directory
containing the device source code, such as CD <span class=SpellE>src\input</span>\moufiltr.
<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Run <b>build -<span
class=SpellE>ceZ</span>,</b> or use the macro <b>BLD</b>. This command invokes
the Microsoft make routines to build the components. If the build </span>s<span
style='font-size:10.0pt;font-family:Verdana'>ucceeds, you will find the driver,
<span class=SpellE>moufiltr.sys,</span>
in the binary output directory specified for the build environment. You can get the output path from the buildxxx.log file. If it fails you can find errors and warnings in the <span class=SpellE>buildxxx.err</span>
and <span class=SpellE>buildxxx.wrn</span> respectively, where xxx is <span
class=SpellE>either</span> <span class=SpellE>chk</span> or <span class=SpellE>fre</span>
depending on the build environment. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>INSTALLATION<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>
Copy the KMDF coinstaller (wdfcoinstallerMMmmm.dll), driver binary and the moufiltr.inf file to a floppy disk or a temp folder. </span></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>This
sample is installed via an .<span class=SpellE>inf</span> file. The .<span
class=SpellE>inf</span> file included in this sample is designed to filter a
PS/2 mouse. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Use the
following rules regarding the .<span class=SpellE>inf</span> file that installs
the filter driver.<o:p></o:p></span></p>
<ul type=disc>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l3 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>The .<span class=SpellE>inf</span> file
must install the class driver (<span class=SpellE>Mouclass</span>) and the
port driver (i8042prt, <span class=SpellE>Mouhid</span>, <span
class=SpellE>Sermouse</span>, etc.) by using Msmouse.inf and the INF
directives &quot;Needs&quot; and &quot;Include&quot;.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l3 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>The .<span class=SpellE>inf</span>
file must add the correct registry values for the class and port driver,
as well as using the new directives.<o:p></o:p></span></li>
</ul>
<p><b><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>To
install this filter, follow these steps:<o:p></o:p></span></b></p>
<ol start=1 type=1>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Open the <b>Device Manager</b>. <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Open the <b>Properties</b> of the PS/2 mouse
installed on the system.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Click the <b>Driver</b> tab, and then click <b>Update
Driver</b>.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Click the <b>Browse my computer for drivers software</b></span>.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Click the <b>Let me pick from a list of device drivers on my computer</b></span>.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Click <b>Have Disk</b> and point to the location of
the .<span class=SpellE>inf</span> file.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Proceed through the rest of the install. You will
need to reboot the machine if you are filtering a PS/2 device.<o:p></o:p></span></li>
</ol>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>File Manifest<o:p></o:p></span></h4>
<pre><u>File<span style='mso-tab-count:2'>           </span>Description<o:p></o:p></u></pre><pre><o:p>&nbsp;</o:p></pre><pre>Moufiltr.htm<span
style='mso-tab-count:1'>   </span>The documentation for this sample (this file).</pre>
<pre><span class=SpellE>Moufiltr.c</span><span style='mso-tab-count:1'>     </span>Hooks into the reporting chain, the initialization of a PS/2 mouse, and the PS/2 ISR</pre>
<pre><span class=SpellE>Moufiltr.h</span><span style='mso-tab-count:1'>     </span>Definitions</pre>
<pre><span class=SpellE>Moufiltr.rc</span><span style='mso-tab-count:1'>    </span>Resources</pre>
<pre>Moufiltr.inx<span style='mso-tab-count:1'>   </span>Sample .<span class=SpellE>inx</span> file </pre>
<pre><span class=SpellE>Makefile.inc</span><span style='mso-tab-count:1'> </span>A makefile that defines custom build actions. This includes the conversion of the .INX file into a .INF file</pre>
<pre><o:p>&nbsp;</o:p></pre>
<p align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:"Courier New"'><a href="#top"><span
style='font-family:"Verdana","sans-serif"'>Top of page</span></a></span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family:
"Courier New"'> <o:p></o:p></span></p>
<pre><o:p>&nbsp;</o:p></pre>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-yfti-tbllook:1184;mso-padding-alt:
0in 5.4pt 0in 5.4pt'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</td>
</tr>
</table>
<pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif","serif";mso-bidi-font-family:
"Courier New"'>© 2004 Microsoft Corporation</span><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";mso-bidi-font-family:"Courier New"'><o:p></o:p></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,345 +0,0 @@
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="bindview_files/filelist.xml">
<title>BINDVIEW: Network Configuration/Installation Sample</title>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
h1
{mso-style-next:Normal;
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
page-break-after:avoid;
mso-outline-level:1;
font-size:10.0pt;
font-family:Verdana;
mso-font-kerning:0pt;
font-weight:bold;}
h2
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman";
font-weight:bold;}
h3
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman";
font-weight:bold;}
h4
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman";
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Courier New";}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:149904795;
mso-list-type:hybrid;
mso-list-template-ids:2069783722 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1
{mso-list-id:1493059929;
mso-list-template-ids:703913330;}
@list l1:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l1:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:"Courier New";
mso-bidi-font-family:"Times New Roman";}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
</head>
<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
<div class=Section1>
<h2><a name="_top"></a><span style='font-family:Verdana'>BINDVIEW: Network
Configuration/Installation Sample<o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>SUMMARY<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>This sample demonstrates
how to use <span class=SpellE>INetCfg</span> APIs to enumerate, install,
uninstall, bind and unbind network components.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The sample compiles
properly for 64-bit systems and builds properly with Microsoft® Visual C® 6.0. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>To build the sample, <span
class=GramE>type <b>build</b></span>. This command produces the binary
bindview.exe.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>INSTALLING THE SAMPLE<o:p></o:p></span></h3>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'>Copy the
binary bindview.exe to the directory from which you want to run the sample. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>RUNNING THE SAMPLE<o:p></o:p></span></h3>
<p class=MsoNormal><span class=GramE><span style='font-size:10.0pt;font-family:
Verdana'>Type bindview.exe at the command prompt to run the program.</span></span><span
style='font-size:10.0pt;font-family:Verdana'> You can perform the following
operations.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'><o:p>&nbsp;</o:p></span></p>
<ul style='margin-top:0in' type=disc>
<li class=MsoNormal style='mso-list:l0 level1 lfo3;tab-stops:list .5in'><span
style='font-size:10.0pt;font-family:Verdana'>Install a network protocol,
service or client component.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-list:l0 level1 lfo3;tab-stops:list .5in'><span
style='font-size:10.0pt;font-family:Verdana'>Uninstall a network protocol,
service or client component.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-list:l0 level1 lfo3;tab-stops:list .5in'><span
style='font-size:10.0pt;font-family:Verdana'>By clicking the right mouse
button on a network protocol, service or client, you can perform the
following operations.<o:p></o:p></span></li>
<ul style='margin-top:0in' type=circle>
<li class=MsoNormal style='mso-list:l0 level2 lfo3;tab-stops:list 1.0in'><span
style='font-size:10.0pt;font-family:Verdana'>Bind the network component
to another component.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-list:l0 level2 lfo3;tab-stops:list 1.0in'><span
style='font-size:10.0pt;font-family:Verdana'>Unbind the network component
from another component that is bound to it.<o:p></o:p></span></li>
</ul>
<li class=MsoNormal style='mso-list:l0 level1 lfo3;tab-stops:list .5in'><span
style='font-size:10.0pt;font-family:Verdana'>By clicking the right mouse
button on a binding path, you can perform the following operations.<o:p></o:p></span></li>
<ul style='margin-top:0in' type=circle>
<li class=MsoNormal style='mso-list:l0 level2 lfo3;tab-stops:list 1.0in'><span
style='font-size:10.0pt;font-family:Verdana'>Disable the binding path if
it is enabled.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-list:l0 level2 lfo3;tab-stops:list 1.0in'><span
style='font-size:10.0pt;font-family:Verdana'>Enable the binding path if
it is disabled.<o:p></o:p></span></li>
</ul>
<li class=MsoNormal style='mso-list:l0 level1 lfo3;tab-stops:list .5in'><span
style='font-size:10.0pt;font-family:Verdana'>Save the binding information
to a file.<o:p></o:p></span></li>
</ul>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><u>File<span style='mso-tab-count:2'>           </span>Description<o:p></o:p></u></pre><pre><span
style='text-transform:uppercase'>BINDVIEW.CPP</span><span style='mso-tab-count:
1'>   </span>Contains <span class=SpellE>WinMain</span> and dialog box related functions.</pre><pre><span
style='text-transform:uppercase'>NetCfgAPI.cpp</span><span style='mso-tab-count:
1'>  </span>Contains <span class=SpellE>INetCfg</span> functions.</pre><pre>BINDING.CPP<span
style='mso-tab-count:1'>    </span>Contains binding path related functions. </pre><pre><span
style='text-transform:uppercase'>Component.cpp</span><span style='mso-tab-count:
1'>  </span>Contains network component related functions.</pre><pre><span
class=GramE>RESOURCE.H<span style='mso-tab-count:1'>     </span>Resource header.</span></pre><pre>BINDVIEW.H<span
style='mso-tab-count:1'>     </span>Contains function prototypes.</pre><pre><span
style='text-transform:uppercase'>NetCfgAPI.h</span><span style='mso-tab-count:
1'>    </span>Contains function prototypes for <span class=SpellE>NetCfgAPI.cpp</span></pre><pre><span
style='text-transform:uppercase'>BindView.rc</span><span style='mso-tab-count:
1'>    </span>Resources for <span class=SpellE>Bindview</span></pre><pre><span
class=GramE><span style='text-transform:uppercase'>BindView.ico</span><span
style='mso-tab-count:1'>   </span>Icon for the sample.</span></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<p align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
href="#_top"><span style='font-size:10.0pt;font-family:Verdana'>Top of page</span></a><span
style='font-size:10.0pt;font-family:Verdana'> <o:p></o:p></span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-padding-alt:0in 0in 0in 0in'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</td>
</tr>
</table>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif"'>© 2004</span><span
style='font-size:10.0pt;font-family:Verdana'> </span><span style='font-size:
7.5pt;font-family:"MS Sans Serif"'>Microsoft Corporation </span><span
style='font-size:10.0pt;font-family:Verdana'><o:p></o:p></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,926 +0,0 @@
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 12">
<meta name=Originator content="Microsoft Word 12">
<title>UNIMODEM sample controller-less modem driver (fakemodem)</title>
<link rel=themeData href="fakemodem_files/themedata.thmx">
<link rel=colorSchemeMapping href="fakemodem_files/colorschememapping.xml">
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:TrackMoves>false</w:TrackMoves>
<w:TrackFormatting/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:DontVertAlignCellWithSp/>
<w:DontBreakConstrainedForcedTables/>
<w:DontVertAlignInTxbx/>
<w:Word11KerningPairs/>
<w:CachedColBalance/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="&#45;-"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="false"
DefSemiHidden="false" DefQFormat="false" LatentStyleCount="267">
<w:LsdException Locked="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
QFormat="true" Name="caption"/>
<w:LsdException Locked="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="99" Name="No List"/>
<w:LsdException Locked="false" Priority="99" SemiHidden="true"
Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" Priority="99" SemiHidden="true" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" QFormat="true"
Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" QFormat="true"
Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" QFormat="true"
Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" QFormat="true"
Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" QFormat="true"
Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" QFormat="true"
Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" SemiHidden="true"
UnhideWhenUsed="true" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Courier;
panose-1:2 7 4 9 2 2 5 2 4 4;
mso-font-charset:0;
mso-generic-font-family:modern;
mso-font-format:other;
mso-font-pitch:fixed;
mso-font-signature:3 0 0 0 1 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-pitch:variable;
mso-font-signature:-1610611985 1107304683 0 0 415 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-1593833729 1073750107 16 0 415 0;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;
mso-font-charset:0;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:-520092929 1073806591 9 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";}
h2
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"Heading 2 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
font-weight:bold;}
h3
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"Heading 3 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
font-weight:bold;}
h4
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"Heading 4 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
font-weight:bold;}
p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
{mso-style-unhide:no;
mso-style-link:"Body Text Char";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Verdana","sans-serif";
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{mso-style-unhide:no;
color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-unhide:no;
color:blue;
text-decoration:underline;
text-underline:single;}
p
{mso-style-unhide:no;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";}
pre
{mso-style-unhide:no;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Courier New";}
span.Heading2Char
{mso-style-name:"Heading 2 Char";
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 2";
mso-ansi-font-size:13.0pt;
mso-bidi-font-size:13.0pt;
font-family:"Cambria","serif";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;}
span.Heading3Char
{mso-style-name:"Heading 3 Char";
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 3";
mso-ansi-font-size:12.0pt;
mso-bidi-font-size:12.0pt;
font-family:"Cambria","serif";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;}
span.Heading4Char
{mso-style-name:"Heading 4 Char";
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 4";
mso-ansi-font-size:12.0pt;
mso-bidi-font-size:12.0pt;
font-family:"Cambria","serif";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;
font-style:italic;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
mso-ascii-font-family:Consolas;
mso-hansi-font-family:Consolas;
mso-bidi-font-family:Consolas;}
span.BodyTextChar
{mso-style-name:"Body Text Char";
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Body Text";
mso-ansi-font-size:12.0pt;
mso-bidi-font-size:12.0pt;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
font-size:10.0pt;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:163253770;
mso-list-template-ids:-2134855758;}
@list l1
{mso-list-id:858737299;
mso-list-template-ids:1400259370;}
@list l1:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l1:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2
{mso-list-id:901331311;
mso-list-template-ids:1335414366;}
@list l2:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l2:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l3
{mso-list-id:997000269;
mso-list-template-ids:-2143639650;}
@list l3:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l4
{mso-list-id:1679889404;
mso-list-template-ids:-1428945010;}
@list l4:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l5
{mso-list-id:1736706262;
mso-list-type:hybrid;
mso-list-template-ids:1974731216 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l5:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l5:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l5:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l5:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l5:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l5:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l5:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l5:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l5:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
<div class=Section1>
<h2><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>UNIMODEM sample controller-less modem driver (<span
class=SpellE>Fakemodem</span>)<o:p></o:p></span></h2>
<h3 style='tab-stops:120.0pt'><span style='font-family:"Verdana","sans-serif";
mso-fareast-font-family:"Times New Roman"'>SUMMARY<span style='mso-tab-count:
1'>          </span><o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>This
sample demonstrates a simple controller-less modem driver. <span class=GramE>This
driver supports sending and receiving AT commands using the <span class=SpellE>ReadFile</span>/<span
class=SpellE>WriteFile</span> calls or via a TAPI interface using an
application such as HyperTerminal.</span><o:p></o:p></span></p>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'>Click
the Free Build Environment or Checked Build Environment icon under Development
Kits program group to set basic environment variables. <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'>Change
to the directory containing the device source code, such as CD <span
class=SpellE>src</span>\<span class=SpellE>wdf</span>\<span class=SpellE>fakemodem</span>.
<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'>Run <b>build
-<span class=SpellE>ceZ</span>,</b> or use the macro <b>BLD</b>. This command
invokes the Microsoft make routines to build the components. If the build </span><span
style='color:black'>s</span><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'>ucceeds, you will find the driver, fakemodem.sys, </span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>placed in a platform
specific <span style='color:black'>subdirectory
<b style='mso-bidi-font-weight:
normal'><span class=SpellE>src</span>\network\modem\<span class=SpellE>fakemodem</span></b></span><b
style='mso-bidi-font-weight:normal'>\<span class=GramE><span style='mso-bidi-font-weight:
bold'>$(</span></span><span style='mso-bidi-font-weight:bold'>OBJ_PATH)\$O</span></b><span
style='color:black'>. If it fails you can find errors and warnings in the
buildxxx.err and buildxxx.err respectively, where xxx is either <span
class=SpellE>chk</span> or <span class=SpellE>fre</span> depending on the build
environment. <o:p></o:p></span></span></p>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>INSTALLATION<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Verdana","sans-serif"'>To
install and test this driver, you do not need any real hardware. You can
install this driver either using Devcon.exe (<span class=SpellE>ddk</span>\tools\<span
class=SpellE>devcon</span>) utility from the DDK or using toaster bus driver
sample. <o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'>To install the bus driver on Windows XP and Windows Server 2003: <o:p></o:p></span></p>
<ul type=disc>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:"Verdana","sans-serif"'>Double-click the Add Hardware
wizard in Control Panel. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:"Verdana","sans-serif"'>At the 'Welcome to the Add
Hardware Wizard', click Next. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:"Verdana","sans-serif"'>Select 'Yes, I have already
connected the hardware', then click Next. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:"Verdana","sans-serif"'>Select Add a new hardware
device from the list, then click Next. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:"Verdana","sans-serif"'>Select Install the hardware
that I manually select from a list(Advanced),' and then click next. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:"Verdana","sans-serif"'>Select Modems, then click
Next. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:"Verdana","sans-serif"'>Check the box which says
&quot;Don't detect my modems; I will select it from a list.&quot;, then
click Next. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:"Verdana","sans-serif"'>Click 'Have Disk', make sure
that 'A:\' is in the &quot;Copy manufacturer's files from:&quot; box, and
click OK. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:"Verdana","sans-serif"'>Click on the desired entry, and
then click Next. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:"Verdana","sans-serif"'>At 'The wizard is ready to
install your hardware', click Next. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:"Verdana","sans-serif"'>Click Finish at 'Completing the
Add/Remove Hardware Wizard.' <o:p></o:p></span></li>
</ul>
<p><b style='mso-bidi-font-weight:normal'><span style='font-size:10.0pt;
mso-bidi-font-size:12.0pt;font-family:"Verdana","sans-serif"'>To install the
driver using toaster bus:<o:p></o:p></span></b></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l5 level1 lfo5;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:Symbol;
mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:"Verdana","sans-serif"'>Install the toaster bus driver.
Information on how to install the toaster bus driver is given in <span
class=SpellE>src</span>\general\toaster\toaster.htm readme file.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l5 level1 lfo5;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:Symbol;
mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:"Verdana","sans-serif"'>Run the notify.exe (<span
class=SpellE>src</span>\general\toaster\exe\notify) and choose Plug In a device
in the Bus menu.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l5 level1 lfo5;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:Symbol;
mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:"Verdana","sans-serif"'>In the plug in dialog, specify
{b85b7c50-6a01-11d2-b841-00c04fad5171}\<span class=SpellE>fakemodem</span> as
the Hardware Id and click okay.<o:p></o:p></span></p>
<p style='margin-left:.25in'><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:"Verdana","sans-serif"'>The bus driver will enumerate a
device with the hardware id provided by the application. At this point:<o:p></o:p></span></p>
<p><b><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>On
Windows XP and later:</span></b><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p></o:p></span></p>
<ul type=disc>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>&quot;Found New Hardware Wizard&quot;
dialog box will appear. Here select the radio button labeled &quot;Install
from a list of specific location (Advanced)&quot; and then hit the
&quot;Next&quot; button. <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>In the following screen select the
radio button labeled &quot; Search the best driver in these
locations&quot; and then select &quot;Include this location in the search
path&quot; and specify the target media or the directory where the KMDF
coinstaller (wdfcoinstallerMMmmm.dll), INF and SYS files are copied and
then hit the &quot;Next&quot; button. <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>The system will scan the directory and
pick up the matching INF and start the installation. You will get a
Hardware Installation Warning dialog stating that your driver has not
passed Windows Logo Testing. Hit &quot;Continue Anyway&quot; button. <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>The system will copy the driver, INF
file, load the driver and start the device. If every thing goes fine, you
will get &quot;Completing the Found New Hardware Wizard&quot;. Hit the
&quot;Finish&quot; button and the installation is complete. <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>You should be able to see the device
in the Device manager under &quot;Modems&quot; <o:p></o:p></span></li>
</ul>
<p><b><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>On
Windows 2000:</span></b><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p></o:p></span></p>
<ul type=disc>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo9;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>&quot;Found New Hardware Wizard&quot;
dialog box will appear with the description of the device. Here click
&quot;Next&quot; button. <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo9;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>In the following screen &quot;Install
Hardware Device Driver&quot;, select the radio button labeled &quot;Display
a list of known drivers for this device...&quot; and then click
&quot;Next&quot; button. <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo9;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>In the following dialog on
&quot;Hardware Type&quot;, select &quot;Other Devices&quot; from the list
and click &quot;Next&quot;. <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo9;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>In the dialog on &quot;Select a Device
Driver&quot;, click on &quot;Have Disk&quot;. <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo9;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>Specify the target media or the
directory where the KMDF coinstaller (wdfcoinstallerMMmmm.dll), INF and
SYS files are copied and then hit the &quot;Okay&quot; button. <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo9;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>Select &quot;OSR&quot; in the
Manufacture section selection and click &quot;Next&quot;. <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo9;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>Click &quot;Next&quot; on the
&quot;Start Device Driver Installation&quot; dialog. <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo9;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>Click Finish at 'Completing the
Add/Remove Hardware Wizard.' <o:p></o:p></span></li>
</ul>
<p><span class=GramE><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;
font-family:"Verdana","sans-serif"'>Note that if you get a warning dialog with
regards to Windows Logo, or unsigned drivers, testing then click on <b>continue</b>.</span></span><span
style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Verdana","sans-serif"'><o:p></o:p></span></p>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>USAGE<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Verdana","sans-serif"'>Once
installed, you can talk to the <span class=SpellE>fakemodem</span> driver
through HyperTerminal, or via <span class=SpellE>ReadFile</span>/<span
class=SpellE>WriteFile</span> calls.<span style='mso-spacerun:yes'>  </span>The
AT command set supported by <span class=SpellE>fakemodem</span> includes:<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Verdana","sans-serif"'><span
style='mso-tab-count:1'>          </span><b>AT</b><span style='mso-tab-count:
3'>                         </span>returns <b>OK</b><br>
<br>
<span style='mso-tab-count:1'>          </span><b>ATA</b><span
style='mso-tab-count:3'>                       </span>returns <b>CONNECT<o:p></o:p></b></span></p>
<p><b><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Verdana","sans-serif"'><span
style='mso-tab-count:1'>            </span>ATD</span></b><span
style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Verdana","sans-serif"'>&lt;number&gt;<span
style='mso-tab-count:2'>                  </span>returns <b>CONNECT</b><o:p></o:p></span></p>
<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-family:"Verdana","sans-serif";mso-fareast-font-family:"Times New Roman"'>CODE
TOUR<o:p></o:p></span></h3>
<h4 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-family:"Verdana","sans-serif";mso-fareast-font-family:"Times New Roman"'>File
Manifest<o:p></o:p></span></h4>
<pre><u><span style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'>File</span></u><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><span
style='mso-tab-count:2'>           </span><u>Description<o:p></o:p></u></span></pre><pre><span
class=SpellE><span class=GramE><b><span style='font-size:9.0pt;mso-bidi-font-size:
7.5pt;font-family:Courier'>readwrit.c</span></b></span></span><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><span
style='mso-tab-count:1'>    </span>Routines for receiving and sending text. This includes processing AT commands.<o:p></o:p></span></pre><pre><span
class=SpellE><b><span style='font-size:9.0pt;mso-bidi-font-size:7.5pt;
font-family:Courier'>Driver.c</span></b></span><span style='font-size:9.0pt;
mso-bidi-font-size:7.5pt;font-family:Courier'><span style='mso-tab-count:2'>              </span><span
class=SpellE>Fakemodem</span> driver initialization entry points and for handling <span
class=GramE>Plug</span> &amp; Play events.<o:p></o:p></span></pre><pre><span
class=SpellE><span class=GramE><b><span style='font-size:9.0pt;mso-bidi-font-size:
7.5pt;font-family:Courier'>ioctl.c</span></b></span></span><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><span
style='mso-tab-count:2'>               </span>Routines to handle IOCTL messages.<o:p></o:p></span></pre><pre><span
class=GramE><b><span style='font-size:9.0pt;mso-bidi-font-size:7.5pt;
font-family:Courier'>mdmfake.inf</span></b></span><span style='font-size:9.0pt;
mso-bidi-font-size:7.5pt;font-family:Courier'><span style='mso-tab-count:1'>   </span>INF file for installing the <span
class=SpellE>fakemodem</span> driver<o:p></o:p></span></pre>
<p align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><a href="#top">Top
of page</a> <o:p></o:p></span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-yfti-tbllook:1184;mso-padding-alt:
0in 0in 0in 0in'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</td>
</tr>
</table>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif","serif"'>© Microsoft
Corporation 2000</span><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>
<o:p></o:p></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,152 +0,0 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>NDISLWF</title>
</head>
<body>
<h1>NDISLWF.SYS - Sample NDIS 6.0 Filter Driver</h1>
<p>Note: the sample driver contains some extra code for demonstration purposes.
You should remove unneeded optional sections from a production driver.</p>
<h2>SUMMARY</h2>
<h3>Ndislwf NDIS 6.0 Filter Driver</h3>
<p>The Ndislwf sample is currently a do-nothing pass-through NDIS 6 filter
driver that demonstrates the basic principles underlying an NDIS 6.0 Filter
driver. The sample is a replacement of NDIS 5 Sample Intermediate
Driver (Passthru driver).</p>
<p>Although the filter driver is a Modifying filter driver, the filter driver
currently doesnt modify any packets and it only re-packages and sends down all
OID requests. You may easily update this filter driver to change packets
before passing them along. Or you may use the filter to originate new packets
to send or receive. For example, the filter could encrypt/compress outgoing and
decrypt/decompress incoming data.</p>
<h2>BUILDING THE SAMPLE</h2>
<p>Run the <b>build</b> command from this directory to build the
sample&mdash;it creates the binary Ndislwf.sys.</p>
<p>To install this driver on Windows Vista (or above), use netlwf.INF also
found in this DDK.</p>
<h2>INSTALLING THE SAMPLE</h2>
<p>Ndislwf is installed as a service (called “NDIS Sample LightWeight Filter”
in the supplied INF). To install, follow the steps below:</p>
<ol>
<li>Prepare a an installation directory that contains these files: netlwf.inf
and ndislwf.sys.</li>
<li>On the desktop, click <b>Start</b>, then open <b>Control Panel</b>, then
open <b>Network and Internet Connections</b>, then open <b>Network
Connections</b>, then right-click on the relevant Local Area Connection icon
and choose <b>Properties</b>.</li>
<li>Click <b>Install</b>, then <b>Service</b>, then <b>Add</b>, then <b>Have
Disk</b>.</li>
<li>Browse to the drive/directory containing the files listed above. Click
<b>OK</b>. This should show “NDIS Sample LightWeight Filter” in a list of
Network Services. Highlight this and click <b>OK</b>. This should install the
Ndislwf filter driver.</li>
<li>Click <b>OK</b> or <b>Yes</b> each time if the system prompts with a warning
regarding installation of unsigned files. This is necessary because binaries
generated via the LDK build environment are not signed.</li>
</ol>
<h2>CODE TOUR</h2>
<h3>File Manifest</h3>
<table>
<tr><td><u>File</u></td><td><u>Description</u></td></tr>
<tr><td>makefile</td><td>Used during compilation to create the object and sys
files</td></tr>
<tr><td>filter.c</td><td>Filter driver entry points and related functions in
the Ndislwf filter driver</td></tr>
<tr><td>netlwf.inf</td><td>Installation INF for the service</td></tr>
<tr><td>device.c</td><td>Virtual device related routines such as registering a
device and handling IOCTLs</td></tr>
<tr><td>filter.h</td><td>Prototypes of all functions and data structures used
by the Ndislwf driver</td></tr>
<tr><td>filter.htm</td><td>Documentation for the filter driver (this
file)</td></tr>
<tr><td>filter.rc</td><td>Resource file for the Ndislwf driver</td></tr>
<tr><td>precomp.h</td><td>Precompile header file</td></tr>
<tr><td>flt_dbg.c</td><td>Debug-related code</td></tr>
<tr><td>flt_dbg.h</td><td>Debug code definitions and structures</td></tr>
<tr><td>sources</td><td>List of source files that are compiled and linked to
create the ndislwf driver.</td></tr>
</table>
<h3>Programming Tour</h3>
<p>Basic steps in attaching and detaching of Ndislwf driver:</p>
<ol>
<li>During DriverEntry, the ndislwf driver registers as a NDIS 6 filter
driver.</li>
<li>Later on, NDIS calls Ndislwf FilterAttach handler, for each underlying NDIS
adapter on which it is configured to attach.</li>
<li>In the context of FilterAttach Handler, filter driver call NdisFAttribute
to register its filter module context with NDIS. After that, filter driver can
read its own setting in registry by calling NdisOpenConfigurationEx, and calls
NdisXXX functions.</li>
<li>After FilterAttach successfully returns, NDIS restarts the filter later by
calling FilterRestart handler. FilterRestart should prepare to handle
send/receive data. After restart return successfully, filter driver should be
able to process send/receive.</li>
<li>All requests and sends coming from overlying drivers for the Ndislwf filter
driver are repackaged if necessary and sent down to NDIS, to be passed to the
underlying NDIS driver.</li>
<li>All indications arriving from an underlying NDIS driver are forwarded up by
Ndislwf filter driver.</li>
<li>NDIS call FilterPause handler when NDIS needs to detach the filter from the
stack or there is some configuration changes in the stack. In processing the
pause request from NDIS, the Ndislwf driver waits for all its own outstanding
requests to be completed before it completes the pause request.</li>
<li>NDIS calls the Ndislwf drivers FilterDetach entry point when NDIS needs to
detach a filter module from NDIS stack. FilterDetach handler should free all
the memory allocation done in FilterAttach, and undo the operations it did in
FilterAttach Handler.</li>
</ol>
<p>&copy; Microsoft Corporation</p>
</body>
</html>

Просмотреть файл

@ -1,617 +0,0 @@
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="mux2_files/filelist.xml">
<title>MUX Intermediate Miniport Driver Help</title>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PlaceName"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PlaceType"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]--><!--[if !mso]><object
classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></object>
<style>
st1\:*{behavior:url(#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-alt:Tahoma;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:Arial;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-format:other;
mso-font-pitch:variable;
mso-font-signature:3 0 0 0 1 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:black;}
h2
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman";
color:black;
font-weight:bold;}
h3
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman";
color:black;
font-weight:bold;}
h4
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman";
color:black;
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:black;}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Courier New";
color:black;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
<meta name=Template content="C:\Program Files\Microsoft Office\Office\html.dot">
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="8194"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple style='tab-interval:.5in'>
<div class=Section1>
<h2><a name=MYSAMPLE><span style='font-family:Verdana'>MUX.SYS - Sample NDIS
MUX Intermediate Driver</span></a><span style='font-family:Verdana'><o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>SUMMARY<o:p></o:p></span></h3>
<p><st1:place w:st="on"><st1:PlaceName w:st="on"><b><span style='font-family:
Verdana'>MUX</span></b></st1:PlaceName><b><span style='font-family:Verdana'> <st1:PlaceName
w:st="on">Intermediate</st1:PlaceName> <st1:PlaceType w:st="on">Miniport</st1:PlaceType></span></b></st1:place><b><span
style='font-family:Verdana'> Driver<o:p></o:p></span></b></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The MUX Intermediate
Miniport (IM) driver is an NDIS 6.0 driver that demonstrates the operation of
an “N<span class=GramE>:1</span>” MUX driver, i.e. one which creates multiple
virtual network devices on top of a single lower adapter. Protocols bind to
these virtual adapters as if they are real adapters. Examples of <st1:place
w:st="on"><st1:PlaceName w:st="on">Intermediate</st1:PlaceName> <st1:PlaceType
w:st="on">Miniport</st1:PlaceType></st1:place> drivers that can use this
framework are Virtual LAN (VLAN) drivers.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>This sample implements
IEEE 802.1Q VLAN tagging, which is enabled by changing the default VLAN ID to a
non-zero valid value (see “Configuring VLANs” below).<o:p></o:p></span></p>
<p><b><span style='mso-bidi-font-size:10.0pt;font-family:Verdana'>Operation<o:p></o:p></span></b></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The driver binds to
Ethernet (NdisMedium802_3) adapters as a protocol, and exposes one or more
virtual Ethernet devices over each lower adapter, based on its configuration.
The term “VELAN” is used to denote a Virtual Ethernet LAN adapter implemented
by this driver.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>When it binds to a lower
adapter, MUX reads the standard “UpperBind” key to obtain a list of VELANs
configured over this adapter. For each such VELAN, it calls <span class=GramE>NdisIMInitializeDeviceInstanceEx(</span>)
to instantiate the NDIS miniport for the VELAN. NDIS then calls the drivers
MiniportInitialize (<i>MPInitialize</i>) routine to start the VELAN miniport.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The MUX driver supports
configuring the MAC address for each VELAN miniport using the standard
“NetworkAddress” key that it reads from its MiniportInitialize routine. If this
is not configured, it computes a “locally significant” MAC address for the
VELAN using the MAC address of the lower adapter. The MUX driver sets its lower
adapter to promiscuous mode in order to be able to receive frames directed to
any of the VELAN MAC addresses. <span class=GramE>However it does implement
packet-filtering (and multicast address filtering) logic for all its VELAN
miniports so that it only passes up relevant frames on each VELAN.</span> This
aspect of the driver may be modified if, for example, your driver design uses
the same MAC address as that of the lower adapter on all VELANs. With such a
modification, it is not required to set the lower adapter to promiscuous mode
and incur the costs of receiving all packets on the network.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>It supports dynamic
addition and deletion of VELANs in conjunction with <span class=GramE>its</span>
notify object (related sample). If a VELAN is deleted, the virtual device
corresponding to the VELAN is stopped and removed, which in turn results in
NDIS halting the miniport instance for the VELAN (see <i>MPHalt</i>). If a
VELAN is added, NDIS sends a global reconfiguration event to the protocol edge
of this driver. The handler function for this event, PtPNPHandler, goes through
all lower adapters to see if any new VELANs have been added, i.e. if any of the
“UpperBind” keys have been modified.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Since the driver
implements a virtual device, it does not simply pass through most NDIS
queries/sets. It keeps its own device view that is reflected in its responses
to queries/sets. However it does pass through queries/sets for certain OIDs
that are best handled by the lower adapter driver. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The driver supports Power
Management in the sense that it allows Wake-On-LAN and related functionality,
if supported by the lower adapter, to continue to function. It does so by
appropriately forwarding OID_PNP_XXX queries/sets to the lower adapter. <o:p></o:p></span></p>
<p><b style='mso-bidi-font-weight:normal'><span style='font-family:Verdana'>IEEE
802.1Q VLAN Operation<o:p></o:p></span></b></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The driver supports
configuring a VLAN ID on each VELAN. It then inserts a tag header containing
this VLAN ID on all outgoing frames. For incoming frames that contain a tag
header, it verifies that a matching VLAN ID is present before indicating it up
to protocols. It removes the tag header, if present, from all indicated frames.
In all cases, received frames that do not contain tag headers are always handed
up to protocols.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>With the default
configured VLAN ID of zero, the driver does not insert tag header information
on sent packets, except for sent packets that contain non-zero Ieee8021QInfo
per-packet information, for which the driver does insert corresponding tag
headers. Receive-side filtering on VLAN ID is enabled only with a non-zero
configured VLAN ID, in which case only received frames containing a matching
VLAN ID are passed up. With the default configured VLAN ID of zero, the driver
does not check the VLAN ID on received frames.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>Run the <b>build</b>
command from this directory to build the sample—it creates the binary mux.sys.
To disable IEEE VLAN support, comment out the following line in the sources
file before building:<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>C_DEFINES=$(C_DEFINES)
–DIEEE_VLAN_SUPPORT=1<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>To install this driver on
Windows® codename Whistler, use the MUX sample notification object and INFs,
also found in this DDK.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>INSTALLING THE SAMPLE<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>MUX is installed as a
protocol (called “Sample <span class=SpellE>Mux</span>-IM Protocol Driver” in
the supplied INFs/notification object). To install, follow the steps below.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Prepare a floppy disk (or
installation directory) that contains these files: <span class=SpellE>muxp.inf</span>,
<span class=SpellE>mux_mp.inf</span>, mux.sys and mux.dll (notification object
DLL, built in this DDK at network\<span class=SpellE>ndis\mux\notifyob</span>).<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>On the desktop,
right-click the <b>My Network Places</b> icon and choose <b>Properties</b>. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Right-click on the
relevant Local Area Connection icon and choose <b>Properties</b>. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Click <b>Install</b>,
then <b>Protocol</b>, then <b>Add</b>, <span class=GramE>then</span> <b>Have
Disk</b>. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Browse to the
drive/directory containing the files listed above. Click <b>OK</b>. This should
show “Sample <span class=SpellE>Mux</span>-IM Protocol Driver” in a list of
Network Protocols. Highlight this and click <b>OK</b>. This should install the
MUX driver. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Click <b>OK</b> or <span
class=GramE><b>Yes</b></span> each time the system prompts with a warning
regarding installation of unsigned files. This is necessary because binaries
generated via the DDK build environment are not signed.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Two .INF files are needed
rather than one because MUX is installed both as a protocol and a miniport.<o:p></o:p></span></p>
<p><b style='mso-bidi-font-weight:normal'><span style='font-family:Verdana'>Configuring
VLANs<o:p></o:p></span></b></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The VLAN ID for each
VELAN (virtual miniport) can be configured as follows. Right-click on the
virtual miniport Local Area Connection icon and choose <b style='mso-bidi-font-weight:
normal'>Properties</b>. Click on the <b style='mso-bidi-font-weight:normal'>Configure</b>
button to bring up the Device Manager UI for the virtual device. Select the <b
style='mso-bidi-font-weight:normal'>Advanced</b> property sheet – this should
contain a “VLAN ID” parameter that is configurable to the desired VLAN ID.
Choosing a value of 0 (zero) disables receive-side filtering based on VLAN ID.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><u>File<span style='mso-tab-count:2'>           </span>Description<o:p></o:p></u></pre><pre><o:p>&nbsp;</o:p></pre><pre><span
class=SpellE>Makefile</span><span style='mso-tab-count:1'>       </span>Used during compilation to create the object and sys files</pre><pre>Miniport.c<span
style='mso-tab-count:1'>     </span>Miniport related routines for the MUX driver</pre><pre><span
class=SpellE>Mux.c</span><span style='mso-tab-count:2'>          </span><span
class=SpellE>DriverEntry</span> routine and any routines common to the MUX miniport and protocol </pre><pre><span
class=SpellE>Mux.h</span><span style='mso-tab-count:2'>          </span>Prototypes of all functions and data structures used by the MUX driver</pre><pre>Mux.htm<span
style='mso-tab-count:2'>        </span>Documentation for the MUX driver (this file)</pre><pre><span
class=SpellE>Mux.rc</span><span style='mso-tab-count:2'>         </span>Resource <span
class=GramE>file</span> for the MUX driver</pre><pre><span class=SpellE>Muxp.inf</span><span
style='mso-tab-count:1'>       </span>Installation INF for the service (protocol side installation)</pre><pre><span
class=SpellE>Mux_mp.inf</span><span style='mso-tab-count:1'>     </span>Installation INF for the miniport (virtual device installation)</pre><pre><span
class=SpellE>Precomp.h</span><span style='mso-tab-count:1'>      </span><span
class=SpellE>Precompile</span> header file</pre><pre><span class=SpellE>Protocol.c</span><span
style='mso-tab-count:1'>     </span>Protocol related routines for the MUX driver</pre><pre>Sources<span
style='mso-tab-count:2'>        </span>List of source files that are compiled and linked to create the MUX driver. This can be modified to create binaries that operate on previous Windows versions (e.g. Windows 2000).</pre>
<h4 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-family:Verdana'>Programming Tour<o:p></o:p></span></h4>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>When it loads, i.e. from its <i>DriverEntry</i>
function, the MUX driver registers as an Intermediate miniport driver and as a
protocol, in that order.<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><b><span
style='font-size:10.0pt;font-family:Verdana'>Binding and VELAN Creation<o:p></o:p></span></b></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>NDIS calls MUXs BindAdapter
function, <i>PtBindAdapter</i>, for each underlying NDIS adapter to which it is
configured to bind. This function allocates an ADAPT structure to represent the
lower adapter, and calls NdisOpenAdapter to set up a binding to it. In the
context of BindAdapterHandler, after successfully opening a binding to the
underlying adapter, the driver queries the reserved keyword
&quot;UpperBindings&quot; to get a list of device names for the virtual
adapters that this particular binding is to expose – see <i>PtBootStrapVElans</i>
for more details. Note that the MUX driver does not create bindings (i.e. call
NdisOpenAdapter) from any context other than its BindAdapter function – this is
recommended behavior for all drivers of this type.<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>For each device name specified in
the “UpperBindings” key, the MUX driver allocates a VELAN data structure to
represent the virtual miniport, calls NdisIMInitializeDeviceInstanceEx. In
response, NDIS eventually calls the MUX miniports MiniportInitialize entry
point, <i>MPInitialize</i>, for each VELAN. After <i>MPInitialize</i>
successfully returns, NDIS takes care of getting upper-layer protocols to bind
to the newly created virtual adapter(s).<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><b><span
style='font-size:10.0pt;font-family:Verdana'>Unbinding and Halting</span></b><span
style='font-size:10.0pt;font-family:Verdana'><o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>NDIS calls MUXs UnbindAdapter
handler, <i>PtUnbindAdapter</i>, to request it to unbind from a lower adapter.
In processing this, MUX calls NdisIMDeInitializeDeviceInstance for each VELAN
instantiated on the indicated adapter – see <i>PtStopVElan</i> for details.
This call results in NDIS first unbinding any protocols bound to the indicated
VELAN, and then calling the MiniportHalt routine, <i>MPHalt</i>, for that
VELAN. <i>MPHalt</i> waits for any outstanding receives/sends on the VELAN to
finish before unlinking the VELAN from the ADAPT.<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><i><span
style='font-size:10.0pt;font-family:Verdana'>PtUnbindAdapter</span></i><span
style='font-size:10.0pt;font-family:Verdana'> itself blocks until all VELANs
associated with the ADAPT structure have been unlinked from it. This is to make
sure that no thread running in the context of a miniport-edge entry point for a
VELAN will ever access an invalid lower binding handle. Once all VELANs have
been unlinked, <i>PtUnbindAdapter</i> closes the lower binding by calling
NdisCloseAdapter. Note that the MUX driver does not close its lower binding
from any context other than its UnbindAdapter function – this is recommended
behavior for all drivers of this type.<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><i><span
style='font-size:10.0pt;font-family:Verdana'>MPHalt</span></i><span
style='font-size:10.0pt;font-family:Verdana'> may also be called if the VELAN
device is disabled, e.g. from the Network Connections Folder. There is no
special code within <i>MPHalt</i> to handle this condition. However, <i>PtUnbindAdapter</i>
takes care to not attempt to deinitialize a VELAN miniport (via
NdisIMDeInitializeDeviceInstance) that has already been halted.<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><b><span
style='font-size:10.0pt;font-family:Verdana'>Handling Queries<o:p></o:p></span></b></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
class=SpellE><i><span style='font-size:10.0pt;font-family:Verdana'>MPRequest</span></i></span><span
style='font-size:10.0pt;font-family:Verdana'> is the MUX drivers function that
handles queries for OID values on VELAN miniports. Most of the “Ethernet” type
information for the virtual miniport is stored in the VELAN structure itself,
and the driver returns information from this structure. The queries that are
forwarded are OID_GEN_MEDIA_CONNECT_STATUS, OID_PNP_CAPABILITIES and
OID_PNP_WAKE_UP_PATTERN_LIST. See “Handling Power Management” below for more
information about the latter two OIDs.<i><o:p></o:p></i></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><b><span
style='font-size:10.0pt;font-family:Verdana'>Handling Sets</span></b><span
style='font-size:10.0pt;font-family:Verdana'><o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
class=SpellE><i><span style='font-size:10.0pt;font-family:Verdana'>MPRequest</span></i></span><span
style='font-size:10.0pt;font-family:Verdana'> handles setting OID values on
VELAN miniports. Data management OIDs handled by the MUX driver are
OID_802_3_MULTICAST_LIST and OID_GEN_CURRENT_PACKET_FILTER. The multicast list
is handled entirely within the MUX driver – it just stores the set of multicast
addresses in the VELAN structure, for reference during receive-side data
processing. The packet filter is handled in a different way – the MUX driver
combines the packet filter settings (bitwise OR) of all VELANs associated with
the same lower adapter. If the combined packet filter is non-zero, MUX sends a
Set request with a value of NDIS_PACKET_TYPE_PROMISCUOUS for
OID_GEN_CURRENT_PACKET_FILTER to start receives on the lower adapter. If the
combined packet filter is zero, MUX sets the lower adapters packet filter to 0
(turns off all receives if there arent any interested protocols).<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>Note that setting the lower
adapter to promiscuous mode is only done here in order to be able to receive <span
class=SpellE>unicast</span> frames directed to multiple MAC addresses. If, for
example, all VELANs are assigned the same MAC address (which is identical to
the address of the lower adapter), then the MUX driver should only pass down
the combined (bitwise OR) setting of packet filter settings of all VELANs.<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>Some power management OIDs are
forwarded to the lower miniport. See “Handling Power Management” below for
details. <o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><b><span
style='font-size:10.0pt;font-family:Verdana'>Sending Data<o:p></o:p></span></b></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>Data sent down on a VELAN miniport
is forwarded to the lower adapter. The MUX driver itself does not generate any
data of its own. The MUX driver clones a NET_BUFFER_LIST for each <span
class=SpellE>NetBufferList</span> passed to its <span class=SpellE><i>MPSendNetBufferLists</i></span>
function, and saves a pointer to the original NET_BUFFER_LIST in the reserved
area of the NET_BUFFER_LIST structure. When the lower adapter completes the
send (<span class=SpellE><i>PtSendNBLComplete</i></span>), MUX picks up the
original packet and calls <span class=SpellE>NdisMSendNetBufferListsComplete</span>
to complete the original send request.<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>If a non-zero VLAN ID is
configured for the VELAN, and/or the packet has non-zero Ieee8021QInfo
per-packet information, then the MUX driver inserts an NDIS buffer containing a
tag header to the front of the packet before sending it down – see function <i
style='mso-bidi-font-style:normal'>MPHandleSendTagging</i> for details.<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><b><span
style='font-size:10.0pt;font-family:Verdana'>Receiving Data<o:p></o:p></span></b></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>Data received from a lower adapter
is indicated up on zero or more VELANs. The <span class=SpellE><i>PtReceiveNBL</i></span>
function is called for each <span class=SpellE>NetBufferList</span> received
from the lower adapter. The received data is checked for matches with the
packet filter and multicast list for each VELAN associated with the adapter
(see <i>PtMatchPacketToVElan</i>). Whenever a match is found, a new NET_BUFFER_LIST
is allocated and set to point to the received data. A pointer to the original
received NET_BUFFER_LIST (if any) is also stored in the new <span class=SpellE>NET_BUFFER_LISTs</span>
reserved area. This packet is indicated up via <span class=SpellE>NdisMIndicateReceiveNetBufferLists</span>
to all interested protocols on that VELAN. <o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>The drivers <span class=SpellE><i>MPReturnNetBufferLists</i></span>
function is called either by NDIS or by MUX itself when protocols are done with
a received NET_BUFFER_LIST. This function returns the original NET_BUFFER_LIST
indicated by the lower driver, if any, by calling <span class=SpellE>NdisReturnNetBufferLists</span>.<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>The driver indicates up received
frames that do not have an IEEE 802.1Q tag header in them – see function <i
style='mso-bidi-font-style:normal'>PtHandleRcvTagging</i>. It always strips off
tag headers, if present, on received frames. If a non-zero VLAN ID is
configured, then it checks received frames that contain tag headers for
matching VLAN Ids – only matching frames are indicated up to protocols. Any
VLAN/priority information present in incoming frames is copied to per-packet
information fields of indicated NET_BUFFER_LIST structures.<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><b><span
style='font-size:10.0pt;font-family:Verdana'>Status Indications</span></b><span
style='font-size:10.0pt;font-family:Verdana'><o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>The only status indications that
are forwarded up by MUX are media connect status indications. See <i>PtStatus</i>
for more details.<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><b><span
style='font-size:10.0pt;font-family:Verdana'>Handling Power Management</span></b><span
style='font-size:10.0pt;font-family:Verdana'><o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>During initialization (<i>MPInitialize</i>),
the MUX miniport sets the attribute <i>NDIS_ATTRIBUTE_NO_HALT_ON_SUSPEND</i> in
its call to <span class=SpellE>NdisMSetMiniportAttributes</span>. When the MUX
miniport is requested to report its Plug and Play capabilities
(OID_PNP_CAPABILITIES), the MUX miniport forwards the request to the underlying
miniport. If this request succeeds, then the MUX miniport overwrites the
following fields before successfully completing the original request: <o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>NDIS_DEVICE_POWER_STATE<span
style='mso-tab-count:1'>          </span>MinMagicPacketWakeUp =
NdisDeviceStateUnspecified;<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>NDIS_DEVICE_POWER_STATE<span
style='mso-tab-count:1'>          </span><span class=SpellE>MinPatternWakeUp</span>=
NdisDeviceStateUnspecified;<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>NDIS_DEVICE_POWER_STATE<span
style='mso-tab-count:1'>          </span>MinLinkChangeWakeUp=NdisDeviceStateUnspecified<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>See <i>PtPostProcessPnPCapabilities</i>
for details. <o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>OID_PNP_SET_POWER and
OID_PNP_QUERY_POWER are not passed to the lower adapter, since the lower layer
miniport will receive independent requests from NDIS.<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>NDIS calls the MUX drivers
ProtocolPnPEvent function (<i>PtPNPHandler</i>) whenever the underlying adapter
is transitioned to a different power state. If the underlying adapter is
transitioning to a low power state, the driver waits for all outstanding sends
and requests to complete.<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>Queries/sets received on a VELAN
miniport that are to be forwarded to the underlying adapter are queued on the
VELAN if the underlying adapter is at a low power state. These are picked up
for processing on receiving a notification that the underlying adapter is back
to a powered-up state.<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><b><span
style='font-size:10.0pt;font-family:Verdana'>Handling Global Reconfiguration</span></b><span
style='font-size:10.0pt;font-family:Verdana'><o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>All modifications to VELAN
configuration are accompanied by PnP reconfigure notifications, i.e.
NetEventReconfigure events passed to the MUXs PnPEventHandler, <i>PtPNPHandler</i>.
This driver takes a broad approach to handling reconfiguration, which is to
simply re-examine all the “UpperBindings” keys for all currently bound
adapters, and start off VELANs for any that do not exist – see <i>PtBootStrapVElans</i>
for details.<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><b><span
style='font-size:10.0pt;font-family:Verdana'>Canceling Sends</span></b><span
style='font-size:10.0pt;font-family:Verdana'>: MUX propagates send
cancellations from protocols above it to lower miniports.<o:p></o:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'><span
style='mso-spacerun:yes'> </span><o:p></o:p></span></p>
<p align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
href="#top"><span style='font-size:10.0pt;font-family:Verdana'>Top of page</span></a><span
style='font-size:10.0pt;font-family:Verdana'> <o:p></o:p></span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-padding-alt:0in 0in 0in 0in'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</td>
</tr>
</table>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif"'>© 1999 Microsoft
Corporation</span><span style='font-size:10.0pt;font-family:Verdana'> <o:p></o:p></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,552 +0,0 @@
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:p="urn:schemas-microsoft-com:office:powerpoint"
xmlns:oa="urn:schemas-microsoft-com:office:activation"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="notify_files/filelist.xml">
<title>Mux.dll - Sample Notify Object</title>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PlaceType"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PlaceName"/>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]--><!--[if !mso]><object
classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></object>
<style>
st1\:*{behavior:url(#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:\5B8B\4F53;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-format:other;
mso-font-pitch:variable;
mso-font-signature:1 135135232 16 0 262144 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
@font-face
{font-family:"\@SimSun";
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
h1
{mso-style-next:Normal;
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
page-break-after:avoid;
mso-outline-level:1;
font-size:10.0pt;
font-family:Verdana;
mso-fareast-font-family:SimSun;
mso-font-kerning:0pt;
font-weight:bold;}
h2
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:SimSun;
font-weight:bold;}
h3
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman";
mso-fareast-font-family:SimSun;
font-weight:bold;}
h4
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:SimSun;
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Courier New";}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:354117224;
mso-list-type:hybrid;
mso-list-template-ids:-730287492 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1
{mso-list-id:379671731;
mso-list-type:hybrid;
mso-list-template-ids:-1929328134 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l1:level1
{mso-level-text:"%1\)";
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2
{mso-list-id:1626816921;
mso-list-type:hybrid;
mso-list-template-ids:-553597382 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l2:level1
{mso-level-text:"%1\)";
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
</head>
<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
<div class=Section1>
<h2><span style='font-family:Verdana'>MUX.DLL – Sample Notify Object <o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>SUMMARY<o:p></o:p></span></h3>
<h3><span style='font-size:12.0pt;font-family:Verdana'>MUX Notify Object<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>This sample demonstrates
how to write a notify object for installing and configuring an NDIS MUX intermediate
miniport (IM) driver that implements an N:1 relationship between upper and
lower bindings, i.e. it creates multiple virtual network devices on top of a
single lower adapter. Protocols bind to these virtual adapters as if they are
real adapters. Examples of <st1:place w:st="on"><st1:PlaceName w:st="on">Intermediate</st1:PlaceName>
<st1:PlaceType w:st="on">Miniport</st1:PlaceType></st1:place> drivers that can
use this type of notify <span class=GramE>object are</span> Virtual LAN (VLAN)
drivers.<o:p></o:p></span></p>
<p><b style='mso-bidi-font-weight:normal'><span style='font-family:Verdana'>Operation</span></b><span
style='font-family:Verdana'><o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>During installation, the
notify object performs the following operations.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>It
creates one virtual adapter for each physical adapter the MUX protocol edge
binds to.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>It
disables the bindings of other protocols such as TCP/IP to physical adapters if
it has been compiled with DISABLE_PROTOCOLS_TO_PHYSICAL defined in the Sources
file. This is the most commonly desired behavior for N:1 MUX drivers.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>It
disables the bindings of the protocol edge of the MUX IM driver with all its
virtual adapters.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The notify object
provides a custom property page for the MUX IM driver. The custom property page
allows the user to add one or more virtual adapters on top of a physical
adapter or delete an existing virtual adapter.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>When the MUX IM driver is
uninstalled, or binding is disabled, or the user deletes all the virtual
adapters on top of a physical adapter, the notify object restores the bindings
of other protocols to the physical adapter if it has been compiled with the
preprocessor flag DISABLE_PROTOCOLS_TO_PHYSICAL defined in the Sources file.<o:p></o:p></span></p>
<p><b style='mso-bidi-font-weight:normal'><span style='font-size:10.0pt;
font-family:Verdana'>Windows 2000 Specific<o:p></o:p></span></b></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>During the installation,
the notify object copies the INF file for the virtual adapter from the
installation media to the system INF directory by using the <span class=SpellE>SetupCopyOEMInf</span>
function. This is done because Windows 2000 does not support the <span
class=SpellE>CopyINF</span> directive to copy INF files from another INF file.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p style='tab-stops:657.0pt'><span style='font-size:10.0pt;font-family:Verdana'>To
build the sample, type <b>build -ceZ</b>. This command produces the binary
mux.dll, which is the sample notify object.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The sample compiles
properly for 32-bit and 64-bit systems, and builds properly with Microsoft®
Visual C® 6.0.<o:p></o:p></span></p>
<p><b style='mso-bidi-font-weight:normal'><span style='font-size:10.0pt;
font-family:Verdana'>Preprocessor Flags:<o:p></o:p></span></b></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>DISABLE_PROTOCOLS_TO_PHYSICAL<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>When this flag is defined
in the Sources file, the notify object disables the bindings of other protocols
such as TCP/IP to the physical adapters during the installation. When all the
virtual adapters are removed either through the custom property page or as a
result of uninstalling the MUX driver, the notify object re-enables those
bindings.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>PASSTHRU_NOTIFY<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>This flag is defined to
allow the MUX driver to be used in a passthru mode. When this flag is defined,
the notify object:<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo4;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Verdana;mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana'><span
style='mso-list:Ignore'>1)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Creates
only one virtual miniport for every physical adapter the MUX protocol edge
binds to.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo4;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Verdana;mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana'><span
style='mso-list:Ignore'>2)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Disables
the property page to prevent adding of additional virtual miniports. <o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo4;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Verdana;mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana'><span
style='mso-list:Ignore'>3)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Stores
the device name of the virtual adapter in REG_SZ registry value under
HKLM\System\<span class=SpellE>CurrentControlSet\Services\muxp\Parameters\Adapters</span><span
class=GramE>\{</span><span class=SpellE><i style='mso-bidi-font-style:normal'>PhysicalAdaptersInstanceGuid</i></span><i
style='mso-bidi-font-style:normal'>}\</i><span class=SpellE>UpperBindings</span>,
because there is one to one binding. In the MUX mode (when this flag is not
defined), the notify object stores the device name in a REG_MULTI_SZ registry
value as there could be more than one virtual miniports.<o:p></o:p></span></p>
<p style='margin-left:.25in'><span style='font-size:10.0pt;font-family:Verdana'>You
can also use this notify object with the Passthru driver by doing the
following:<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l2 level1 lfo6;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Verdana;mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana'><span
style='mso-list:Ignore'>1)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Change
the protocol name in file <span class=SpellE>src\network\ndis\passthru\passthru.c</span>
from PASSTHRU to MUXP.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l2 level1 lfo6;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Verdana;mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana'><span
style='mso-list:Ignore'>2)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Change
the driver name from Passthru to MUX in the sources file.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l2 level1 lfo6;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Verdana;mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana'><span
style='mso-list:Ignore'>3)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Rebuild
the driver to obtain a mux.sys driver binary.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l2 level1 lfo6;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Verdana;mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana'><span
style='mso-list:Ignore'>4)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Build
the MUX notify object with PASSTHRU_NOTIFY defined.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l2 level1 lfo6;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Verdana;mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana'><span
style='mso-list:Ignore'>5)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Use
the MUX <span class=SpellE><span class=GramE>inf</span></span> files, <span
class=SpellE>muxp.inf</span> and <span class=SpellE>mux_mp.inf</span>, to
install the driver and <span class=SpellE>dll</span>.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The benefit of using
techniques in the MUX notify object for a 1:1 intermediate driver (e.g.
Passthru) is to be able to exercise higher level of control over the bindings
of MUX with other components in the system, which is not possible with the IM
filter driver.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>CUSTOM_EVENTS<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>When this macro is
defined, the notify object shows how to send custom events to the MUX IM driver
when a virtual miniport is added or removed.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><u>File<span style='mso-tab-count:2'>           </span>Description<o:p></o:p></u></pre><pre><span
class=SpellE>Dllmain.cpp</span><span style='mso-tab-count:1'>    </span>File containing implementations of DLL entry point and exports. </pre><pre><span
class=SpellE>Implinc.cpp</span><span style='mso-tab-count:1'>    </span>File including source code for ATL utilities.</pre><pre>mux.htm<span
style='mso-tab-count:2'>        </span>The documentation for this sample.</pre><pre><span
class=SpellE>Pch.h</span><span style='mso-tab-count:2'>          </span>Pre-compiled header file.</pre><pre><span
class=SpellE>Resource.h</span><span style='mso-tab-count:1'>     </span>The resource header.</pre><pre><span
class=SpellE>notify.cpp</span><span style='mso-tab-count:1'>     </span>Notify object implementation.</pre><pre><span
class=SpellE>virtual.cpp</span><span style='mso-tab-count:1'>    </span>Virtual adapter class implementation.</pre><pre><span
class=SpellE>adapter.cpp</span><span style='mso-tab-count:1'>    </span>Physical adapter class implementation.</pre><pre><span
class=SpellE>common.cpp</span><span style='mso-tab-count:1'>     </span>Global functions, variables and macro definitions.</pre><pre><span
class=SpellE>mux.def</span><span style='mso-tab-count:2'>        </span>The sample's linker definition file.</pre><pre><span
class=SpellE>mux.h</span><span style='mso-tab-count:2'>          </span>The header file for <span
class=SpellE>mux.cpp</span>.</pre><pre><span class=SpellE>virtual.h</span><span
style='mso-tab-count:1'>      </span>Virtual adapter class declaration.</pre><pre><span
class=SpellE>Adapter.h</span><span style='mso-tab-count:1'>      </span>Physical adapter class declaration.</pre><pre><span
class=SpellE>notify.rc</span><span style='mso-tab-count:1'>      </span>The resource file.</pre><pre><span
class=SpellE>notify.rgs</span><span style='mso-tab-count:1'>     </span>Script-based registry.</pre><pre><span
class=SpellE>notifyn.idl</span><span style='mso-tab-count:1'>    </span>The notify object's .<span
class=SpellE>idl</span> file.</pre><pre><span class=SpellE>setupdi.cpp</span><span
style='mso-tab-count:1'>    </span>Functions to copy the miniport INF file to the system.</pre><pre><o:p>&nbsp;</o:p></pre>
<p align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><b
style='mso-bidi-font-weight:normal'><a href="#_top"><span style='font-size:
10.0pt;font-family:Verdana;font-weight:normal'>Top of page</span></a></b><span
style='font-size:10.0pt;font-family:Verdana'> <o:p></o:p></span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-padding-alt:0in 0in 0in 0in'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</td>
</tr>
</table>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif"'>© 2004 Microsoft
Corporation</span><span style='font-size:10.0pt;font-family:Verdana'><o:p></o:p></span></p>
</div>
</body>
</html>


Просмотреть файл

@ -1,393 +0,0 @@
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="ndisprot_files/filelist.xml">
<title>Sample NDIS connection-less protocol driver sample</title>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Courier;
panose-1:2 7 4 9 2 2 5 2 4 4;
mso-font-charset:0;
mso-generic-font-family:modern;
mso-font-format:other;
mso-font-pitch:fixed;
mso-font-signature:3 0 0 0 1 0;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:?????¡ì???;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-alt:Tahoma;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:Arial;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-format:other;
mso-font-pitch:variable;
mso-font-signature:3 0 0 0 1 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
h2
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:SimSun;
font-weight:bold;}
h3
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman";
mso-fareast-font-family:SimSun;
font-weight:bold;}
h4
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:SimSun;
font-weight:bold;}
p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:Verdana;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Courier New";}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
</head>
<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
<div class=Section1>
<h2><span style='font-family:Verdana'>NDIS connection-less protocol driver
sample<o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>SUMMARY<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>This sample demonstrates
a connection-less NDIS 6.0 protocol. The driver supports sending and receiving
raw Ethernet frames using ReadFile/WriteFile calls from user-mode. It only
receives frames with a specific EtherType field. As an NDIS protocol, it
illustrates how to establish and tear down bindings to Ethernet adapters, i.e.
those that export medium type <i>NdisMedium802_3</i>. It shows how to set a
packet filter, send and receive data, and handle plug-and-play events.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'>From the
Free or Checked Build environment, execute <b>build -ceZ</b> in the ndisprot
directory. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>INSTALLATION<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>The driver is installed
using the INF file ndisprot.inf, which is provided in the driver directory. In
Network Connections UI, select an adapter and open <b>Properties</b>.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Click <b>Install</b>,
then <b>Protocol</b>, then <b>Add</b>, and then <b>Have disk</b>. Then point to
the location of the .inf and driver.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Select <b>Sample NDIS
Protocol Driver </b>and click <b>OK</b>. After installing the protocol, copy
over the test application prottest.exe to a convenient location. Please note
that the driver service has been set to manual start in the INF file. As a
result, it doesn't get loaded automatically when you install.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>USAGE<o:p></o:p></span></h3>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'>To start
the driver, type<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'><span
style='mso-tab-count:1'>          </span>Net start ndisprot<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'>To stop
the driver, type<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'><span
style='mso-tab-count:1'>          </span>Net stop ndisprot<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'>To test
the driver, run prottest. For help on usage, run prottest -?<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'><o:p>&nbsp;</o:p></span></p>
<pre style='margin-left:.5in'>usage: PROTTEST [options] &lt;devicename&gt;</pre><pre
style='margin-left:.5in'>options:</pre><pre style='margin-left:.5in'><span style='mso-spacerun:yes'>       </span>-e: Enumerate devices</pre><pre
style='margin-left:.5in'><span style='mso-spacerun:yes'>       </span>-r: Read</pre><pre
style='margin-left:.5in'><span style='mso-spacerun:yes'>       </span>-w: Write (default)</pre><pre
style='margin-left:.5in'><span style='mso-spacerun:yes'>       </span>-l &lt;length&gt;: length of each packet (default: 100)</pre><pre
style='margin-left:.5in'><span style='mso-spacerun:yes'>       </span>-n &lt;count&gt;: number of packets (defaults to infinity)</pre><pre
style='margin-left:.5in'><span style='mso-spacerun:yes'>       </span>-m &lt;MAC address&gt; (defaults to local MAC)</pre>
<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>Prottest exercises the IOCTLs supported
by NDISPROT, and sends and/or receives data on the selected device. In order to
use prottest, the user must have administrative privilege. Users should pass
down a big enough buffer in order to receive the entire received data. If the
length of the buffer passed down is smaller than the length of the received
data, NDISPROT will only copy part of the data and discard the rest when the
given buffer is full.<o:p></o:p></span></p>
<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>Use the –e option to enumerate all
devices to which NDISPROT is bound:<o:p></o:p></span></p>
<pre style='margin-left:.5in'>C:\prot&gt;prottest -e</pre><pre
style='margin-left:.5in'> 0. \DEVICE\{9273DA7D-5275-4B9A-AC56-68A49D121F1F}</pre><pre
style='margin-left:.5in'><span style='mso-spacerun:yes'>     </span>- Intel-Based 10/100 Ethernet Card</pre>
<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Verdana'>The
following command sends and receives 2 packets on a device</span><span
style='font-size:10.0pt;font-family:Verdana'>). Since these packets are sent to
the local MAC address (default), both packets are received. </span><span
style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Verdana'>The device
name parameter to prottest is picked up from the output of prottest –e (see
above).<o:p></o:p></span></p>
<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'><o:p>&nbsp;</o:p></span></p>
<pre style='margin-left:.5in'>C:\prot&gt;prottest -n 2 \DEVICE\{9273DA7D-5275-4B9A-AC56-68A49D121F1F}</pre><pre
style='margin-left:.5in'>DoWriteProc: finished sending 2 packets of 100 bytes each</pre><pre
style='margin-left:.5in'>DoReadProc finished: read 2 packets</pre>
<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Verdana'>For
security reasons, this driver does not allow packets with fake MAC addresses to
be sent from usermode applications.<o:p></o:p></span></p>
<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-family:Verdana'>TIPS<o:p></o:p></span></h3>
<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>With a checked version of
ndisprot.sys, you can control the volume of debug information generated by
changing the variable ndisprotDebugLevel. Refer to debug.h for more
information. <o:p></o:p></span></p>
<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><b><span style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'>Directory: Test</span></b><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><br
style='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]><o:p></o:p></span></pre><pre><span style='font-size:9.0pt;mso-bidi-font-size:
7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><u><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'>File</span></u><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><span
style='mso-tab-count:2'>             </span><u>Description</u><span
style='mso-tab-count:1'>      </span><o:p></o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'>prottest.c<span
style='mso-tab-count:1'>       </span>User-mode test application<o:p></o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><b><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'>Directory: Sys</span></b><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><br
style='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]><o:p></o:p></span></pre><pre><span style='font-size:9.0pt;mso-bidi-font-size:
7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><u><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'>File</span></u><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><span
style='mso-tab-count:2'>             </span><u>Description</u><span
style='mso-tab-count:1'>      </span><o:p></o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'>debug.c<span
style='mso-tab-count:2'>          </span>Routines to aid debugging<o:p></o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'>debug.h<span
style='mso-tab-count:2'>          </span>Debug macro definitions<o:p></o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'>macros.h<span
style='mso-tab-count:2'>         </span>Spinlock, event, referencing macros<o:p></o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'>ndisbind.c<span
style='mso-tab-count:1'>       </span>NDIS protocol entry points to handle binding/unbinding from adapters<o:p></o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'>ndisprot.h<span
style='mso-tab-count:1'>       </span>Data structure definitions<o:p></o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'>ndisprot.inf<span
style='mso-tab-count:1'>     </span>INF file for installing NDISPROT<o:p></o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'>ntdisp.c<span
style='mso-tab-count:2'>         </span>NT Entry points and dispatch routines for NDISPROT<o:p></o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'>protuser.h<span
style='mso-tab-count:1'>       </span>IOCTL and associated structure definitions<o:p></o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'>recv.c<span
style='mso-tab-count:2'>           </span>NDIS protocol entry points for receiving data, and IRP_MJ_READ processing<o:p></o:p></span></pre><pre><span
style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'>send.c<span
style='mso-tab-count:2'>           </span>NDIS protocol routines for sending data, and IRP_MJ_WRITE processing<o:p></o:p></span></pre><pre><span
style='font-size:7.5pt;font-family:Courier'><o:p>&nbsp;</o:p></span></pre>
<p align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'><a href="#top">Top of page</a> <o:p></o:p></span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-padding-alt:0in 0in 0in 0in'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</td>
</tr>
</table>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif"'>© Microsoft Corporation
2000</span><span style='font-size:10.0pt;font-family:Verdana'> <o:p></o:p></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,197 +0,0 @@
<html>
<head>
<title>Sample NDIS connection-less protocol driver sample</title>
</head>
<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
<div class=Section1>
<h2><span style='font-family:Verdana'>NDIS connection-less protocol driver sample</span></h2>
<h3><span style='font-family:Verdana'>SUMMARY</span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>This sample demonstrates a connection-less
NDIS 5.0, 5.1 or 6.0 protocol driver. The driver supports sending and receiving raw Ethernet
frames using ReadFile/WriteFile calls from user-mode. As an NDIS protocol, it illustrates how to
establish and tear down bindings to Ethernet adapters, i.e. those that export medium type
<i>NdisMedium802_3</i>. It shows how to set a packet filter, send and receive data, and handle
plug-and-play events.</span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The sample works on Windows 2000 and later
platforms.</span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The sample also demonstrates how to write
a Notify Object dll. The Notify Object is used for calling into the Wdf Coinstaller to install
and load the framework library.</span></p>
<h3><span style='font-family:Verdana'>BUILDING THE SAMPLE</span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>From the Free or Checked Build environment,
execute <b>build -ceZ</b> in the ndisprot directory.</span></p>
<p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Depending on the build environment, the 50
subdirectory produces either NDIS5.0 or NDIS 5.1 compatible driver. If built in the Windows 2000
build environment, it will produce NDIS 5.0 compatible driver. If it's built in the Windows XP or
Window Server 2003 build environment, it will produce NDIS 5.1 compatible driver.</span></p>
<p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The 60 subdirectory can be built only in the
Windows Vista build environment. The sample built in this sub directory will be NDIS 6.0 compatible
and will work on Windows Vista and later operating systems.</span></p>
<h3><span style='font-family:Verdana'>INSTALLATION</span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>The driver is installed using the INF file
ndisprot.inf, which is provided in the driver directory. In Network Connections UI, select an
adapter and open <b>Properties</b>.</span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Click <b>Install</b>, then <b>Protocol</b>,
then <b>Add</b>, and then <b>Have disk</b>. Then point to the location of the .inf and driver.</span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Select <b>Sample NDIS Protocol Driver </b>and
click <b>OK</b>. After installing the protocol, copy over the test application files uiotest.exe and
protest.exe to a convenient location. Please note that the driver service has been set to manual
start in the INF file. As a result, it doesn't get loaded automatically when you install.</span></p>
<h3><span style='font-family:Verdana'>USAGE</span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>To start the driver, type<br>
<span style='mso-tab-count:1'>          </span>Net start ndisprot</span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>To stop the driver, type<br>
<span style='mso-tab-count:1'>          </span>Net stop ndisprot</span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>To test the NDIS 5.x driver, run uiotest.
For help on usage, run uiotest -?</span></p>
<pre style='margin-left:.5in'>
usage: UIOTEST [options] &lt;devicename&gt;
options:
<span style='mso-spacerun:yes'>       </span>-e: Enumerate devices
<span style='mso-spacerun:yes'>       </span>-r: Read
<span style='mso-spacerun:yes'>       </span>-w: Write (default)
<span style='mso-spacerun:yes'>       </span>-l &lt;length&gt;: length of each packet (default: 100)
<span style='mso-spacerun:yes'>       </span>-n &lt;count&gt;: number of packets (defaults to infinity)
<span style='mso-spacerun:yes'>       </span>-m &lt;MAC address&gt; (defaults to local MAC)</pre>
<p><span style='font-size:10.0pt;font-family:Verdana'>To test the NDIS 6.0 driver, run prottest.
For help on usage, run prottest -?</span></p>
<pre style='margin-left:.5in'>
usage: PROTTEST [options] &lt;devicename&gt;
options:
<span style='mso-spacerun:yes'>       </span>-e: Enumerate devices
<span style='mso-spacerun:yes'>       </span>-r: Read
<span style='mso-spacerun:yes'>       </span>-w: Write (default)
<span style='mso-spacerun:yes'>       </span>-l &lt;length&gt;: length of each packet (default: 100)
<span style='mso-spacerun:yes'>       </span>-n &lt;count&gt;: number of packets (defaults to infinity)
<span style='mso-spacerun:yes'>       </span>-m &lt;MAC address&gt; (defaults to local MAC)</pre>
<p><span style='font-size:10.0pt;font-family:Verdana'>Uiotest/Prottest exercises the IOCTLs supported by
NDISPROT, and sends and/or receives data on the selected device. In order to use uiotest/prottest, the
user must have administrative privilege. Users should pass down a big enough buffer in order to receive
the entire received data. If the length of the buffer passed down is smaller than the length of the
received data, NDISPROT will only copy part of the data and discard the rest when the given buffer is
full.</span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>For NDIS 5.x driver, use the –e option on uiotest
to enumerate all devices to which NDISPROT is bound:</span></p>
<pre style='margin-left:.5in'>
C:\uio&gt;uiotest -e
0. \DEVICE\{9273DA7D-5275-4B9A-AC56-68A49D121F1F}
<span style='mso-spacerun:yes'>     </span>- Intel-Based 10/100 Ethernet Card</pre>
<p><span style='font-size:10.0pt;font-family:Verdana'>The following command sends and receives 2 packets
on a device. Since these packets are sent to the local MAC address (default), both packets are received.
The device name parameter to uiotest is picked up from the output of uiotest –e (see above).</span></p>
<pre style='margin-left:.5in'>
C:\uio&gt;uiotest -n 2 \DEVICE\{9273DA7D-5275-4B9A-AC56-68A49D121F1F}
DoWriteProc: finished sending 2 packets of 100 bytes each
DoReadProc finished: read 2 packets</pre>
<p><span style='font-size:10.0pt;font-family:Verdana'>For NDIS 6.0 driver, use the –e option on prottest
to enumerate all devices to which NDISPROT is bound:</span></p>
<pre style='margin-left:.5in'>
C:\prot&gt;prottest -e
0. \DEVICE\{9273DA7D-5275-4B9A-AC56-68A49D121F1F}
<span style='mso-spacerun:yes'>     </span>- Intel-Based 10/100 Ethernet Card</pre>
<p><span style='font-size:10.0pt;font-family:Verdana'>The following command sends and receives 2 packets
on a device. Since these packets are sent to the local MAC address (default), both packets are received.
The device name parameter to prottest is picked up from the output of protest –e (see above).</span></p>
<pre style='margin-left:.5in'>
C:\prot&gt;prottest -n 2 \DEVICE\{9273DA7D-5275-4B9A-AC56-68A49D121F1F}
DoWriteProc: finished sending 2 packets of 100 bytes each
DoReadProc finished: read 2 packets</pre>
<p><span style='font-size:10.0pt;font-family:Verdana'>For security reasons, this driver does not allow
packets with fake MAC addresses to be sent from usermode applications.</span></p>
<h3><span style='font-family:Verdana'>TIPS</span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>With a checked version of ndisprot.sys, you can
control the volume of debug information generated by changing the variable ndisprotDebugLevel. Refer to
debug.h for more information.</span></p>
<h3><span style='font-family:Verdana'>CODE TOUR</span></h3>
<h4><span style='font-family:Verdana'>File Manifest</span></h4>
<pre><span style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><b>Directory: 50, 60</b>
<u>File</u><span style='mso-tab-count:2'>             </span><u>Description</u>
debug.c<span style='mso-tab-count:2'>          </span>Routines to aid debugging
debug.h<span style='mso-tab-count:2'>          </span>Debug macro definitions
excallbk.c<span style='mso-tab-count:1'>       </span>Handles load order dependency between this sample and NDISWDM sample
macros.h<span style='mso-tab-count:2'>         </span>Spinlock, event, referencing macros
ndisbind.c<span style='mso-tab-count:1'>       </span>NDIS protocol entry points to handle binding/unbinding from adapters
ndisprot.h<span style='mso-tab-count:1'>       </span>Data structure definitions
precomp.h<span style='mso-tab-count:1'>       </span>Contains the precompiled headers
protuser.h<span style='mso-tab-count:1'>       </span>Has the definitions of ioctls issued by protuser.exe application used on NDIS 6.0
nuiouser.h<span style='mso-tab-count:1'>       </span>Has the definitions of ioctls issued by nuiouser.exe application used on NDIS 5.0
ndisprot.inf<span style='mso-tab-count:1'>     </span>INF file for installing NDISPROT
ntdisp.c<span style='mso-tab-count:2'>         </span>NT Entry points and dispatch routines for NDISPROT
recv.c<span style='mso-tab-count:2'>           </span>NDIS protocol entry points for receiving data, and IRP_MJ_READ processing
send.c<span style='mso-tab-count:2'>           </span>NDIS protocol routines for sending data, and IRP_MJ_WRITE processing</span></pre>
<pre><span style='font-size:9.0pt;mso-bidi-font-size:7.5pt;font-family:Courier'><b>Directory: NotifyOb</b>
<u>File</u><span style='mso-tab-count:2'>             </span><u>Description</u>
Common.hpp<span style='mso-tab-count:1'>       </span>Header file containing the common include files for the project
dllmain.cpp<span style='mso-tab-count:1'>      </span>Handles loading/unloading of Wdf Coinstaller and the notify object dll
ProtNotify.cpp<span style='mso-tab-count:1'>   </span>Handles loading/unloading the WDF loader during the device installation/removal
ProtNotify.idl<span style='mso-tab-count:1'>   </span>Defines the interfaces for the notify object dll
ProtNotify.def<span style='mso-tab-count:1'>   </span>Defines the exports of notify object dll
ProtNotify.rc<span style='mso-tab-count:1'>    </span>Resource file for the notify object dll
resource.h<span style='mso-tab-count:1'>       </span>Defines the resource ids used by the notify object</span></pre>
<p align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'><a href="#top">Top of page</a> <o:p></o:p></span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-padding-alt:0in 0in 0in 0in'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</td>
</tr>
</table>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif"'>© Microsoft Corporation
2000</span><span style='font-size:10.0pt;font-family:Verdana'> <o:p></o:p></span></p>
</div>
</body>
</html>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,367 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Auto-Configuration Samples</title>
<style>
<!--
p
{margin-right:0in;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman";
color:black}
h1
{margin-top:12.0pt;
margin-right:0in;
margin-bottom:3.0pt;
margin-left:0in;
page-break-after:avoid;
font-size:16.0pt;
font-family:Arial;
color:windowtext;
font-weight:bold}
h3
{margin-top:12.0pt;
margin-right:0in;
margin-bottom:3.0pt;
margin-left:0in;
page-break-after:avoid;
font-size:13.0pt;
font-family:Arial;
color:windowtext;
font-weight:bold}
p.MsoNormal
{mso-style-parent:"";
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";
color:windowtext; margin-left:0in; margin-right:0in; margin-top:0in}
table.MsoNormalTable
{mso-style-parent:"";
font-size:10.0pt;
font-family:"Times New Roman";
}
p.MsoPlainText
{mso-style-parent:"";
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;
margin-left:0in; margin-right:0in; margin-top:0in}
h4
{margin-top:12.0pt;
margin-right:0in;
margin-bottom:3.0pt;
margin-left:0in;
page-break-after:avoid;
font-size:14.0pt;
font-family:"Times New Roman";
color:windowtext;
font-weight:bold}
-->
</style>
</head>
<body>
<h1>Auto-Configuration Samples</h1>
<h3>Summary</h3>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: Verdana">
AutoConfig</span> <span style="font-size: 10.0pt; font-family: Verdana">sample
demonstrates how to implement Unidrv-based and PScript5-based drivers to
leverage the inbox support for auto-configuration.</span></p>
<p class="MsoNormal">
<span style="font-size: 10.0pt; font-family: Verdana; color: black">The sample
works only when used with the standard TCP/IP port monitor or the
Network-Connected Device (NCD) port monitor.</span></p>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: Verdana">&nbsp;</span></p>
<p class="MsoNormal"><b><span style="font-size: 10.0pt; font-family: Verdana">
Note:</span></b><span style="font-size: 10.0pt; font-family: Verdana"> The
sample is provided here only as a proof of concept.</span></p>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: Verdana">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: Verdana">The
table shown below identifies which operating systems this sample will build and
work on. </span></p>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: Verdana">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: Verdana">&nbsp;</span></p>
<table class="MsoNormalTable" border="1" cellpadding="0" width="100%" style="width: 100.0%" id="table1">
<tr>
<td width="19%" style="width: 19.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center"><b>
<span style="font-size: 10.0pt; font-family: Verdana">Operating System</span></b></td>
<td width="26%" style="width: 26.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center"><b>
<span style="font-size: 10.0pt; font-family: Verdana">Can sample be
built in the OS?</span><span style="font-family: Verdana"> </span></b>
</td>
<td width="26%" style="width: 26.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center"><b>
<span style="font-size: 10.0pt; font-family: Verdana">Does sample work
in the OS?</span></b></td>
<td width="25%" style="width: 25.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center"><b>
<span style="font-size: 10.0pt; font-family: Verdana; letter-spacing: -1.0pt">
Can sample be used in a production environment for the OS?</span></b></td>
</tr>
<tr>
<td width="19%" style="width: 19.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal">
<span style="font-size: 10.0pt; font-family: Verdana">Windows Vista</span></td>
<td width="26%" style="width: 26.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center">
<span style="font-size: 10.0pt; font-family: Verdana">Yes</span></td>
<td width="26%" style="width: 26.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center">
<span style="font-size: 10.0pt; font-family: Verdana">Yes</span></td>
<td width="25%" style="width: 25.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center">
<span style="font-size: 10.0pt; font-family: Verdana">No</span></td>
</tr>
<tr>
<td width="19%" style="width: 19.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal">
<span style="font-size: 10.0pt; font-family: Verdana">Windows Server
2003</span></td>
<td width="26%" style="width: 26.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center">
<span style="font-size: 10.0pt; font-family: Verdana">No</span></td>
<td width="26%" style="width: 26.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center">
<span style="font-size: 10.0pt; font-family: Verdana">No</span></td>
<td width="25%" style="width: 25.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center">
<span style="font-size: 10.0pt; font-family: Verdana">No</span></td>
</tr>
<tr>
<td width="19%" style="width: 19.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal">
<span style="font-size: 10.0pt; font-family: Verdana">Windows XP</span></td>
<td width="26%" style="width: 26.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center">
<span style="font-size: 10.0pt; font-family: Verdana">No</span></td>
<td width="26%" style="width: 26.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center">
<span style="font-size: 10.0pt; font-family: Verdana">No</span></td>
<td width="25%" style="width: 25.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center">
<span style="font-size: 10.0pt; font-family: Verdana">No</span></td>
</tr>
<tr>
<td width="19%" style="width: 19.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal">
<span style="font-size: 10.0pt; font-family: Verdana">Windows 2000</span></td>
<td width="26%" style="width: 26.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center">
<span style="font-size: 10.0pt; font-family: Verdana">No</span></td>
<td width="26%" style="width: 26.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center">
<span style="font-size: 10.0pt; font-family: Verdana">No</span></td>
<td width="25%" style="width: 25.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center">
<span style="font-size: 10.0pt; font-family: Verdana">No</span></td>
</tr>
<tr>
<td width="19%" style="width: 19.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal">
<span style="font-size: 10.0pt; font-family: Verdana">Windows Me</span></td>
<td width="26%" style="width: 26.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center">
<span style="font-size: 10.0pt; font-family: Verdana">No</span></td>
<td width="26%" style="width: 26.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center">
<span style="font-size: 10.0pt; font-family: Verdana">No</span></td>
<td width="25%" style="width: 25.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center">
<span style="font-size: 10.0pt; font-family: Verdana">No</span></td>
</tr>
<tr>
<td width="19%" style="width: 19.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal">
<span style="font-size: 10.0pt; font-family: Verdana">Windows 98 SE</span></td>
<td width="26%" style="width: 26.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center">
<span style="font-size: 10.0pt; font-family: Verdana">No</span></td>
<td width="26%" style="width: 26.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center">
<span style="font-size: 10.0pt; font-family: Verdana">No</span></td>
<td width="25%" style="width: 25.0%; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="center" style="text-align: center">
<span style="font-size: 10.0pt; font-family: Verdana">No</span></td>
</tr>
</table>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: Verdana">&nbsp;</span></p>
<h1><span style="font-size: 12.5pt; color: black">Auto-Configuration</span>
<span style="font-size: 12.5pt; color: black">Basics</span></h1>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: Verdana">Prior
to Microsoft® Windows® Vista, the settings of a print queue are set initially to
the driver's default settings, rather than to the appropriate settings based on
the device. For Unidrv or Pscript5, this means that static default values
specified in the GPD or PPD file are used for the initial print queue setup.
This static set of defaults necessarily must represent the minimum configuration
that a printer can ship with. For instance, if a stapling unit is optional for a
device, then by default, such a device cannot have stapling capability enabled,
otherwise the user interface for devices without the stapling unit would show
stapling as an option. A customer who selected the stapling option but found
that it did not work would likely be confused.</span></p>
<p><span style="font-size: 10.0pt; font-family: Verdana">For any device that
comes with features not present in the basic model, a user or administrator must
manually configure these features on the print queue after installation. This
can at times be a confusing and non-intuitive experience. The configuration
process is easy to get wrong, particularly with regard to internal parameters
such as memory and hard disk size, which significantly can affect printing speed
and quality. </span></p>
<p><span style="font-size: 10.0pt; font-family: Verdana">Auto-configuration</span>
<span style="font-size: 10.0pt; font-family: Verdana">solves this problem by
automatically configuring the print queue according to the installable features
on the device, rather than simply using the driver's static default settings.
The main target for auto-configuration is network printers. They are the most
likely ones to have multiple optional features and require more manual
configuration.</span></p>
<p><span style="font-size: 10.0pt; font-family: Verdana">Auto-configuration</span>
<span style="font-size: 10.0pt; font-family: Verdana">works by means of
bi-directional printer communication (also known as bidi communication) between
the print subsystem and the printer. In order for auto-configuration to work,
the printer must be able to:</span></p>
<p class="MsoNormal" style="text-indent: -.25in; margin-left: 22.8pt; margin-bottom: .1in">
<span style="font-size: 10.0pt; font-family: Symbol; color: black">·<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>
<span style="font-size: 10.0pt; font-family: Verdana; color: black">Understand a
query sent by the port monitor. </span></p>
<p class="MsoNormal" style="text-indent: -.25in; margin-left: 22.8pt; margin-bottom: .1in">
<span style="font-size: 10.0pt; font-family: Symbol; color: black">·<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>
<span style="font-size: 10.0pt; font-family: Verdana; color: black">Generate the
appropriate response to the query. </span></p>
<p><span style="font-size: 10.0pt; font-family: Verdana">To support
auto-configuration, both the printer driver and the port monitor must be
modified.</span></p>
<p><span style="font-size: 10.0pt; font-family: Verdana">A <i>printer driver</i>
must:</span></p>
<p class="MsoNormal" style="text-indent: -.25in; margin-left: 22.8pt; margin-bottom: .1in">
<span style="font-size: 10.0pt; font-family: Symbol; color: black">·<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>
<span style="font-size: 10.0pt; font-family: Verdana; color: black">Be aware of
the Bidi Notification Schema. </span></p>
<p class="MsoNormal" style="text-indent: -.25in; margin-left: 22.8pt; margin-bottom: .1in">
<span style="font-size: 10.0pt; font-family: Symbol; color: black">·<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>
<span style="font-size: 10.0pt; font-family: Verdana; color: black">Be able to
receive notifications about device configuration changes using the Bidi
Notification Schema. </span></p>
<p class="MsoNormal" style="text-indent: -.25in; margin-left: 22.8pt; margin-bottom: .1in">
<span style="font-size: 10.0pt; font-family: Symbol; color: black">·<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>
<span style="font-size: 10.0pt; font-family: Verdana; color: black">Be able to
solicit configuration data from the printer using the Bidi Communication
Interfaces, and specifically the <b>IBidiSpl2</b> COM interface (described in
the Platform SDK documentation). </span></p>
<p><span style="font-size: 10.0pt; font-family: Verdana">A <i>port monitor</i>
must:</span></p>
<p class="MsoNormal" style="text-indent: -.25in; margin-left: 22.8pt; margin-bottom: .1in">
<span style="font-size: 10.0pt; font-family: Symbol; color: black">·<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>
<span style="font-size: 10.0pt; font-family: Verdana; color: black">Support a
device protocol capable of querying the printer's configuration. </span></p>
<p class="MsoNormal" style="text-indent: -.25in; margin-left: 22.8pt; margin-bottom: .1in">
<span style="font-size: 10.0pt; font-family: Symbol; color: black">·<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>
<span style="font-size: 10.0pt; font-family: Verdana; color: black">Be able to
receive unsolicited status messages from the printer. </span></p>
<p class="MsoNormal" style="text-indent: -.25in; margin-left: 22.8pt; margin-bottom: .1in">
<span style="font-size: 10.0pt; font-family: Symbol; color: black">·<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>
<span style="font-size: 10.0pt; font-family: Verdana; color: black">Convert
unsolicited status messages to an appropriate driver notification. </span></p>
<p class="MsoNormal" style="text-indent: -.25in; margin-left: 22.8pt; margin-bottom: .1in">
<span style="font-size: 10.0pt; font-family: Symbol; color: black">·<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>
<span style="font-size: 10.0pt; font-family: Verdana; color: black">Keep all of
the device status and configuration data up-to date by means of polling or
alerts. </span></p>
<p class="MsoNormal" style="text-indent: -.25in; margin-left: 22.8pt; margin-bottom: .1in">
<span style="font-size: 10.0pt; font-family: Symbol; color: black">·<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>
<span style="font-size: 10.0pt; font-family: Verdana; color: black">Inform the
driver or application of any configuration changes in the device. </span></p>
<p><span style="font-size: 10.0pt; font-family: Verdana">Unidrv-based and
PScript5-based drivers using the standard TCP/IP port monitor or the
Network-Connected Device (NCD) port monitor provide support for
auto-configuration.</span></p>
<h3><a name="MYSAMPLE"><span lang="FR" style="font-family: Verdana">CODE TOUR</span></a></h3>
<p class="MsoNormal"><span lang="FR">&nbsp;</span></p>
<p class="MsoNormal"><b>
<span lang="FR" style="font-size: 10.0pt; font-family: Verdana">Unidrv</span></b><span lang="FR">
</span><b><span lang="FR" style="font-size: 10.0pt; font-family: Verdana">
Auto-Configuration Sample</span></b></p>
<p class="MsoNormal"><b>
<span lang="FR" style="font-size: 10.0pt; font-family: Verdana">&nbsp;</span></b></p>
<p class="MsoPlainText"><span style="font-family: Verdana">The main part of the
sample is the auto-configuration GDL file ACnfgUni.GDL. This file implements
the&nbsp; *BidiQuery, *BidiResponse and *Option elements that correspond to the
Memory, DuplexUnit and PrinterHardDisk features in AutoCnfg.GPD file. The
Feature and Option names in the auto-configuration GDL file should exaclty match
the corresponding Feature and Option names in the GPD file. The
auto-configuration GDL file is specified in the GPD file using the *<b>BidiQueryFile</b>
keyword. The auto-configuration GDL content can also be contained directly
inside the GPD file itself instead of in a separate GDL file, in which case the
*BidiQueryFile keyword should specify the GPD file name.</span></p>
<p class="MsoPlainText">&nbsp; </p>
<p class="MsoNormal"><b><span style="font-size: 10.0pt; font-family: Verdana">
PScript5 Auto-Configuration</span></b> <b>
<span style="font-size: 10.0pt; font-family: Verdana">Sample</span></b></p>
<p class="MsoNormal"><b><span style="font-size: 10.0pt; font-family: Verdana">&nbsp;</span></b></p>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: Verdana">The
main part of the sample is the auto-configuration GDL file ACnfgPS.GDL. This
file implements the *BidiQuery, *BidiResponse and *Option elements that
corresponds to the InstalledMemory, DuplexUnit and HardDisk features in
AutoCnfg.PPD file. As mentioned for the Unidrv sample, the Feature and Option
names should exactly match. Please note that the GPD and PPD files do not have
the same Feature and Option names. That is why the two GDL files are not
identical. The auto-configuration GDL file is specified in the PPD file using
the *<b>MSBidiQueryFile </b>keyword.</span></p>
<h3><span style="font-family: Verdana">INSTALLING/TESTING THE SAMPLE</span> </h3>
<p><span style="font-size: 10.0pt; font-family: Verdana">The samples dont have
any binaries to be built. They may be installed by using Add Printer Wizard and
supplying the AutoCnfg.INF as the INF file. To test the auto-configuration
feature you need to install the driver to a Standard TCP/IP port.&nbsp; You need a
printer, which understands and responds to the bidi SNMP queries, connected to
the port. The tcpbidi.xml file located in system32 directory has information
about the SNMP OIDs used for each query. The installable options in the device
settings will reflect the information obtained by querying the printer.</span>
</p>
<h4><span style="font-family: Verdana">File Manifest&nbsp; </span></h4>
<pre style="tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt; font-size: 10.0pt; font-family: Courier New; color: black; margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: .0001pt"><span style="font-family: Courier">&nbsp;</span></pre>
<pre style="tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt; font-size: 10.0pt; font-family: Courier New; color: black; margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: .0001pt"><b><span style="font-family: Verdana">Root:</span></b></pre>
<pre style="tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt; font-size: 10.0pt; font-family: Courier New; color: black; margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: .0001pt"><span style="font-family: Courier">&nbsp;</span></pre>
<pre style="tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt; font-size: 10.0pt; font-family: Courier New; color: black; margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: .0001pt"><u><span style="font-family: Courier">Files</span></u><span style="font-family: Courier">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <u>Description</u></span></pre>
<pre style="tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt; font-size: 10.0pt; font-family: Courier New; color: black; margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: .0001pt"><span style="font-family: Courier">&nbsp;</span></pre>
<p class="MsoPlainText">AutoConfig.htm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The documentation for this sample
(this file)</p>
<p class="MsoPlainText">AutoCnfg.INF&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The printer INF that will install
Unidrv and PScript5 auto-configuration samples</p>
<p class="MsoPlainText">AutoCnfg.GPD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The GPD file for the Unidrv
auto-configuration sample</p>
<p class="MsoPlainText">AutoCnfg.PPD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The PPD file for the PScript5
auto-configuration sample</p>
<p class="MsoPlainText">ACnfgUni.GDL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The GDL file for the Unidrv
auto-configuration sample</p>
<p class="MsoPlainText">ACnfgPS.GDL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The GDL file for the PScript5
auto-configuration sample </p>
<h3>Resources</h3>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: Verdana">For
the latest release of the Windows Device Driver Development Kit, see
<a style="color: blue; text-decoration: underline; text-underline: single" href="http://www.microsoft.com/whdc/ddk/winddk.mspx">
http://www.microsoft.com/whdc/ddk/winddk.mspx</a>.</span></p>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: Verdana">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: Verdana">If
you have questions on using or adapting this sample for your project, you can
either contact
<a style="color: blue; text-decoration: underline; text-underline: single" href="http://support.microsoft.com/">
Microsoft Technical Support</a> or post your questions in the
<a style="color: blue; text-decoration: underline; text-underline: single" href="http://msdn.microsoft.com/newsgroups/default.asp?url=/newsgroups/loadframes.asp?icp=msdn&slcid=us&newsgroup=microsoft.public.development.device.drivers">
Microsoft driver development newsgroup</a>.</span></p>
</body>
</html>

Просмотреть файл

@ -1,236 +0,0 @@
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="cpsui_files/filelist.xml">
<title>CPSUI</title>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Courier;
panose-1:2 7 4 9 2 2 5 2 4 4;
mso-font-charset:0;
mso-generic-font-family:modern;
mso-font-format:other;
mso-font-pitch:fixed;
mso-font-signature:3 0 0 0 1 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:black;}
h2
{color:black;}
h3
{color:black;}
h4
{color:black;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
p
{font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:black;}
pre
{margin-top:0in;
margin-bottom:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";
color:black;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
<meta name=Template content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple style='tab-interval:.5in'
leftmargin=8>
<div class=Section1>
<h2><a name=MYSAMPLE><span style='font-family:Verdana'>CPSUI</span></a><span
style='font-family:Verdana'> <o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>SUMMARY<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>The Common Property Sheet
User Interface (CPSUI) is a user-mode dynamic link library that enables
developers to create property sheet pages that have a standard appearance. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>This application causes
CPSUI to call the Windows® 2000/Windows® XP/Windows® Server 2003 print spooler
to create property sheet pages for the system's default printer. Note that printer
interface DLLs should not do this. The application then creates an additional
property sheet page to illustrate some of the techniques that can be employed when
using <span class=GramE>CPSUI to create a new page.</span> <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>This sample requires that
the Windows® 2000/Windows® XP/Windows® Server 2003 Software Development Kit and
Driver Development Kit be installed so that the required headers and <span
class=SpellE>libs</span> are available. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>To build the samples, run
<b>build</b> from this directory. The DLL will be placed in the appropriate
platform directory.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Once built, the sample
produces one binary: Cpsuisam.exe. The sample is 64-bit compliant and compiles
properly with Microsoft® Visual C® 6.0. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><o:p>&nbsp;</o:p></pre><pre><span style='font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><u><span
style='font-family:Courier'>Files<span style='mso-spacerun:yes'>          </span>Description</span></u><span
style='font-family:Courier'><o:p></o:p></span></pre><pre><span class=SpellE><span
style='font-family:Courier'>Apple.ico</span></span><span style='font-family:
Courier'><span style='mso-spacerun:yes'>      </span>The <span class=GramE>resource file</span> for a sample icon<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Cpsuidat.cpp</span></span><span
style='font-family:Courier'><span style='mso-spacerun:yes'>   </span>The source file that contains all the predefined data<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Cpsuidat.h</span></span><span
style='font-family:Courier'><span style='mso-spacerun:yes'>     </span>The <span
class=GramE>header file</span> for <span class=SpellE>CPSUIDAT.cpp</span><o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Cpsuisam.c</span></span><span
style='font-family:Courier'><span style='mso-spacerun:yes'>     </span>The source file that implements the sample for the Windows 2000 CPSUI<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Cpsuisam.def</span></span><span
style='font-family:Courier'><span style='mso-spacerun:yes'>   </span>The file that lists the exported functions<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Cpsuisam.dlg</span></span><span
style='font-family:Courier'><span style='mso-spacerun:yes'>   </span>The <span
class=GramE>resource file</span> for the dialogs<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Cpsuisam.h</span></span><span
style='font-family:Courier'><span style='mso-spacerun:yes'>     </span>The <span
class=GramE>header file</span> for <span class=SpellE>CPSUISAM.c</span><o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Cpsuisam.ico</span></span><span
style='font-family:Courier'><span style='mso-spacerun:yes'>   </span>The <span
class=GramE>resource file</span> for a sample icon<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Debug.c</span></span><span
style='font-family:Courier'><span style='mso-spacerun:yes'>        </span>The <span
class=GramE>source file</span> for debugging functions<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Debug.h</span></span><span
style='font-family:Courier'><span style='mso-spacerun:yes'>        </span>The header for <span
class=SpellE>Debug.c</span><o:p></o:p></span></pre><pre><span class=SpellE><span
style='font-family:Courier'>Makefile</span></span><span style='font-family:
Courier'><span style='mso-spacerun:yes'>       </span>The generic file for building the code sample<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Precomp.h</span></span><span
style='font-family:Courier'><span style='mso-spacerun:yes'>      </span>The header that includes the headers to pre-compile<o:p></o:p></span></pre><pre><span
style='font-family:Courier'>Cpsui.htm<span style='mso-spacerun:yes'>      </span>The documentation for this sample (this file)<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Res.rc</span></span><span
style='font-family:Courier'><span style='mso-spacerun:yes'>         </span>The <span
class=GramE>resource file</span> for the module<o:p></o:p></span></pre><pre><span
style='font-family:Courier'>Sources<span style='mso-spacerun:yes'>        </span>The generic file for building the code sample<o:p></o:p></span></pre>
<p align=center style='text-align:center'><a href="#top"><span
style='font-size:10.0pt;font-family:Verdana'>Top of page</span></a><span
style='font-size:10.0pt;font-family:Verdana'> <o:p></o:p></span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</td>
</tr>
</table>
<p><span style='font-size:7.5pt;font-family:"MS Sans Serif"'>© 2004 Microsoft
Corporation</span><span style='font-size:10.0pt;font-family:Verdana'> <o:p></o:p></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,356 +0,0 @@
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="sdiosample_files/filelist.xml">
<title>SDIO Sample Driver</title>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="Street"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="address"/>
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Template>Normal</o:Template>
<o:Revision>7</o:Revision>
<o:TotalTime>255</o:TotalTime>
<o:Created>2000-02-24T06:44:00Z</o:Created>
<o:LastSaved>2003-03-26T18:03:00Z</o:LastSaved>
<o:Pages>1</o:Pages>
<o:Words>652</o:Words>
<o:Characters>3722</o:Characters>
<o:Company>Microsoft Corp.</o:Company>
<o:Lines>31</o:Lines>
<o:Paragraphs>8</o:Paragraphs>
<o:CharactersWithSpaces>4366</o:CharactersWithSpaces>
<o:Version>10.4219</o:Version>
</o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if !mso]><object
classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></object>
<style>
st1\:*{behavior:url(#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;
mso-font-alt:"\FF2D\FF33 \660E\671D";
mso-font-charset:128;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:fixed;
mso-font-signature:1 134676480 16 0 131072 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"\@MS Mincho";
mso-font-charset:128;
mso-generic-font-family:auto;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:windowtext;}
h2
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman";
color:black;
font-weight:bold;}
h3
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman";
color:black;
font-weight:bold;}
h4
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman";
color:black;
font-weight:bold;}
p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
mso-bidi-font-size:12.0pt;
font-family:Verdana;
mso-fareast-font-family:"MS Mincho";
mso-bidi-font-family:"Times New Roman";
color:windowtext;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:black;}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Courier New";
color:black;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:146359864;
mso-list-template-ids:1022758592;}
@list l1
{mso-list-id:1082918253;
mso-list-template-ids:-1544494930;}
@list l2
{mso-list-id:1393195126;
mso-list-type:hybrid;
mso-list-template-ids:370729058 -1300059700 -1881530170 -1340449604 -231067110 1994148784 499707558 165840150 746242626 -833344814;}
@list l2:level1
{mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l2:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l3
{mso-list-id:1951358305;
mso-list-template-ids:383835376;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]-->
</head>
<body lang=EN-US style='tab-interval:.5in'>
<div class=Section1>
<h2><span style='font-family:Verdana'>Driver Framework SDIO Sample Driver<o:p></o:p></span></h2>
<h3><span style='font-size:14.0pt;mso-bidi-font-size:13.5pt;font-family:Verdana'>Description<o:p></o:p></span></h3>
<p class=MsoBodyText>This is a sample for a functional Secure Digital (SD) IO driver. The driver is written using the Kernel Mode Driver Framework. It is a driver for a generic mars development board that implements the SDIO protocol without additional functionality.</p>
<h4><span style='font-size:14.0pt;mso-bidi-font-size:13.5pt;font-family:Verdana'>Theory of Operation <o:p></o:p></span></h4>
<p class=MsoBodyText>The mars board driver exemplifies several different functions that are essential for writing an SDIO driver that leverages KDMF and the SDBUS API. It will show how to:
<br>- Install and start an SDIO device.
<br>- Release an SDIO device.
<br>- Perform data transfers.
<br>- Alter the settings that the SDIO device uses to communicate with the SD Host Controller.
</p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The driver building and
installation instructions given here apply only to Windows® XP and later operating systems.<o:p></o:p></span></p>
<p><b><span style='font-size:10.0pt;font-family:Verdana'>Note</span></b><span
style='font-size:10.0pt;font-family:Verdana'>: This sample provides an example
of a minimal driver. Neither the driver nor the sample programs are intended
for use in a production environment. Rather, they are intended for educational
purposes and as a skeleton driver.<o:p></o:p></span></p>
<h3><span style='font-size:14.0pt;mso-bidi-font-size:13.5pt;font-family:Verdana'>Building
the Sample<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>Click the Free Build
Environment or Checked Build Environment icon under your <b>Development Kits </b>program
group to set basic environment variables needed by the build utility. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Change to the directory
containing the device source code, such as <b>src\sd\sdiomars</b><o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Run <b>build -ceZ</b>, or
use the macro <b>BLD</b>. This behavior invokes the Microsoft make routines
that produce log files called Buildxxx.log, and also Buildxxx.wrn and
Buildxxx.err if there are any warnings or errors. Where xxx stands for <b>fre</b>
or <b>chk</b> depending on the environment chosen. If the build succeeds, the
driver mars.sys and the generated inf file mars.inf will be placed in a platform specific subdirectory of your <b>%TargetPath%</b>
directory specified in the Sources file.<o:p></o:p></span></p>
<h4><span style='font-size:14.0pt;mso-bidi-font-size:12.0pt;font-family:Verdana'>Installing
the Sample<o:p></o:p></span></h4>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana;
color:black'>To install the bus driver on Windows XP and later operating systems: <o:p></o:p></span></p>
<ol start=1 type=1>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo5;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:Verdana'>Copy mars.sys, mars.inf, kmdfsamples.cat & WDF Coinstaller (wdfcoinstallerMMmmm.dll) to a disk. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo5;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:Verdana'>Double-click the Add Hardware wizard in
Control Panel. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo5;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:Verdana'>At the 'Welcome to the Add Hardware Wizard',
click Next. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo5;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:Verdana'>Select 'Yes, I have already connected the
hardware', then click Next. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo5;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:Verdana'>Select Add a new hardware device from the
list, then click Next. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo5;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:Verdana'>Select Install the hardware that I manually
select from a list(Advanced),' and then click next. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo5;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:Verdana'>Select Show All Devices, then click Next. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo5;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:Verdana'>Click 'Have Disk', make sure that 'A:\' is in
the &quot;Copy manufacturer's files from:&quot; box, and click OK. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo5;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:Verdana'>Click on the desired entry, and then click
Next. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo5;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:Verdana'>At 'The wizard is ready to install your
hardware', click Next. <o:p></o:p></span></li>
<li class=MsoNormal style='color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto;mso-list:l1 level1 lfo5;tab-stops:list .5in'><span style='font-size:
10.0pt;font-family:Verdana'>Click Finish at 'Completing the Add/Remove
Hardware Wizard.' <o:p></o:p></span></li>
</ol>
<br>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:10.0pt;font-family:Verdana;color:black'>Alternatively, you can
use the DEVCON.EXE from the DDK to install the driver programmatically.<o:p></o:p></span></p>
<p><b><span style='font-size:10.0pt;font-family:Verdana'>c:\&gt;DEVCON.EXE
INSTALL mars.inf "SD\vid_0388&pid_0000"</span></b><span style='font-size:10.0pt;font-family:
Verdana'><o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The system copies the
mars.sys file to %systemroot%\system32\drivers directory and loads the
driver. <o:p></o:p></span></p>
<h3><span style='font-size:14.0pt;mso-bidi-font-size:13.5pt;font-family:Verdana'>CODE
TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><u>File<span style='mso-tab-count:2'>           </span>Description<o:p></o:p></u></pre><pre><o:p>&nbsp;</o:p></pre>
<pre>ntddmars.h<span style='mso-spacerun:yes'>     </span>Header containing global definitions</pre>
<pre>mars.inx<span style='mso-spacerun:yes'>      </span>Device Installation File</pre>
<pre>mars.h<span style='mso-spacerun:yes'>   </span>Header containing driver specific definitions</pre>
<pre>mars.c<span style='mso-spacerun:yes'>   </span>Source code for driver functions</pre>
<pre>Sources<span style='mso-spacerun:yes'>       </span>Generic file for building the code sample.</pre>
<pre>makefile<span style='mso-spacerun:yes'>   </span>The file merely indirects to the real makefile that is shared by all the driver components of the windows Driver Kit.</pre>
<pre>makefile.inc<span style='mso-spacerun:yes'> </span>The file stamps the inx file with kmdf version and generates the inf file.</pre>
<pre>sdiosample.htm<span style='mso-spacerun:yes'> </span>Sample Tour documentation for this sample (this file).</pre>
<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-family:Verdana'><o:p>&nbsp;</o:p></span></h3>
<p class=MsoBodyText style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,203 +0,0 @@
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="serenum_files/filelist.xml">
<title>Serenum</title>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:black;}
h2
{color:black;}
h3
{color:black;}
h4
{color:black;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
p
{font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:black;}
pre
{margin-top:0in;
margin-bottom:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";
color:black;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
<meta name=Template content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple style='tab-interval:.5in'
leftmargin=8>
<div class=Section1>
<h2><a name=MYSAMPLE></a><span class=SpellE><span style='mso-bookmark:MYSAMPLE'><span
style='font-family:Verdana'>Serenum</span></span></span><span style='mso-bookmark:
MYSAMPLE'></span><span style='font-family:Verdana'> <o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>SUMMARY<o:p></o:p></span></h3>
<p><span class=SpellE><span style='font-size:10.0pt;font-family:Verdana'>Serenum</span></span><span
style='font-size:10.0pt;font-family:Verdana'> enumerates Plug-n-Play RS-232
devices that are compliant with the current revision of Plug and Play External
COM Device.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>It loads as an upper
filter driver to many different RS-232 device drivers that are compliant with
its requirements and performs this service for them. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>To build the sample, run
the <b>build</b> command. Once built, the sample produces one binary: <span
class=SpellE>Serenum.sys</span>. The sample is 64-bit compliant, works on both
x86 and Alpha platforms, and supports both Plug and Play and Power Management.
There is no one <span class=SpellE><span class=GramE>Inf</span></span> for <span
class=SpellE>serenum</span> because it is loaded as a filter driver in
different driver stacks. An example of this can be found in %WINDIR%\<span
class=SpellE>inf\msports.inf</span>. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><u>File<span style='mso-tab-count:2'>           </span>Description<o:p></o:p></u></pre><pre><o:p>&nbsp;</o:p></pre><pre><span
class=SpellE>Enum.c</span><span style='mso-spacerun:yes'>          </span>Functions that enumerate external serial devices—the main purpose of this driver</pre><pre><span
class=SpellE>Makefile</span><span style='mso-spacerun:yes'>        </span><span
class=SpellE>Makefile</span> for building this driver</pre><pre><span
class=SpellE>Pnp.c</span><span style='mso-spacerun:yes'>           </span>Plug and Play support code</pre><pre><span
class=SpellE>Power.c</span><span style='mso-spacerun:yes'>         </span>Power support code</pre><pre><span
class=SpellE>Serenum.c</span><span style='mso-spacerun:yes'>       </span>Basic driver functionality</pre><pre><span
class=SpellE>Serenum.h</span><span style='mso-spacerun:yes'>       </span>Local header with defines, prototypes, etc</pre><pre><span
class=SpellE>Serenum.rc</span><span style='mso-spacerun:yes'>      </span>Resource script</pre><pre>Sources<span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'>      </span>Data file for build.exe</pre><pre><span
class=SpellE>String.c</span><span style='mso-spacerun:yes'>        </span>String handling support; mainly ASCII to UNICODE functionality</pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<p align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:"Courier New"'><a href="#top"><span
style='font-family:Verdana'>Top of page</span></a></span><span
style='font-size:10.0pt;font-family:Verdana;mso-bidi-font-family:"Courier New"'>
<o:p></o:p></span></p>
<pre><o:p>&nbsp;</o:p></pre>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</td>
</tr>
</table>
<pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif";mso-bidi-font-family:"Courier New"'>©
2004 Microsoft Corporation</span><span style='font-size:10.0pt;font-family:
Verdana;mso-bidi-font-family:"Courier New"'> <o:p></o:p></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,680 +0,0 @@
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="devcon_files/filelist.xml">
<title>DevCon Sample</title>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Courier;
panose-1:2 7 4 9 2 2 5 2 4 4;
mso-font-alt:"Courier New";
mso-font-charset:0;
mso-generic-font-family:modern;
mso-font-format:other;
mso-font-pitch:fixed;
mso-font-signature:3 0 0 0 1 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
p.MsoListNumber, li.MsoListNumber, div.MsoListNumber
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:-120;
mso-list-type:simple;
mso-list-template-ids:-155046518;}
@list l0:level1
{mso-level-style-link:"List Number";
mso-level-tab-stop:.25in;
mso-level-number-position:left;
margin-left:.25in;
text-indent:-.25in;}
@list l1
{mso-list-id:2061856105;
mso-list-template-ids:886459906;}
@list l1:level1
{mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
</head>
<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
<div class=Section1>
<h2><span class=SpellE><span style='font-family:Verdana'>DevCon</span></span><span
style='font-family:Verdana'> Sample<o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>DEVCON<o:p></o:p></span></h3>
<p><span class=SpellE><span style='font-size:10.0pt;font-family:Verdana'>DevCon</span></span><span
style='font-size:10.0pt;font-family:Verdana'> is a command-line tool that
displays detailed information about devices, and lets you search for and
manipulate devices from the command line. <span class=SpellE>DevCon</span>
enables, disables, installs, configures, and removes devices on the local
computer and displays detailed information about devices on local and remote
computers. <span class=SpellE>DevCon</span> is included in the Windows DDK.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>ABOUT THIS DOCUMENT<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>This document describes
the <span class=SpellE>DevCon</span> source code, which is included in the
Windows DDK in the /<span class=SpellE>src/setup/devcon</span> directory. It
explains the <span class=SpellE>DevCon</span> design, and describes how to use
the <span class=SpellE>SetupAPI</span> and device installation functions to
enumerate devices and perform device operations in a console application.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>For a complete
description of <span class=SpellE>DevCon</span> features and instructions for
using them, see the <span class=SpellE>DevCon</span> help file in the DDK
documentation in Driver Development Tools/Tools for Testing Drivers/<span
class=SpellE>DevCon</span>.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>SCOPE<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>These instructions
pertain to Windows XP and Windows Server 2003. <span class=SpellE>DevCon</span>
was designed for use on Windows 2000, Windows XP, and Windows Server 2003. It
will not work on Windows 95, Windows 98, or Windows ME.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>HOW IT WORKS<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>Running &quot;<span
class=SpellE>devcon</span> help&quot; will provide a list of commands along
with short descriptions of what each command does. &quot;<span class=SpellE><span
class=GramE>devcon</span></span> help &lt;command&gt;&quot; will give more
detailed help on that command. The interpretation of each command is done via a
dispatch table &quot;<span class=SpellE>DispatchTable</span>&quot; that is at
the bottom of &quot;<span class=SpellE>cmds.cpp</span>&quot;. Some of the
commands make use of a generic device enumerator &quot;<span class=SpellE>EnumerateDevices</span>&quot;.
A few of these commands will work when given a remote target computer, and will
also work if using the 32-bit <span class=SpellE>devcon</span> on Wow64.&nbsp;
A description of some of the more interesting functions and the APIs they use
follows:<o:p></o:p></span></p>
<h4><span class=SpellE><span class=GramE><span style='font-family:Verdana'>cmdClasses</span></span></span><span
style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span style='font-size:10.0pt;font-family:Verdana'>This command demonstrates
the use of <span class=SpellE>SetupDiBuildClassInfoListEx</span> to enumerate
all device class <span class=SpellE>GUID's</span>. The function <span
class=SpellE>SetupDiClassNameFromGuidEx</span> and <span class=SpellE>SetupDiGetClassDescriptionEx</span>
are used to obtain more information about each device class.<o:p></o:p></span></p>
<h4><span class=SpellE><span class=GramE><span style='font-family:Verdana'>cmdListClass</span></span></span><span
style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span style='font-size:10.0pt;font-family:Verdana'>This command demonstrates
the use of <span class=SpellE>SetupDiClassGuidsFromNameEx</span> to enumerate
one or more class <span class=SpellE>GUID's</span> that match the class name.
This command also demonstrates the use of <span class=SpellE>SetupDiGetClassDevsEx</span>
to list all the devices for each class GUID.<o:p></o:p></span></p>
<h4><span class=SpellE><span class=GramE><span style='font-family:Verdana'>cmdFind</span></span></span><span
style='font-family:Verdana'> <span class=SpellE>cmdFindAll</span> <span
class=SpellE>cmdStatus</span><o:p></o:p></span></h4>
<p><span style='font-size:10.0pt;font-family:Verdana'>A simple use of <span
class=SpellE>EnumerateDevices</span> (explained below) to list devices and
display different levels of information about each device. Note that all but <span
class=SpellE>cmdFindAll</span> use DIGCF_PRESENT to only list information about
devices that are currently present. The main functionality for these and
related devices is done inside <span class=SpellE>FindCallback</span>.<o:p></o:p></span></p>
<h4><span class=SpellE><span class=GramE><span style='font-family:Verdana'>cmdEnable</span></span></span><span
style='font-family:Verdana'> <span class=SpellE>cmdDisable</span> <span
class=SpellE>cmdRestart</span><o:p></o:p></span></h4>
<p><span style='font-size:10.0pt;font-family:Verdana'>These&nbsp;commands show
how to issue DIF_PROPERTYCHANGE to enable a device, disable a device, or
restart a device. The main functionality for each of these commands is done
inside <span class=SpellE>ControlCallback</span>. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>These operations cannot
be done on a remote machine or in the context of Wow64. CFGMGR32 API's should
not be used as they skip class and co-installers. <o:p></o:p></span></p>
<h4><span class=SpellE><span class=GramE><span style='font-family:Verdana'>cmdUpdate</span></span></span><span
style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span style='font-size:10.0pt;font-family:Verdana'>This command shows how to
use <span class=SpellE>UpdateDriverForPlugAndPlayDevices</span> to update the
driver for all devices to a specific driver. Normally INSTALLFLAG_FORCE would
not be specified allowing <span class=SpellE>UpdateDriverForPlugAndPlayDevices</span>
to determine if there is a better match already known. It's specified in <span
class=SpellE>DevCon</span> to allow <span class=SpellE>DevCon</span> to be used
more effectively as a debugging/testing tool. This cannot be done on a remote
machine or in the context of Wow64. <o:p></o:p></span></p>
<h4><span class=SpellE><span class=GramE><span style='font-family:Verdana'>cmdInstall</span></span></span><span
style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span style='font-size:10.0pt;font-family:Verdana'>A variation of <span
class=SpellE>cmdUpdate</span> to install a driver when there is no associated
hardware. It creates a new root-enumerated device instance and associates it
with a made up hardware ID specified on the command line (which should
correspond to a hardware ID in the INF). This cannot be done on a remote
machine or in the context of Wow64.<o:p></o:p></span></p>
<h4><span class=SpellE><span class=GramE><span style='font-family:Verdana'>cmdRemove</span></span></span><span
style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span class=GramE><span style='font-size:10.0pt;font-family:Verdana'>A
command to remove devices.</span></span><span style='font-size:10.0pt;
font-family:Verdana'> Plug &amp; Play devices that are removed will reappear in
response to <span class=SpellE>cmdRescan</span>. The main functionality of this
command is in <span class=SpellE>RemoveCallback</span> that demonstrates the
use of DIF_REMOVE. This cannot be done on a remote machine or in the context of
Wow64. CFGMGR32 API's should not be used as they skip class and co-installers.<o:p></o:p></span></p>
<h4><span class=SpellE><span class=GramE><span style='font-family:Verdana'>cmdRescan</span></span></span><span
style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span style='font-size:10.0pt;font-family:Verdana'>This command shows the
correct way to rescan for all Plug &amp; Play devices that may have previously
been removed, or that otherwise require a rescan to detect them. <o:p></o:p></span></p>
<h4><span class=SpellE><span class=GramE><span style='font-family:Verdana'>cmdDPAdd</span></span></span><span
style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Verdana'>This
command allows you to add a Driver Package to the machine.<span
style='mso-spacerun:yes'>  </span>The main functionality of this command
demonstrates the use of <span class=SpellE>SetupCopyOEMInf</span>. Adding a Driver
Package to the machine doesnt mean the drivers are installed on devices, it
simply means the drivers are available automatically when a new device is
plugged in or <span class=GramE>a</span> existing device is updated.<o:p></o:p></span></p>
<h4><span class=SpellE><span class=GramE><span style='font-family:Verdana'>cmdDPDelete</span></span></span><span
style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Verdana'>This
command allows you to uninstall a Driver Package from the machine.<span
style='mso-spacerun:yes'>  </span>The main functionality of this command
demonstrates the use of <span class=SpellE>SetupUninstallOEMInf</span>.
Removing a Driver Package from the machine does not uninstall the drivers
associated with a device. If you want to accomplish both then use <span
class=SpellE>cmdRemove</span> on all the devices using a given Driver Package
and then <span class=SpellE>cmdDPDelete</span> to remove the Driver Package
itself from the machine. This functionality is not available in Windows 2000 or
earlier.<o:p></o:p></span></p>
<h4><span class=SpellE><span class=GramE><span style='font-family:Verdana'>cmdDPEnum</span></span></span><span
style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Verdana'>This
command allows you to enumerate all of the 3<sup>rd</sup> party Driver Packages
currently installed on the machine and also shows you how to get some common
properties from a Driver Package (Provider, Class description, <span
class=SpellE>DriverVer</span> date and version).<o:p></o:p></span></p>
<h4><span class=SpellE><span class=GramE><span style='font-family:Verdana'>cmdDPEnumLegacy</span></span></span><span
style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Verdana'>This
command shows you how to enumerate 3<sup>rd</sup> party Driver Packages on
Windows Server 2003 and earlier operating systems.<o:p></o:p></span></p>
<h4><span style='font-family:Verdana'>Reboot<o:p></o:p></span></h4>
<p><span style='font-size:10.0pt;font-family:Verdana'>This function shows how
to correctly reboot the machine from a hardware install program. In particular
it passes flags to <span class=SpellE>ExitWindowsEx</span> that cause the
reboot to be associated with hardware installation. You should never reboot <span
class=GramE>the</span> machine unnecessarily.<o:p></o:p></span></p>
<h4><span class=SpellE><span style='font-family:Verdana'>EnumerateDevices</span></span><span
style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span class=GramE><span style='font-size:10.0pt;font-family:Verdana'>Demonstrates
the use of <span class=SpellE>SetupDiGetClassDevsEx</span> to enumerate all
devices or all present devices, either globally or limited to a specific setup
class.</span></span><span style='font-size:10.0pt;font-family:Verdana'>
Demonstrates the use of <span class=SpellE>SetupDiCreateDeviceInfoListEx</span>
to create a blank list associated with a class or not (for most cases, a blank
list need not be associated with a class). <span class=GramE>Demonstrates the
use of <span class=SpellE>SetupDiOpenDeviceInfo</span> to add a device instance
into a device info list.</span> These last two API's are ideal to obtain a <span
class=SpellE>DeviceInfoData</span> structure from a device instance and machine
name when mixing CFGMGR32 API's with SETUPAPI API's. <span class=SpellE>SetupDiGetDeviceInfoListDetail</span>
is called to obtain a remote machine handle that may be passed into CFGMGR32
API's. <span class=SpellE>SetupDiEnumDeviceInfo</span> is called to enumerate
each and every device that is in the device info list (either explicitly added,
or determined by the call to <span class=SpellE>SetupDiGetClassDevsEx</span>).
The instance ID is obtained by calling <span class=SpellE>CM_Get_Device_ID_Ex</span>,
using information in <span class=SpellE>devInfo</span> (obtained from <span
class=SpellE>SetupDiEnumerateDeviceInfo</span>) and <span class=SpellE>devInfoListDetail</span>
(obtained from <span class=SpellE>SetupDiGetDeviceInfoListDetail</span>). <span
class=SpellE>GetHwIds</span> is called to obtain a list of hardware and
compatible ID's (explained below). Once an interesting device has been
determined (typically by checking hardware ID's) then the callback is called to
operate on that individual device.<o:p></o:p></span></p>
<h4><span class=SpellE><span style='font-family:Verdana'>GetHwIds</span></span><span
style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span style='font-size:10.0pt;font-family:Verdana'>Shows how to get the
complete list of hardware ID's or compatible ID's for a device using <span
class=SpellE>SetupDiGetDeviceRegistryProperty</span>.<o:p></o:p></span></p>
<h4><span class=SpellE><span style='font-family:Verdana'>GetDeviceDescription</span></span><span
style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span class=GramE><span style='font-size:10.0pt;font-family:Verdana'>Shows
how to obtain descriptive information about a device.</span></span><span
style='font-size:10.0pt;font-family:Verdana'> The friendly name is used if it <span
class=GramE>exists,</span> otherwise the device description is used.<o:p></o:p></span></p>
<h4><span class=SpellE><span style='font-family:Verdana'>DumpDeviceWithInfo</span></span><span
style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span class=GramE><span style='font-size:10.0pt;font-family:Verdana'>Shows
how to obtain an instance ID (or use any CFGMGR32 API) given HDEVINFO (device
info list) and PSP_DEVINFO_DATA (device info data).</span></span><span
style='font-size:10.0pt;font-family:Verdana'><o:p></o:p></span></p>
<h4><span class=SpellE><span style='font-family:Verdana'>DumpDeviceStatus</span></span><span
style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span class=GramE><span style='font-size:10.0pt;font-family:Verdana'>Shows
how to interpret the information returned by <span class=SpellE>CM_Get_DevNode_Status_Ex</span>.
Refer to <span class=SpellE>cfg.h</span> for information returned by this API.</span></span><span
style='font-size:10.0pt;font-family:Verdana'> <o:p></o:p></span></p>
<h4><span class=SpellE><span style='font-family:Verdana'>DumpDeviceResources</span></span><span
style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span class=GramE><span style='font-size:10.0pt;font-family:Verdana'>Shows
how to obtain information about resources used by a device.</span></span><span
style='font-size:10.0pt;font-family:Verdana'><o:p></o:p></span></p>
<h4><span class=SpellE><span style='font-family:Verdana'>DumpDeviceDriverFiles</span></span><span
style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span style='font-size:10.0pt;font-family:Verdana'>Provided as a debugging
aid, obtains information about the files apparently being used for a device. It
uses <span class=SpellE>SetupDiBuildDriverInfoList</span> to obtain information
about the driver being used for the specified device. The driver list
associated with a device may be enumerated by calling <span class=SpellE>SetupDiEnumDriverInfo</span>.
In this case, there will be no more than one driver listed. This function
proceeds to obtain a list of files that would normally be copied for this
driver using DIF_INSTALLDEVICEFILES. <span class=SpellE>SetupScanFileQueue</span>
is used to enumerate the file queue to display the list of files that are associated
with the driver.<o:p></o:p></span></p>
<h4><span class=SpellE><span style='font-family:Verdana'>DumpDeviceDriverNodes</span></span><span
style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span style='font-size:10.0pt;font-family:Verdana'>Provided as a debugging
aid, this function determines the list of compatible drivers for a device. It
uses <span class=SpellE>SetupDiBuildDriverInfoList</span> to obtain the list of
compatible drivers. In this case, all drivers are enumerated, however typically
DIF_SELECTBESTCOMPATDRV and <span class=SpellE>SetupDiGetSelectedDriver</span>
would be used together to find which driver the OS would consider to be the
best. <o:p></o:p></span></p>
<h4><span class=SpellE><span style='font-family:Verdana'>DumpDeviceStack</span></span><span
style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span style='font-size:10.0pt;font-family:Verdana'>This function determines
class and device upper and lower filters. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>BUILDING THE DEVCON SAMPLE<o:p></o:p></span></h3>
<h5><span style='font-family:Verdana'>To build the <span class=SpellE>devcon</span>
sample:<o:p></o:p></span></h5>
<p class=MsoListNumber style='margin-left:.5in;text-indent:-.25in;mso-list:
l1 level1 lfo3;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana'><span style='mso-list:Ignore'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Click the Build Environment icon
of choice in the Development Kits Build Environments sub-menu. This will set up
the correct build environment to build this sample. Note that this sample will
build in the 64-bit environments as well as the 32-bit environments. <o:p></o:p></span></p>
<p class=MsoListNumber style='margin-left:.5in;text-indent:-.25in;mso-list:
l1 level1 lfo3;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana'><span style='mso-list:Ignore'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>In a command window, change to the
directory containing the <span class=SpellE>DevCon</span> source code. For
example:<o:p></o:p></span></p>
<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'>
<p style='margin-left:.5in'><span class=SpellE><span class=GramE><b><span
style='font-size:10.0pt;font-family:Verdana'>cd</span></b></span></span><b><span
style='font-size:10.0pt;font-family:Verdana'> <span class=SpellE>src\setup\devcon</span></span></b><span
style='font-size:10.0pt;font-family:Verdana'> <o:p></o:p></span></p>
</blockquote>
<p class=MsoListNumber style='margin-left:.5in;text-indent:-.25in;mso-list:
l1 level1 lfo3;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana'><span style='mso-list:Ignore'>3.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Use the macro BLD or run the
following from the command prompt: <o:p></o:p></span></p>
<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'>
<p><span class=GramE><b><span style='font-size:10.0pt;font-family:Verdana'>build</span></b></span><b><span
style='font-size:10.0pt;font-family:Verdana'> –c</span></b><span
style='font-size:10.0pt;font-family:Verdana'> <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>This invokes the
Microsoft make routines that produce the <span class=SpellE>Build.log</span>, <span
class=SpellE>Build.wrn</span>, and <span class=SpellE>Build.err</span> log
files. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>When the build completes,
the executable will be placed in the ObjXXX\I386 subdirectory of the
&lt;TARGETPATH&gt; directory specified in the Sources file (depending on build
environment chosen). <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>If the build does not
succeed, check for these errors: 1) the build environment is not set up
properly, or 2) modifications made to the sample source code introduced errors.
<o:p></o:p></span></p>
</blockquote>
<h3><span style='font-family:Verdana'>USING DEVCON<o:p></o:p></span></h3>
<p><span class=SpellE><span style='font-size:10.0pt;font-family:Verdana'>DevCon</span></span><span
style='font-size:10.0pt;font-family:Verdana'> is provided in ready-to-run form
in tools\<span class=SpellE>devcon</span>. For usage, refer to the document
provided with devcon.exe. <span class=SpellE>DevCon</span> is a command line
utility with built-in documentation available by typing &quot;<span
class=SpellE>devcon</span> help&quot;. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>TESTING<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>Type &quot;<span
class=SpellE>devcon</span> find *&quot; to list device instances of all present
devices on the local machine.<o:p></o:p></span></p>
<p><span class=GramE><span style='font-size:10.0pt;font-family:Verdana'>Type
&quot;<span class=SpellE>devcon</span> status @root\rdp_mou\0000&quot; to list
status of the terminal server mouse driver.</span></span><span
style='font-size:10.0pt;font-family:Verdana'><o:p></o:p></span></p>
<p><span class=GramE><span style='font-size:10.0pt;font-family:Verdana'>Type
&quot;<span class=SpellE>devcon</span> status *PNP05*&quot; to list status of
all COM ports.</span></span><span style='font-size:10.0pt;font-family:Verdana'><o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<table class=MsoNormalTable border=0 cellspacing=1 cellpadding=0 width=916
style='width:687.0pt;mso-cellspacing:.7pt;mso-padding-alt:0in 0in 0in 0in'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
<td width=151 valign=top style='width:113.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal><u>File</u></p>
</td>
<td width=755 style='width:566.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal><u>Description</u></p>
</td>
</tr>
<tr style='mso-yfti-irow:1'>
<td width=151 valign=top style='width:113.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal><i>DevCon.htm</i></p>
</td>
<td width=755 style='width:566.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal>Sample tour documentation for this binary (this file).</p>
</td>
</tr>
<tr style='mso-yfti-irow:2'>
<td width=151 valign=top style='width:113.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal><span class=SpellE><i>DevCon.cpp</i></span></p>
</td>
<td width=755 style='width:566.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal>Source file for <span class=SpellE>tmain</span> entry
point and utility functions.</p>
</td>
</tr>
<tr style='mso-yfti-irow:3'>
<td width=151 valign=top style='width:113.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal><span class=SpellE><i>Cmds.cpp</i></span></p>
</td>
<td width=755 style='width:566.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal>Source file for supported commands.</p>
</td>
</tr>
<tr style='mso-yfti-irow:4'>
<td width=151 valign=top style='width:113.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal><span class=SpellE><i>Dump.cpp</i></span></p>
</td>
<td width=755 style='width:566.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal>Source file for functions that output information about
devices.</p>
</td>
</tr>
<tr style='mso-yfti-irow:5'>
<td width=151 valign=top style='width:113.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal><span class=SpellE><i>DevCon.h</i></span></p>
</td>
<td width=755 style='width:566.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal><span class=GramE>Header file</span> for sample.</p>
</td>
</tr>
<tr style='mso-yfti-irow:6'>
<td width=151 valign=top style='width:113.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal><span class=SpellE><i>DevCon.rc</i></span></p>
</td>
<td width=755 style='width:566.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal><span class=GramE>Resource file</span> containing some
strings and version information.</p>
</td>
</tr>
<tr style='mso-yfti-irow:7'>
<td width=151 valign=top style='width:113.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal><span class=SpellE><i>rc_ids.h</i></span></p>
</td>
<td width=755 style='width:566.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal><span class=GramE>Header file</span> for resources.</p>
</td>
</tr>
<tr style='mso-yfti-irow:8'>
<td width=151 valign=top style='width:113.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal><span class=SpellE><i>Msg.mc</i></span></p>
</td>
<td width=755 style='width:566.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal>Message file that is used to build <span class=SpellE>msg.rc</span>
and <span class=SpellE>msg.h</span> used for help texts and other messages.</p>
</td>
</tr>
<tr style='mso-yfti-irow:9'>
<td width=151 valign=top style='width:113.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal><i>Sources</i></p>
</td>
<td width=755 style='width:566.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal>Generic file that lists source files and all the build
options.</p>
</td>
</tr>
<tr style='mso-yfti-irow:10;mso-yfti-lastrow:yes'>
<td width=151 valign=top style='width:113.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal><span class=SpellE><i>Makefile</i></span></p>
</td>
<td width=755 style='width:566.25pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal>File that redirects to the real make file that is shared
by all the driver components of the Windows DDK.</p>
</td>
</tr>
</table>
<h3><span style='font-family:Courier'>FEEDBACK<o:p></o:p></span></h3>
<p><span style='font-family:Courier'>We welcome your comments, problem reports
and wish-list requests. Please submit them by pointing your Internet browser to
<a href="http://www.microsoft.com/ddk">http://www.microsoft.com/ddk</a>. </span></p>
<p align=center style='text-align:center'><span style='font-size:10.0pt;
font-family:Verdana'><a href="#top">Top of page</a><o:p></o:p></span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-padding-alt:0in 5.4pt 0in 5.4pt'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><span style='font-size:2.0pt;mso-bidi-font-size:12.0pt'><o:p>&nbsp;</o:p></span></p>
</td>
</tr>
</table>
<p><span style='font-size:7.5pt;font-family:"MS Sans Serif"'>© 2004</span><span
style='font-size:10.0pt;font-family:Verdana'> </span><span style='font-size:
7.5pt;font-family:"MS Sans Serif"'>Microsoft Corporation </span><span
style='font-size:10.0pt;font-family:Verdana'><o:p></o:p></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,867 +0,0 @@
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 12">
<meta name=Originator content="Microsoft Word 12">
<link rel=File-List href="pscr2_files/filelist.xml">
<title>PSCR.SYS—PCMCIA Smart Card Driver</title>
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Author>Michael Tsang</o:Author>
<o:LastAuthor>Michael Tsang</o:LastAuthor>
<o:Revision>2</o:Revision>
<o:TotalTime>75</o:TotalTime>
<o:Created>2009-02-13T19:09:00Z</o:Created>
<o:LastSaved>2009-02-13T19:09:00Z</o:LastSaved>
<o:Pages>1</o:Pages>
<o:Words>838</o:Words>
<o:Characters>4780</o:Characters>
<o:Company>Microsoft</o:Company>
<o:Lines>39</o:Lines>
<o:Paragraphs>11</o:Paragraphs>
<o:CharactersWithSpaces>5607</o:CharactersWithSpaces>
<o:Version>12.00</o:Version>
</o:DocumentProperties>
</xml><![endif]-->
<link rel=themeData href="pscr2_files/themedata.thmx">
<link rel=colorSchemeMapping href="pscr2_files/colorschememapping.xml">
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>125</w:Zoom>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:TrackMoves>false</w:TrackMoves>
<w:TrackFormatting/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:DontVertAlignCellWithSp/>
<w:DontBreakConstrainedForcedTables/>
<w:DontVertAlignInTxbx/>
<w:Word11KerningPairs/>
<w:CachedColBalance/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="&#45;-"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Courier;
panose-1:2 7 4 9 2 2 5 2 4 4;
mso-font-charset:0;
mso-generic-font-family:modern;
mso-font-format:other;
mso-font-pitch:fixed;
mso-font-signature:3 0 0 0 1 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-pitch:variable;
mso-font-signature:-1610611985 1107304683 0 0 415 0;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;
mso-font-charset:0;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:-520092929 1073806591 9 0 415 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-1593833729 1073750107 16 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
@font-face
{font-family:"MS Shell Dlg";
panose-1:2 11 6 4 2 2 2 2 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-520082689 -1073741822 8 0 66047 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";}
h2
{mso-style-priority:9;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"Heading 2 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
font-weight:bold;}
h3
{mso-style-priority:9;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"Heading 3 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
font-weight:bold;}
h4
{mso-style-priority:9;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"Heading 4 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
font-weight:bold;}
a:link, span.MsoHyperlink
{mso-style-noshow:yes;
mso-style-priority:99;
color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-noshow:yes;
mso-style-priority:99;
color:purple;
text-decoration:underline;
text-underline:single;}
p
{mso-style-noshow:yes;
mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";}
pre
{mso-style-noshow:yes;
mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";}
span.Heading2Char
{mso-style-name:"Heading 2 Char";
mso-style-noshow:yes;
mso-style-priority:9;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 2";
mso-ansi-font-size:13.0pt;
mso-bidi-font-size:13.0pt;
font-family:"Cambria","serif";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;}
span.Heading3Char
{mso-style-name:"Heading 3 Char";
mso-style-noshow:yes;
mso-style-priority:9;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 3";
mso-ansi-font-size:12.0pt;
mso-bidi-font-size:12.0pt;
font-family:"Cambria","serif";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;}
span.Heading4Char
{mso-style-name:"Heading 4 Char";
mso-style-noshow:yes;
mso-style-priority:9;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 4";
mso-ansi-font-size:12.0pt;
mso-bidi-font-size:12.0pt;
font-family:"Cambria","serif";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;
font-style:italic;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
mso-ascii-font-family:Consolas;
mso-hansi-font-family:Consolas;
mso-bidi-font-family:Consolas;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
font-size:10.0pt;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:1673945939;
mso-list-type:hybrid;
mso-list-template-ids:-2047047524 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<u1:shapedefaults u2:ext="edit" spidmax="4098"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<u3:shapelayout u4:ext="edit">
<u3:idmap u4:ext="edit" data="1"/>
</u3:shapelayout>
</xml><![endif]--><!--[if gte mso 9]><xml>
<u1:shapedefaults u2:ext="edit" spidmax="3074"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<u3:shapelayout u4:ext="edit">
<u3:idmap u4:ext="edit" data="1"/>
</u3:shapelayout>
</xml><![endif]--><!--[if gte mso 9]><xml>
<u1:shapedefaults u2:ext="edit" spidmax="2050"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<u3:shapelayout u4:ext="edit">
<u3:idmap u4:ext="edit" data="1"/>
</u3:shapelayout>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="3074"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple style='tab-interval:.5in'
leftmargin=8>
<div class=Section1>
<h2><a name=MYSAMPLE></a><a name="_top"></a><span style='mso-bookmark:MYSAMPLE'><span
style='font-family:"Verdana","sans-serif";mso-fareast-font-family:"Times New Roman"'>PSCR.SYS—PCMCIA
Smart Card Driver</span></span><u5:p></u5:p><u6:p></u6:p><span
style='mso-bookmark:MYSAMPLE'></span><span style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h2>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'><u7:p></u7:p>SUMMARY<u7:p></u7:p></span><span
style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>The PCMCIA
Smart Card Driver is used for the SCM PCMCIA smart card reader. <u7:p></u7:p>This
driver is written using Kernel-Mode Driver Framework. </span></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>This
driver implements Plug and Play and Power Management and is compliant with
64-bit versions of Microsoft®&nbsp;Windows®.<u7:p></u7:p></span></p>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>BUILDING PSCR.SYS<u7:p></u7:p></span><span style='mso-fareast-font-family:
"Times New Roman"'><o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>To build
the Pscr.sys driver, select either the checked or free DDK environment,
navigate to the Bulltlp3 directory, and type <b>build</b>.&nbsp;This driver
uses services provided by the smart card driver library (Smclib.sys), which are
explained in detail in the accompanying documentation.<u7:p></u7:p></span></p>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>INSTALLING PSCR.SYS<u7:p></u7:p></span><span
style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>The
PSCR.SYS driver is included in-box in the Windows Operating Systems. Therefore,
when the SCM 488 PCMCIA reader is inserted, the system will automatically
install the in-box driver. However, if you want to customize the source code of
this driver and would like to replace the in-box driver with your driver, you
can follow the instructions below.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>To install
your driver, you will need to provide the INF file (on a disk), WDF <span
class=SpellE>coinstaller</span> from the %BASEDIR%\<span class=SpellE>redist</span>\<span
class=SpellE>wdf</span>\ directory and the driver file, which will be copied to
your System32\Drivers directory. The INF file makes a reference to the WDF <span
class=SpellE>coinstaller</span>. </span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-fareast-font-family:
Verdana;mso-bidi-font-family:Verdana'><span style='mso-list:Ignore'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Launch “Device
Manager” by clicking the “Windows” button and type “devmgmt.msc” in the “Search
programs and files” box.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-fareast-font-family:
Verdana;mso-bidi-font-family:Verdana'><span style='mso-list:Ignore'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Locate the SCM 488
Smartcard reader device from the “Smart cards readers” category.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-fareast-font-family:
Verdana;mso-bidi-font-family:Verdana'><span style='mso-list:Ignore'>3.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Right click on the
reader device and select “Update Driver Software…<span class=GramE>”.</span><o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-fareast-font-family:
Verdana;mso-bidi-font-family:Verdana'><span style='mso-list:Ignore'>4.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Select “Browse my
computer for driver software”.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-fareast-font-family:
Verdana;mso-bidi-font-family:Verdana'><span style='mso-list:Ignore'>5.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Select “Let me pick
from a list of device drivers on my computer”.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-fareast-font-family:
Verdana;mso-bidi-font-family:Verdana'><span style='mso-list:Ignore'>6.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Click the “Have
Disk…” button and point it to the folder that contains your driver, INF and
coinstaller.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-fareast-font-family:
Verdana;mso-bidi-font-family:Verdana'><span style='mso-list:Ignore'>7.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Follow the
instructions of the device installation wizard to finish the installation.<o:p></o:p></span></p>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>TOOLS</span><span style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Microsoft
offers a test tool (Ifdtest.exe) that allows you to use a smart card reader
directly from the command line. Normally, the smart card resource manager is
connected to a reader. To use Ifdtest.exe, you must stop the smart card
resource manager (Scardsvr.exe) by typing <b>net stop <span class=SpellE>scardsvr</span></b>
at the command line. Ifdtest.exe is also used for the smart card reader logo
test.<u7:p></u7:p><o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>The driver
will not unload as long as you have Ifdtest.exe running and connected to the
driver. <u7:p></u7:p></span></p>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>You can
download Ifdtest.exe from </span><span style='font-size:10.0pt;font-family:
"Verdana","sans-serif";mso-bidi-font-family:"MS Shell Dlg"'><a
href="http://www.microsoft.com/whdc/whql/default.mspx">http://www.microsoft.com/whdc/whql/default.mspx</a></span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'> by following the
links for smart cards. You need to order special test smart cards to have your
smart card reader qualify for the &quot;Designed for Windows&quot; logo. You
can find ordering information at </span><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";mso-bidi-font-family:"MS Shell Dlg"'><a
href="http://www.microsoft.com/whdc/whql/default.mspx">http://www.microsoft.com/whdc/whql/default.mspx</a></span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>. <u7:p></u7:p>&nbsp;<u7:p></u7:p></span></p>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>RESOURCES<u7:p></u7:p></span><span style='mso-fareast-font-family:
"Times New Roman"'><o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>ISO 7816
Part 3 describes smart cards and smart card protocols in detail. Refer to the
PC99 Handbook for smart card reader requirements.<u7:p></u7:p></span></p>
<h3><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>CODE TOUR<u7:p></u7:p></span><span style='mso-fareast-font-family:
"Times New Roman"'><o:p></o:p></span></h3>
<h4><span style='font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>File Manifest<u7:p></u7:p></span><span style='mso-fareast-font-family:
"Times New Roman"'><o:p></o:p></span></h4>
<pre><u>Files<span style='mso-spacerun:yes'>         </span>Description<u7:p></u7:p></u></pre><pre>PSCR.HTM<span style='mso-spacerun:yes'>      </span>The documentation for this sample (this file).</pre><pre>PSCR.RC<span style='mso-spacerun:yes'>       </span>Resource <span
class=GramE>definition file</span> for driver.</pre><pre><span class=GramE><span
style='font-family:Courier'>SOURCES<span style='mso-spacerun:yes'>       </span>The generic file for building the code sample.<u7:p></u7:p></span></span></pre><pre><span
style='font-family:Courier'>MAKEFILE<span style='mso-spacerun:yes'>      </span><span
class=SpellE>Makefile</span> required <span class=GramE>to build</span> the driver.<u7:p></u7:p></span></pre><pre><span
style='font-family:Courier'>PSCR.INF<span style='mso-spacerun:yes'>      </span>The INF <span
class=GramE>file</span> for installing the code sample.<u7:p></u7:p></span></pre><pre><span
style='font-family:Courier'>PSCRCB.C<span style='mso-spacerun:yes'>      </span>Source file that contains the callback functions for the smart card library.<u7:p></u7:p></span></pre><pre><span
style='font-family:Courier'>PSCRCB.H<span style='mso-spacerun:yes'>      </span>Function prototypes for the previous file.<u7:p></u7:p></span></pre><pre><span
style='font-family:Courier'>PSCRCMD.C<span style='mso-spacerun:yes'>     </span>Implements the reader commands.<u7:p></u7:p></span></pre><pre><span
style='font-family:Courier'>PSCRCMD.H<span style='mso-spacerun:yes'>     </span>Function prototypes for the previous file.<u7:p></u7:p></span></pre><pre><span
style='font-family:Courier'>PSCRLOG.MC<span style='mso-spacerun:yes'>    </span>Error messages for this driver.<u7:p></u7:p></span></pre><pre><span
style='font-family:Courier'>PSCRNT.C<span style='mso-spacerun:yes'>      </span>The main source file (load, unload, Plug and Play, Power Management).<u7:p></u7:p></span></pre><pre><span
class=GramE><span style='font-family:Courier'>PSCRNT.H<span style='mso-spacerun:yes'>      </span>Data definitions and prototypes for the previous file.<u7:p></u7:p></span></span></pre><pre><span
style='font-family:Courier'>PSCRRDWR.C<span style='mso-spacerun:yes'>    </span>Implements read/write operations.<u7:p></u7:p></span></pre><pre><span
class=GramE><span style='font-family:Courier'>PSCRRDWR.H<span style='mso-spacerun:yes'>    </span>Data definitions and constant definitions for this reader.<u7:p></u7:p></span></span></pre><pre><span
class=GramE><span style='font-family:Courier'>PSCRVERS.H<span style='mso-spacerun:yes'>    </span>Driver-specific version information.<u7:p></u7:p></span></span></pre><pre><span
style='font-family:"Verdana","sans-serif"'> </span><o:p></o:p></pre>
<h4 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-family:"Verdana","sans-serif";mso-fareast-font-family:"Times New Roman"'><u7:p></u7:p><u5:p></u5:p><u6:p></u6:p>Programming
Tour<u7:p></u7:p><o:p></o:p></span></h4>
<h4 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman"'>Driver Design<o:p></o:p></span></h4>
<h4 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-fareast-font-family:
"Times New Roman";font-weight:normal;mso-bidi-font-weight:bold'>This driver in its
original form was written in WDM. It was converted to KMDF to avail all the
benefits provided by KMDF in terms of reducing complexity and making it robust.
Since this driver still had to work with the existing smartcard library to
handle smartcard specific processing, I couldnt restrict the driver to using
only KMDF interfaces. I have to escape out of KMDF for processing I/O requests
to get the underlying IRPs and provide that to smartcard library, and use
advanced IRP handling techniques to work around the limitations imposed by
smartcard library. Except for this quirk, the driver as a whole is fully
functional KMDF driver. As a sample, it also makes it easier for somebody to
adapt this driver for USB devices because KMDF has good support for interfacing
with USB devices.<o:p></o:p></span></h4>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><b><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Power Management</span></b><u5:p></u5:p><u6:p></u6:p><o:p></o:p></p>
<u7:p></u7:p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Power Management is
described in detail in the DDK documentation. There is, however, one situation
that is specific to smart card readers: how to deal with smart card insertions
and removals while the system is in standby or hibernation mode. <u7:p></u7:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Your reader will
not see any card insertion or removal events in these modes, because the bus
might not even have power. You must save the card state before your reader goes
into standby or hibernation mode. After the system returns from these modes,
you need to determine what the state of the card is. You must complete card
tracking calls whenever there was a card in the reader before standby or
hibernation mode <i>or</i> whenever there is a card in the reader after these
modes. This step is necessary because the user could have changed the card
while the system was in a low-power mode. <u7:p></u7:p></span></p>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>&nbsp;</p>
<p align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
href="#_top"><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Top
of page</span></a><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>
</span><o:p></o:p></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=499
style='width:5.2in;mso-cellspacing:0in;mso-yfti-tbllook:1184;mso-padding-alt:
0in 5.4pt 0in 5.4pt'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.2pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.2pt'>
<p class=MsoNormal><span style='color:black'><u7:p><u7:p></u7:p><u5:p></u5:p><u6:p></u6:p>&nbsp;</u7:p></span></p>
</td>
</tr>
</table>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif","serif"'>© 2004 Microsoft
Corporation</span><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>
</span><o:p></o:p></p>
</div>
<u6:p></u6:p><u5:p></u5:p><u7:p></u7:p>
</body>
</html>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,86 +0,0 @@
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<META NAME="Generator" CONTENT="Microsoft Word 97">
<TITLE>CD ROM</TITLE>
<META NAME="Template" CONTENT="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
</HEAD>
<BODY TEXT="#000000" LINK="#0000ff" VLINK="#800080" BGCOLOR="#ffffff" leftmargin="8">
<FONT FACE="Verdana"><H2><A NAME="MYSAMPLE">CD ROM</A> </H2>
<H3>SUMMARY</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
The CD ROM driver is used to provide access to CD, DVD and Blu-ray drives. It supports Plug and Play, Power Management, and AutoRun (media change notification). It is a 64-bit compliant driver.
<H3>BUILDING THE SAMPLE</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
To build cdrom.sys, you must first set up the DDK/WDK environment on your host machine. The "Installation and Release Notes" in the Windows 2000/XP/Server 2003/Vista/Server 2008/Windows 7 DDK/WDK has a complete description on how to do this.
<UL>
<LI>Click the <B>Free Build Environment</B> or <B>Checked Build Environment</B> icon under your Windows Driver Kit program group to set basic environment variables need by the build utility.</LI>
<LI>Change to the directory containing the driver source code, such as "cd src\storage\class\cdrom".</LI>
<LI>Build the driver by typing <B>BLD</B>.</LI>
</UL>
Macro <B>BLD</B> invokes the Microsoft make routines that produce log file called buildxxx_yyy_zzz.log, and also buildxxx_yyy_zzz.wrn and buildxxx_yyy_zzz.err if there are any warnings or errors, where xxx stands for <B>fre</B> or <B>chk</B> depending on the environment chosen, yyy stands for the OS version (W2k, WXP, Wnet or Win7), and zzz stands for platform version (x86, ia64 or amd64).
<P>If the build succeeds, the driver will be placed in the binary output directory specified for the build environment. You can get the output path from the buildxxx_yyy_zzz.log file.
<H3>INSTALLATION</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
The in-box CD ROM driver is protected by the system, and thus a normal device driver update attempt through the Device Manager will fail. Users are not encouraged to replace the in-box CD ROM driver. The following work-around is provided in case there is a need, but the users are warned that this may harm the system.
<UL>
<LI>Click the <B>Free Build Environment</B> or <B>Checked Build Environment</B> icon under your Windows Driver Kit program group to set basic environment variables need by the build utility.</LI>
<LI>Change to the directory containing the driver source code, such as "cd src\storage\class\cdrom".</LI>
<LI>Update the "sources" file by changing the "TARGETNAME" from "cdrom" to "mycdrom".</LI>
<LI>Build the driver by typing <B>BLD</B>.</LI>
<LI>Locate the "cdrom.inf" file in the binary output directory, and update the file by replacing all "cdrom.sys" occurrences with "mycdrom.sys".</LI>
<LI>Rename the "cdrom.inf" file to "mycdrom.inf".</LI>
<LI>Copy "mycdrom.sys" and "mycdrom.inf" from the binary output directory to the test machine, if applicable.</LI>
<LI>Launch the Device Manager (by clicking on Windows Start, Run option and typing "devmgmt.msc").</LI>
<LI>Select the appropriate device under the "DVD/CD-ROM drives" category.</LI>
<LI>On the right-click menu, select "Update Driver Software...".</LI>
<LI>Select "Browse my computer for driver software".</LI>
<LI>Select "Let me pick from a list of device drivers on my computer".</LI>
<LI>Click "Have Disk...", and point to the directory that contains "mycdrom.inf" and "mycdrom.sys".</LI>
<LI>Click "Next". If you get a warning dialog about installing unsigned driver, click "Yes".</LI>
<LI>Click "Next" to complete the driver upgrade.</LI>
</UL>
<B>NOTE:</B> After installation completes successfully, "mycdrom.sys" will be the effective driver for the device, "cdrom.sys" will no longer be used.
<H3>CODE TOUR</H3>
<H4>File Manifest</H4>
</FONT><U><PRE>File&#9;&#9; Description
</U>
aacs.c&#9;&#9; The CDROM class driver implementation of handling AACS IOCTLs
autorun.c&#9; Code for supporting media change detection in the cd/dvd driver
cdrom.c&#9;&#9; Main code base
cdrom.h&#9;&#9; Main header file for cdrom.sys
cdrom.htm&#9; This file
cdrom.inf&#9; The CDROM class driver configuration file
cdrom.rc&#9; Resource file
cdromp.h&#9; Private header file for cdrom.sys modules
common.c&#9; Shared private routines for cdrom.sys
data.c&#9;&#9; Global data definitions
guid.c&#9;&#9; GUIDs needed for cdrom.sys
init.c&#9;&#9; Initialization routines for cdrom.sys
ioctl.c&#9;&#9; Ioctl dispatch handlers
ioctl.h&#9;&#9; Ioctl dispatch handlers - header file
makefile&#9; Makefile
makefile.inc&#9; Makefile used to generate custom targets required by the module
mmc.c&#9;&#9; All functions related to MMC
mmc.h&#9;&#9; All functions related to MMC - header file
pnppower.c&#9; Functions to handle PnP and Power IRPs
scratch.c&#9; Functions for using common scratch buffer
scratch.h&#9; Functions for using common scratch buffer - header file
sense.c&#9;&#9; Functions needed to accurately determine how to retry requests on CDROM device types
sources&#9;&#9; Macro definitions that are recognized by the Build utility
</FONT><P ALIGN="CENTER"><A HREF="#top"><FONT FACE="Verdana" SIZE=2>Top of page</FONT></A><FONT FACE="Verdana" SIZE=2> </P></FONT>
<TABLE CELLSPACING=0 BORDER=0 WIDTH=624>
<TR><TD VALIGN="MIDDLE" BGCOLOR="#00ffff" HEIGHT=2>
<P></TD>
</TR>
</TABLE>
<FONT FACE="MS Sans Serif" SIZE=1><P>&copy; 2008 Microsoft Corporation</FONT><FONT FACE="Verdana" SIZE=2> </P></FONT></BODY>
</HTML>

Просмотреть файл

@ -1,273 +0,0 @@
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="classpnp_files/filelist.xml">
<title>ClassPnP</title>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>BestFit</w:Zoom>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;
mso-font-alt:"\FF2D\FF33 \660E\671D";
mso-font-charset:128;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:fixed;
mso-font-signature:1 134676480 16 0 131072 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-alt:Tahoma;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
@font-face
{font-family:"\@MS Mincho";
mso-font-charset:128;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:-1610612033 1757936891 16 0 131231 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"MS Mincho";
color:black;}
h2
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:black;
font-weight:bold;}
h3
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:black;
font-weight:bold;}
h4
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:black;
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"MS Mincho";
color:black;}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"MS Mincho";
color:black;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
<meta name=Template content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="3074"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple style='tab-interval:.5in'
leftmargin=8>
<div class=Section1>
<h2><a name=classpnp></a><span class=SpellE><span style='mso-bookmark:classpnp'><span
style='font-family:Verdana'>ClassPnP</span></span></span><span
style='mso-bookmark:classpnp'></span><span style='font-family:Verdana'> <o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>Summary<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>This is the library for
all storage drivers. It simplifies writing a storage driver by implementing 90 percent
of the code required to support Plug and Play, Power Management, et cetera.
This library is used by <span class=SpellE>disk.sys</span>, <span class=SpellE>cdrom.sys</span>
and the tape class drivers.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>No INF file is needed to
install this library. The library is 64-bit compliant.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>Building the Sample<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>To build the sample, run <b>build</b>.
Once built, one binary will be created: <span class=SpellE>classpnp.sys</span>.
This sample is based on live source code, and only builds in the current OS
build environment.<span style='mso-spacerun:yes'>  </span><o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><u>File<span style='mso-tab-count:3'>                   </span>Description<o:p></o:p></u></pre><pre><o:p>&nbsp;</o:p></pre><pre><span
class=SpellE>Autorun.c</span><span style='mso-tab-count:2'>              </span>Media change notification (MCN) code</pre><pre><span
class=SpellE>Class.c</span><span style='mso-tab-count:2'>        </span><span
style='mso-tab-count:1'>        </span>Main code base</pre><pre><span
class=SpellE>Class.rc</span><span style='mso-tab-count:2'>               </span>Resource file</pre><pre><span
class=SpellE>Class.src</span><span style='mso-tab-count:2'>              </span>Exports</pre><pre><span
class=SpellE>Classp.h</span><span style='mso-tab-count:2'>               </span>Private <span
class=GramE>header</span></pre><pre><span class=SpellE>Classwmi.c</span><span
style='mso-tab-count:2'>             </span>WMI functionality</pre><pre><span
class=SpellE>Clntirp.c</span><span style='mso-tab-count:2'>              </span>Client IRP queuing code</pre><pre><span
class=SpellE>Create.c</span><span style='mso-tab-count:2'>               </span>Create IRP code</pre><pre><span
class=SpellE>Data.c</span><span style='mso-tab-count:2'>         </span><span
style='mso-tab-count:1'>        </span>Static driver data</pre><pre><span
class=SpellE>Debug.c</span><span style='mso-tab-count:2'>        </span><span
style='mso-tab-count:1'>        </span>Debug code and data</pre><pre><span
class=SpellE>Debug.h</span><span style='mso-tab-count:2'>        </span><span
style='mso-tab-count:1'>        </span>Debug header file</pre><pre><span
class=SpellE>Dictlib.c</span><span style='mso-tab-count:2'>              </span>File system dictionary code</pre><pre><span
class=SpellE>Lock.c</span><span style='mso-tab-count:2'>         </span><span
style='mso-tab-count:1'>        </span>Storage <span class=GramE>remove</span> lock implementation</pre><pre><span
class=SpellE>Makefile</span><span style='mso-tab-count:2'>               </span><span
class=SpellE>Makefile</span></pre><pre><span class=SpellE>Obsolete.c</span><span
style='mso-tab-count:2'>             </span>Obsolete code used by legacy drivers</pre><pre><span
class=SpellE>Power.c</span><span style='mso-tab-count:2'>        </span><span
style='mso-tab-count:1'>        </span>Power code</pre><pre><span class=SpellE>Retry.c</span><span
style='mso-tab-count:2'>        </span><span style='mso-tab-count:1'>        </span>Transfer <span
class=GramE>packet retry</span> code</pre><pre>Sources<span style='mso-tab-count:
2'>        </span><span style='mso-tab-count:1'>        </span>Sources file</pre><pre><span
class=SpellE>Utils.c</span><span style='mso-tab-count:2'>        </span><span
style='mso-tab-count:1'>        </span>Utility code</pre><pre><span
class=SpellE>Xferpkt.c</span><span style='mso-tab-count:2'>              </span>Transfer packet processing code</pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<p align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:"Courier New"'><a href="#top"><span
style='font-family:Verdana'>Top of page</span></a></span><span
style='font-size:10.0pt;font-family:Verdana;mso-bidi-font-family:"Courier New"'>
<o:p></o:p></span></p>
<pre><o:p>&nbsp;</o:p></pre>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-padding-alt:0in 5.4pt 0in 5.4pt'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</td>
</tr>
</table>
<pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif";mso-bidi-font-family:"Courier New"'>©
2004 Microsoft Corporation</span><span style='font-size:10.0pt;font-family:
Verdana;mso-bidi-font-family:"Courier New"'> <o:p></o:p></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,42 +0,0 @@
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<META NAME="Generator" CONTENT="Microsoft Word 97">
<TITLE>Disk</TITLE>
<META NAME="Template" CONTENT="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
</HEAD>
<BODY TEXT="#000000" LINK="#0000ff" VLINK="#800080" BGCOLOR="#ffffff" leftmargin="8">
<FONT FACE="Verdana"><H2><A NAME="disk">Disk</A> </H2>
<H3>Summary</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
The Disk sample is used with Classpnp.sys as disk driver. The sample supports Plug and Play, Power Management, WMI, and failure prediction (S.M.A.R.T.), and it is 64-bit compliant.
<H3>Building the Sample</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
To build the sample, run the <b>build</B> command. Once built, this sample will create one binary: Disk.sys.
<H3>CODE TOUR</H3>
<H4>File Manifest</H4>
</FONT><U><PRE>File&#9;&#9; Description
</U>
Data.c&#9; List of workarounds for some drives (no code)
Disk.c&#9; Main code base
Disk.h&#9; Private header files
Disk.rc&#9; Resource file
Diskwmi.c&#9; S.M.A.R.T. WMI implementation
Drivesup.c&#9; No longer used
Drivesup.h&#9; No longer used
Enum.c&#9; Enumeration routines for disk drives
Makefile&#9; Makefile
Pnp.c&#9; Start/add/pnp code
Sources&#9; Sources
</FONT><P ALIGN="CENTER"><A HREF="#top"><FONT FACE="Verdana" SIZE=2>Top of page</FONT></A><FONT FACE="Verdana" SIZE=2> </P></FONT>
<TABLE CELLSPACING=0 BORDER=0 WIDTH=624>
<TR><TD VALIGN="MIDDLE" BGCOLOR="#00ffff" HEIGHT=2>
<P></TD>
</TR>
</TABLE>
<FONT FACE="MS Sans Serif" SIZE=1><P>&copy; 1999 Microsoft Corporation</FONT><FONT FACE="Verdana" SIZE=2> </P></FONT></BODY>
</HTML>

Просмотреть файл

@ -1,245 +0,0 @@
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="addfiltr_files/filelist.xml">
<title>Addfilter </title>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>BestFit</w:Zoom>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-alt:Tahoma;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
</head>
<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
<div class=Section1>
<h2><span class=SpellE><span style='font-family:Verdana'>Addfilter</span></span><span
style='font-family:Verdana'> <o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>SUMMARY<o:p></o:p></span></h3>
<p><span class=SpellE><span style='font-size:10.0pt;font-family:Verdana'>Addfilter</span></span><span
style='font-size:10.0pt;font-family:Verdana'> is a command-line application which
adds and removes filter drivers for a given drive or volume. It is intended to
demonstrate how to insert a filter driver into the driver stack of a device.
The sample illustrates how to do this by using the <span class=SpellE>SetupDi</span>
APIs. The sample works on the <span class=GramE>x86 platform</span>. It has
only been tested in a 32-bit environment. Since <span class=SpellE>Addfilter</span>
is not a driver, it does not deal with Plug and Play or Power Management. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>No INF file is needed to
install this application. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>Enter the checked or free
build environment. Then, while in the <span class=SpellE>Addfilter</span>
sample directory, type <b>build</b>. A successful build produces the executable
Addfilter.exe. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>RELEASE NOTES<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>1. This initial sample
does not check the filter for validity before it is added to the driver stack.
If an invalid filter is added, the specified device may no longer be
accessible. <o:p></o:p></span></p>
<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:Verdana'>Important:</span></b><span
style='font-size:10.0pt;font-family:Verdana'> If you attempt to add a
non-existent filter to a boot device and then reboot, the system may show the
error message INACCESSIBLE_BOOT_DEVICE. If this happens, you will be unable to
start the computer. To fix this, when the boot menu is displayed at startup, go
to the Advanced Options screen and select <b>Use Last Known Good Profile</b>. <o:p></o:p></span></p>
</blockquote>
<p><span style='font-size:10.0pt;font-family:Verdana'>If you attempt to add a
non-existent filter to a normal (non-boot) device (CD drive, floppy drive,
etc.), you will need to go into the Device Manager, uninstall the device,
reboot, and re-add the device from Add Hardware. Also, be careful not to add a
filter to a driver with which it is not designed to operate. Unpredictable
results may ensue. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>2. The sample is intended
for use with upper filter drivers only. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>3. When you add a filter
to a device, that device needs to be restarted. Depending on the device, this
may necessitate restarting your computer. The <span class=SpellE><b>RestartDevice</b></span>
function (in <span class=SpellE>Addfilter.c</span>) stops the specified device
and then restarts it. If the device has been stopped but not restarted, and the
machine is restarted, the reboot will not necessarily restart the device. You
will need to call the <span class=SpellE><b>RestartDevice</b></span> function
to restart your device. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>4. Since the sample
currently enumerates only disk devices, the sample can only operate on devices
of this class. One way in which you could extend this sample code is by adding
another command-line argument that handles other device types. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>5. The sample runs in
user mode only. <o:p></o:p></span></p>
<p><b><span style='font-size:10.0pt;font-family:Verdana'>Usage:</span></b><span
style='font-size:10.0pt;font-family:Verdana'> <span class=SpellE>addfilter</span>
[/<span class=SpellE>listdevices</span>] [/device <span class=SpellE>device_name</span>]
[/add filter] [/remove filter] <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>If the device name is not
supplied, settings will apply to all devices. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>If there is no /add or
/remove argument, a list of currently installed drivers will be printed. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><u>File<span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Description<o:p></o:p></u></pre><pre><o:p>&nbsp;</o:p></pre><pre><span
class=SpellE>Addfilter.c</span><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp; </span>Main source file</pre><pre><span
class=SpellE>Addfilter.rc</span><span style='mso-tab-count:1'>&nbsp;&nbsp; </span>Version resource file</pre><pre>Sources<span
style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Sources file</pre><pre><span
class=SpellE>Makefile</span><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class=SpellE>Makefile</span></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<p align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:"Courier New"'><a href="#top"><span
style='font-family:Verdana'>Top of page</span></a></span><span
style='font-size:10.0pt;font-family:Verdana;mso-bidi-font-family:"Courier New"'>
<o:p></o:p></span></p>
<pre><o:p>&nbsp;</o:p></pre>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-padding-alt:0in 5.4pt 0in 5.4pt'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</td>
</tr>
</table>
<pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif";mso-bidi-font-family:"Courier New"'>&copy;
2004</span><span style='font-size:10.0pt;font-family:Verdana;mso-bidi-font-family:
"Courier New"'> </span><span style='font-size:7.5pt;font-family:"MS Sans Serif";
mso-bidi-font-family:"Courier New"'>Microsoft Corporation </span><span
style='font-size:10.0pt;font-family:Verdana;mso-bidi-font-family:"Courier New"'><o:p></o:p></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,187 +0,0 @@
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="sfloppy_files/filelist.xml">
<title>SFloppy</title>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
h1
{mso-style-next:Normal;
margin-top:12.0pt;
margin-right:0in;
margin-bottom:3.0pt;
margin-left:0in;
mso-pagination:widow-orphan;
page-break-after:avoid;
mso-outline-level:1;
font-size:16.0pt;
font-family:Arial;
mso-font-kerning:16.0pt;
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
p
{font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
pre
{margin-top:0in;
margin-bottom:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
</head>
<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
<div class=Section1>
<h1><span class=SpellE><span style='font-size:20.0pt'>Sfloppy</span></span><span
style='font-size:20.0pt'><o:p></o:p></span></h1>
<h3><span style='font-family:Verdana'>SUMMARY<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>The <span class=SpellE>sfloppy</span>
sample is a super floppy driver that resides in the directory
\\Ntddk\Src\Storage\sfloppy. It is a class driver for Super Floppy disk drives.
It sits a level above the port driver (ATAPI, USB, etc) in the driver stack,
and brokers communication between the application level and the port driver.
The floppy driver takes requests from <span class=SpellE>filesystem</span>
drivers and then sends the appropriate SCSI_REQUEST_BLOCK (SRB) to the port
driver. It is compatible with x86 and IA64 platforms.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p><span class=GramE><span style='font-size:10.0pt;font-family:Verdana'>Type <b>build</b></span></span><span
style='font-size:10.0pt;font-family:Verdana'> in the
\\Ntddk\Src\Storage\Sfloppy directory. A successful build produces <span
class=SpellE>sfloppy.sys</span> <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><u>File<span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Description<o:p></o:p></u></pre><pre><o:p>&nbsp;</o:p></pre><pre><span
class=SpellE>Floppy.c</span><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Super Floppy diskette driver<span style='mso-spacerun:yes'>&nbsp; </span></pre><pre><span
class=SpellE>SFloppy.rc</span><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp; </span>Resource file</pre><pre>Sources<span
style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Sources for build</pre><pre><span
class=SpellE>Sfloppy.inf</span><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp; </span>INF file super floppy driver</pre>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>
<p align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:"Courier New"'><a href="#top"><span
style='font-family:Verdana'>Top of page</span></a></span><span
style='font-size:10.0pt;font-family:Verdana;mso-bidi-font-family:"Courier New"'>
<o:p></o:p></span></p>
<pre><o:p>&nbsp;</o:p></pre>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</td>
</tr>
</table>
<pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif";mso-bidi-font-family:"Courier New"'>&copy;
2004 Microsoft Corporation</span><span style='font-size:10.0pt;font-family:
Verdana;mso-bidi-font-family:"Courier New"'> <o:p></o:p></span></p>
</div>
</body>
</html>

Двоичные данные
storage/tools/spti/src/spti.htm

Двоичный файл не отображается.

Просмотреть файл

@ -1,400 +0,0 @@
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="usbview_files/filelist.xml">
<title>USBVIEW</title>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Courier;
panose-1:2 7 4 9 2 2 5 2 4 4;
mso-font-charset:0;
mso-generic-font-family:modern;
mso-font-format:other;
mso-font-pitch:fixed;
mso-font-signature:3 0 0 0 1 0;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;
mso-font-charset:2;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:0 268435456 0 0 -2147483648 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
h2
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman";
font-weight:bold;}
h3
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman";
font-weight:bold;}
h4
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman";
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:119422542;
mso-list-template-ids:-696511164;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l1
{mso-list-id:248975435;
mso-list-template-ids:2079487724;}
@list l1:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple style='tab-interval:.5in'>
<div class=Section1>
<h2><span style='font-family:Verdana'>USBVIEW<o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>SUMMARY<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>Usbview.exe is a Windows
GUI application that allows you to browse all USB controllers and connected USB
devices on your system. The left pane in the main application window displays a
connection-oriented tree view, and the right pane displays the USB data
structures pertaining to the selected USB device, such as the Device,
Configuration, Interface, and Endpoint Descriptors, as well as the current
device configuration.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>This functional
application sample demonstrates how a user-mode application can enumerate USB
host controllers, USB hubs, and attached USB devices, and query information
about the devices from the registry and through USB requests to the devices.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The IOCTL calls (see the
system include file USBIOCTL.H) demonstrated by this sample include:<o:p></o:p></span></p>
<ul type=disc>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo1;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>IOCTL_GET_HCD_DRIVERKEY_NAME <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo1;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo1;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>IOCTL_USB_GET_NODE_CONNECTION_DRIVERKEY_NAME <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo1;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>IOCTL_USB_GET_NODE_CONNECTION_INFORMATION <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo1;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>IOCTL_USB_GET_NODE_CONNECTION_NAME <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo1;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>IOCTL_USB_GET_NODE_INFORMATION <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo1;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>IOCTL_USB_GET_ROOT_HUB_NAME<o:p></o:p></span></li>
</ul>
<h3><span style='font-family:Verdana'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>The <span class=SpellE>Usbview</span>
sample compiles and links in the standard DDK build environment with Microsoft®
Visual C® 6.0 on both X86 and Alpha systems, producing a single executable
binary Usbview.exe. Both free and checked versions can be built, with assertion
error messages enabled in the checked build to indicate unexpected error
conditions.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><u>Files<span style='mso-spacerun:yes'>         </span>Description<o:p></o:p></u></pre><pre><span
style='font-family:Courier'>Usbview.htm<span style='mso-tab-count:1'>    </span>Documentation for this sample (this file)<o:p></o:p></span></pre><pre><span
style='font-family:Courier'>Sources<span style='mso-tab-count:2'>        </span>Generic build-compatible sources file for this sample<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Resource.h</span></span><span
style='font-family:Courier'><span style='mso-tab-count:1'>     </span>ID definitions for GUI controls<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Usbdesc.h</span></span><span
style='font-family:Courier'><span style='mso-tab-count:1'>      </span>USB descriptor type definitions<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Usbview.h</span></span><span
style='font-family:Courier'><span style='mso-tab-count:1'>      </span><span
class=GramE>Main header file</span> for this sample<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Vndrlist.h</span></span><span
style='font-family:Courier'><span style='mso-tab-count:1'>     </span>List of USB Vendor IDs and vendor names<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Debug.c</span></span><span
style='font-family:Courier'><span style='mso-tab-count:2'>        </span>Assertion routines for the checked build<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Devnode.c</span></span><span
style='font-family:Courier'><span style='mso-tab-count:1'>      </span>Routines for accessing <span
class=SpellE>DevNode</span> information<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Dispaud.c</span></span><span
style='font-family:Courier'><span style='mso-tab-count:1'>      </span>Routines for displaying USB audio class device information<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Display.c</span></span><span
style='font-family:Courier'><span style='mso-tab-count:1'>      </span>Routines for displaying USB device information<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Enum.c</span></span><span
style='font-family:Courier'><span style='mso-tab-count:2'>         </span>Routines for enumerating host controllers, hubs, and devices<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Usbview.c</span></span><span
style='font-family:Courier'><span style='mso-tab-count:1'>      </span>Entry point and GUI handling routines<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Usbview.rc</span></span><span
style='font-family:Courier'><span style='mso-tab-count:1'>     </span>Menu and dialog definitions<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Split.cur</span></span><span
style='font-family:Courier'><span style='mso-tab-count:1'>      </span>Cursor file<o:p></o:p></span></pre><pre><span
class=SpellE><span style='font-family:Courier'>Usb.ico</span></span><span
style='font-family:Courier'><span style='mso-tab-count:2'>        </span>Application icon file<o:p></o:p></span></pre><pre><span
class=SpellE><span class=GramE><span style='font-family:Courier'>bang.ico</span></span></span><span
style='font-family:Courier'><span style='mso-tab-count:2'>               </span>Application icon file<o:p></o:p></span></pre><pre><span
class=SpellE><span class=GramE><span style='font-family:Courier'>hub.ico</span></span></span><span
style='font-family:Courier'><span style='mso-tab-count:2'>        </span>Application icon file<o:p></o:p></span></pre><pre><span
class=SpellE><span class=GramE><span style='font-family:Courier'>monitor.ico</span></span></span><span
style='font-family:Courier'><span style='mso-tab-count:2'>            </span>Application icon file<o:p></o:p></span></pre><pre><span
class=SpellE><span class=GramE><span style='font-family:Courier'>port.ico</span></span></span><span
style='font-family:Courier'><span style='mso-tab-count:2'>               </span>Application icon file<o:p></o:p></span></pre><pre><span
class=SpellE><span class=GramE><span style='font-family:Courier'>makefile</span></span></span><span
style='font-family:Courier'><span style='mso-tab-count:2'>               </span>DDK build environment <span
class=SpellE>makefile</span><o:p></o:p></span></pre><pre><span
style='font-family:Courier'><o:p>&nbsp;</o:p></span></pre><pre><span
style='font-family:Verdana'> <o:p></o:p></span></pre>
<h4><span style='font-family:Verdana'>Programming Tour<o:p></o:p></span></h4>
<p><span style='font-size:10.0pt;font-family:Verdana'>The major topics covered
in this tour are: <o:p></o:p></span></p>
<ul type=disc>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo2;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>GUI handling routines <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo2;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Device enumeration routines<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo2;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>Device information display routines<o:p></o:p></span></li>
</ul>
<p><span style='font-size:10.0pt;font-family:Verdana'>The file <span
class=SpellE>Usbview.c</span> contains the sample application entry point and
GUI handling routines. On entry, the main application window is created, which
is actually a dialog box as defined in <span class=SpellE>Usbview.rc</span>.
The dialog box consists of a split window with a tree view control on the left
side and an edit control on the right side. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The routine <span
class=SpellE><span class=GramE>RefreshTree</span></span><span class=GramE>(</span>)
is called to enumerate USB host controller, hubs, and attached devices and to
populate the device tree view control. <span class=SpellE><span class=GramE>RefreshTree</span></span><span
class=GramE>(</span>) calls the routine <span class=SpellE>EnumerateHostControllers</span>()
in <span class=SpellE>Enum.c</span> to enumerate USB host controller, hubs, and
attached devices. After the device tree view control has been populated, <span
class=SpellE>USBView_<span class=GramE>OnNotify</span></span><span class=GramE>(</span>)
is called when an item is selected in the device tree view control. This calls <span
class=SpellE><span class=GramE>UpdateEditControl</span></span><span
class=GramE>(</span>) in <span class=SpellE>Display.c</span> to display
information about the selected item in the edit control.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The file <span
class=SpellE>Enum.c</span> contains the routines that enumerate the USB bus and
populate the tree view control. The USB device enumeration and information
collection process is the main point of this sample application. The
enumeration process starts at <span class=SpellE><span class=GramE>EnumerateHostControllers</span></span><span
class=GramE>(</span>) and goes like this:<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>(1) Enumerate Host
Controllers and Root Hubs. Host controllers have symbolic link names of the
form <span class=SpellE>HCDx</span>, where x starts at 0. Use <span
class=SpellE><span class=GramE>CreateFile</span></span><span class=GramE>(</span>)
to open each host controller symbolic link. Create a node in the tree view to
represent each host controller. After a host controller has been opened, send
the host controller an IOCTL_USB_GET_ROOT_HUB_NAME request to get the symbolic
link name of the root hub that is part of the host controller.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>(2) Enumerate Hubs (Root
Hubs and External Hubs). Given the name of a hub, use <span class=SpellE><span
class=GramE>CreateFile</span></span><span class=GramE>(</span>) to open the
hub. Send the hub an IOCTL_USB_GET_NODE_INFORMATION request to get info about
the hub, such as the number of downstream ports. Create a node in the tree view
to represent each hub.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>(3) Enumerate Downstream
Ports. Given a handle to an open hub and the number of downstream ports on the
hub, send the hub an IOCTL_USB_GET_NODE_CONNECTION_INFORMATION request for each
downstream port of the hub to get info about the device (if any) attached to
each port. If there is a device attached to a port, send the hub an
IOCTL_USB_GET_NODE_CONNECTION_NAME request to get the symbolic link name of the
hub attached to the downstream port. If there is a hub attached to the
downstream port, <span class=SpellE>recurse</span> to step (2). Create a node
in the tree view to represent each hub port and attached device. USB
configuration and string descriptors are retrieved from attached devices in <span
class=SpellE><span class=GramE>GetConfigDescriptor</span></span><span
class=GramE>(</span>) and <span class=SpellE>GetStringDescriptor</span>() by
sending an IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION() to the hub to which
the device is attached.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The file <span
class=SpellE>Display.c</span> contains routines that display information about
selected devices in the application edit control. Information about the device
was collected during the enumeration of the device tree. This information
includes USB device, configuration, and string descriptors and connection and configuration
information that is maintained by the USB stack. The routines in this file
simply parse and print the data structures for the device that were collected
when it was enumerated. The file <span class=SpellE>Dispaud.c</span> parses and
prints data structures that are specific to USB audio class devices.<o:p></o:p></span></p>
<p align=center style='text-align:center'><span style='font-size:10.0pt;
font-family:Verdana'><a href="#top">Top of page</a> <o:p></o:p></span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-padding-alt:0in 5.4pt 0in 5.4pt'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</td>
</tr>
</table>
<p><span style='font-size:7.5pt;font-family:"MS Sans Serif"'>© 2004 Microsoft
Corporation</span><span style='font-size:10.0pt;font-family:Verdana'> <o:p></o:p></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,536 +0,0 @@
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:p="urn:schemas-microsoft-com:office:powerpoint"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:oa="urn:schemas-microsoft-com:office:activation"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="WpdHelloWorldDriver_files/filelist.xml">
<title>WPD Sample Driver</title>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>150</w:Zoom>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-alt:"Device Font 10cpi";
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:black;}
h2
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman";
color:black;
font-weight:bold;}
h3
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman";
color:black;
font-weight:bold;}
h4
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman";
color:black;
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:black;}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";
color:black;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:141195626;
mso-list-type:hybrid;
mso-list-template-ids:1101549682 -1772980884 190112462 -1733515742 -301441412 1072717550 1308367348 -377315616 2084882674 1873576632;}
@list l0:level1
{mso-level-number-format:image;
list-style-image:url("PicExportError");
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level2
{mso-level-start-at:2220;
mso-level-number-format:image;
list-style-image:url("PicExportError");
mso-level-text:\F0B7;
mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level3
{mso-level-start-at:2220;
mso-level-number-format:image;
list-style-image:url("PicExportError");
mso-level-text:\F0B7;
mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1
{mso-list-id:461116486;
mso-list-type:hybrid;
mso-list-template-ids:1101549682 -1772980884 190112462 -1733515742 -301441412 1072717550 1308367348 -377315616 2084882674 1873576632;}
@list l1:level1
{mso-level-number-format:image;
list-style-image:url("PicExportError");
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l1:level2
{mso-level-start-at:2220;
mso-level-number-format:image;
list-style-image:url("PicExportError");
mso-level-text:\F0B7;
mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l1:level3
{mso-level-start-at:2220;
mso-level-number-format:image;
list-style-image:url("PicExportError");
mso-level-text:\F0B7;
mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l1:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
<meta name=Template content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="3074"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple style='tab-interval:.5in'
leftmargin=8>
<div class=Section1>
<h2><span style='font-family:Verdana'>Windows Portable Device (WPD) “Hello
World” Sample Driver <o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>Summary<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>This sample contains
working source code for a WPD driver.<span style='mso-spacerun:yes'> 
</span>WPD Drivers are built using the Windows User-Mode Driver Foundation with
special processing added to handle WPD messages.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>Building a new WPD Driver<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>You are encouraged to use
this sample code to start building your own WPD Driver. Modify the sample to
add your own features.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The following is a
suggested roadmap to developing your driver:<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo2;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Create WPD driver shell <o:p></o:p></span></p>
<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l1 level2 lfo2;
tab-stops:list 1.0in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Use sample driver as base<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo2;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Update the INF to install this
driver for your device (it will not actually do anything with the device yet)<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo2;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Start implementing
functionality.<span style='mso-spacerun:yes'>  </span>This is where the driver
will start interacting with the device:<o:p></o:p></span></p>
<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l1 level2 lfo2;
tab-stops:list 1.0in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Object Enumeration<o:p></o:p></span></p>
<p style='margin-left:1.5in;text-indent:-.25in;mso-list:l1 level3 lfo2;
tab-stops:list 1.5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>WPD_CATEGORY_OBJECT_ENUMERATION<o:p></o:p></span></p>
<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l1 level2 lfo2;
tab-stops:list 1.0in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Properties<o:p></o:p></span></p>
<p style='margin-left:1.5in;text-indent:-.25in;mso-list:l1 level3 lfo2;
tab-stops:list 1.5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Implement Reads, Writes<o:p></o:p></span></p>
<p style='margin-left:1.5in;text-indent:-.25in;mso-list:l1 level3 lfo2;
tab-stops:list 1.5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>WPD_CATEGORY_OBJECT_PROPERTIES<o:p></o:p></span></p>
<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l1 level2 lfo2;
tab-stops:list 1.0in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Transfer<o:p></o:p></span></p>
<p style='margin-left:1.5in;text-indent:-.25in;mso-list:l1 level3 lfo2;
tab-stops:list 1.5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Implement Resource enumeration,
reads, writes<o:p></o:p></span></p>
<p style='margin-left:1.5in;text-indent:-.25in;mso-list:l1 level3 lfo2;
tab-stops:list 1.5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>WPD_CATEGORY_OBJECT_RESOURCES<o:p></o:p></span></p>
<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l1 level2 lfo2;
tab-stops:list 1.0in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Capabilities<o:p></o:p></span></p>
<p style='margin-left:1.5in;text-indent:-.25in;mso-list:l1 level3 lfo2;
tab-stops:list 1.5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>WPD_CATEGORY_CAPABILITIES<o:p></o:p></span></p>
<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l1 level2 lfo2;
tab-stops:list 1.0in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Remaining commands<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>Building the Sample<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>Open a free or checked
DDK build environment, go to this directory, and run <b>build</b>. This creates
WpdHelloWorldDriver.dll in the <span class=SpellE>Objfre</span> or <span
class=SpellE>Objchk</span> directory. Before the sample can be used, it must be
installed by running the “Add Hardware” Wizard from Control Panel:<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>1. Launch the Windows
&quot;Control Panel&quot;.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>2. Double Click the
&quot;Add Hardware&quot; icon (Click “Classic View” link on the left hand pane
if you cant find it).<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>3. The &quot;Add
hardware&quot; Wizard should launch, press the &quot;Next&quot; button. (The
wizard will do a quick search for devices already installed on the system.<span
style='mso-spacerun:yes'>  </span>It may take a minute or two.)<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>4. Choose the
&quot;Install the hardware that I manually select from a list (Advanced)&quot;
option and press the &quot;Next&quot; button.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>5. A list of device
categories will be shown.<span style='mso-spacerun:yes'>  </span>Scroll to the
very end of the list and select &quot;Windows Portable Devices&quot; option,
and click “Next”.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>6. Press the &quot;Have
Disk&quot; button and browse to the location of the device .INF file.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>7. Choose the appropriate
device to install (&quot;Microsoft WPD Sample” for example) and press the
&quot;Next&quot; button.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>8. After the files have
been copied to the system, the device should be installed (you can verify this
by looking in “Device Manager”).<span style='mso-spacerun:yes'>  </span>You can
now run WPD applications.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>Testing the WPD Driver<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>To test the WPD Driver,
double click the appropriate WPD device icon in “My Computer” to start browsing
the sample device contents.<span style='mso-spacerun:yes'>  </span>Or use the <span
class=SpellE><b style='mso-bidi-font-weight:normal'>WpdInfo</b></span>
development tool included in this kit.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>Supported Configurations<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>The WPD DDK sample driver
has been tested in checked and free builds for both 32 and 64-bit platforms.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><u>File<span style='mso-spacerun:yes'>                                </span>Description<o:p></o:p></u></pre><pre><span
class=SpellE>Device.cpp</span><span style='mso-spacerun:yes'>               </span><span style='mso-spacerun:yes'>           </span>Driver's <span
class=SpellE>IWDFDevice</span> implementation</pre><pre><span class=SpellE>Device.h</span><span style='mso-spacerun:yes'>                            </span>Header <span
class=GramE>file</span> for driver's <span class=SpellE>IWDFDevice</span> implementation</pre><pre><span
class=SpellE>Driver.cpp</span><span style='mso-spacerun:yes'>                          </span>Drivers <span
class=SpellE>IDriverEntry</span> implementation </pre><pre><span class=SpellE>Driver.h</span><span style='mso-spacerun:yes'>                            </span>Header <span
class=GramE>file</span> for driver's <span class=SpellE>IDriverEntry</span> implementation</pre><pre><span
class=SpellE><span class=GramE>helpers.cpp</span></span><span style='mso-spacerun:yes'>                         </span>Miscellaneous helper functions</pre><pre><span
class=SpellE><span class=GramE>helpers.h</span></span><span style='mso-spacerun:yes'>                           </span>Miscellaneous helper function definitions</pre><pre>MAKEFILE<span style='mso-spacerun:yes'>                            </span><span
class=SpellE>Makefile</span></pre><pre><span class=SpellE><span class=GramE>makefile.inc</span></span><span style='mso-spacerun:yes'>  </span><span style='mso-spacerun:yes'>                      </span><span
class=SpellE>Makefile</span></pre><pre><span class=SpellE>Queue.cpp</span><span style='mso-spacerun:yes'>                           </span>Driver's queue implementation</pre><pre><span
class=SpellE>Queue.h</span><span style='mso-spacerun:yes'>                             </span>Header <span
class=GramE>file</span> for drivers queue implementation</pre><pre><span
class=SpellE><span class=GramE>resource.h</span></span><span style='mso-spacerun:yes'>                          </span>Resource header</pre><pre><span
class=GramE>sources</span><span style='mso-spacerun:yes'>                             </span><span
class=SpellE>Sources</span> file</pre><pre><span class=SpellE><span
class=GramE>stdafx.h</span></span><span style='mso-spacerun:yes'>                            </span>Precompiled header file</pre><pre><span
class=SpellE>WpdBaseDriver.cpp</span><span style='mso-spacerun:yes'>                   </span>Implements the main WPD message handler which unpacks and dispatches WPD messages</pre><pre><span
class=SpellE>WpdBaseDriver.h</span><span style='mso-spacerun:yes'>                     </span>Header <span
class=GramE>file</span> for the main WPD message handler</pre><pre><span
class=SpellE>WpdCapabilities.cpp</span><span style='mso-spacerun:yes'>                 </span>Implements the commands related to Capabilities</pre><pre><span
class=SpellE>WpdCapabilities.h</span><span style='mso-spacerun:yes'>                   </span>Header <span
class=GramE>file</span> for Capabilities implementation</pre><pre><span
class=SpellE>WpdObjectEnum.cpp</span><span style='mso-spacerun:yes'>                   </span>Implements the commands related to enumerating contents</pre><pre><span
class=SpellE>WpdObjectEnum.h</span><span style='mso-spacerun:yes'>                     </span>Header <span
class=GramE>file</span> for content enumeration implementation</pre><pre><span
class=SpellE>WpdObjectProperties.cpp</span><span style='mso-spacerun:yes'>         </span><span style='mso-spacerun:yes'>    </span>Implements the commands related to handling object meta-data</pre><pre><span
class=SpellE>WpdObjectProperties.h</span><span style='mso-spacerun:yes'>               </span>Header file for commands related to handling object meta-data</pre><pre><span
class=SpellE>WpdObjectResources.cpp</span><span style='mso-spacerun:yes'>              </span>Implements the commands related to transferring data</pre><pre><span
class=SpellE>WpdObjectResources.h</span><span style='mso-spacerun:yes'>                </span>Header file for commands related to transferring data</pre><pre><span
class=SpellE>WpdHelloWorldDriver.cpp</span><span style='mso-spacerun:yes'>             </span>Main DLL file</pre><pre><span
class=SpellE>WpdHelloWorldDriver.def</span><span style='mso-spacerun:yes'>             </span>Exports</pre><pre><span
class=SpellE>WpdHelloWorldDriver.idl</span><span style='mso-spacerun:yes'>             </span>Component Interface file</pre><pre><span
class=SpellE>WpdHelloWorldDriver.inf</span><span style='mso-spacerun:yes'>             </span>Sample Device INF file</pre><pre><span
class=SpellE>WpdHelloWorldDriver.rc</span><span style='mso-spacerun:yes'>              </span>Resource file</pre><pre><span
class=SpellE>WpdHelloWorldDriver.rgs</span><span style='mso-spacerun:yes'>             </span>ATL Self registration file</pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<p align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:"Courier New"'><a href="#top"><span
style='font-family:Verdana'>Top of page</span></a></span><span
style='font-size:10.0pt;font-family:Verdana;mso-bidi-font-family:"Courier New"'>
<o:p></o:p></span></p>
<pre><o:p>&nbsp;</o:p></pre>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-padding-alt:0in 5.4pt 0in 5.4pt'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</td>
</tr>
</table>
<pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif";mso-bidi-font-family:"Courier New"'>©
2006 Microsoft Corporation</span><span style='font-size:10.0pt;font-family:
Verdana;mso-bidi-font-family:"Courier New"'> <o:p></o:p></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,535 +0,0 @@
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:p="urn:schemas-microsoft-com:office:powerpoint"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:oa="urn:schemas-microsoft-com:office:activation"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="WpdMultiTransportDriver_files/filelist.xml">
<title>WPD Sample Driver</title>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>150</w:Zoom>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-alt:"Device Font 10cpi";
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:black;}
h2
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman";
color:black;
font-weight:bold;}
h3
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman";
color:black;
font-weight:bold;}
h4
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman";
color:black;
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:black;}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";
color:black;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:141195626;
mso-list-type:hybrid;
mso-list-template-ids:1101549682 -1772980884 190112462 -1733515742 -301441412 1072717550 1308367348 -377315616 2084882674 1873576632;}
@list l0:level1
{mso-level-number-format:image;
list-style-image:url("PicExportError");
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level2
{mso-level-start-at:2220;
mso-level-number-format:image;
list-style-image:url("PicExportError");
mso-level-text:\F0B7;
mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level3
{mso-level-start-at:2220;
mso-level-number-format:image;
list-style-image:url("PicExportError");
mso-level-text:\F0B7;
mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1
{mso-list-id:461116486;
mso-list-type:hybrid;
mso-list-template-ids:1101549682 -1772980884 190112462 -1733515742 -301441412 1072717550 1308367348 -377315616 2084882674 1873576632;}
@list l1:level1
{mso-level-number-format:image;
list-style-image:url("PicExportError");
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l1:level2
{mso-level-start-at:2220;
mso-level-number-format:image;
list-style-image:url("PicExportError");
mso-level-text:\F0B7;
mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l1:level3
{mso-level-start-at:2220;
mso-level-number-format:image;
list-style-image:url("PicExportError");
mso-level-text:\F0B7;
mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l1:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
<meta name=Template content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="3074"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple style='tab-interval:.5in'
leftmargin=8>
<div class=Section1>
<h2><span style='font-family:Verdana'>Windows Portable Device (WPD) Multi-Transport Sample Driver <o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>Summary<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>This sample contains
working source code for a WPD driver.<span style='mso-spacerun:yes'> 
</span>WPD Drivers are built using the Windows User-Mode Driver Foundation with
special processing added to handle WPD messages.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>Building a new WPD Driver<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>You are encouraged to use
this sample code to start building your own WPD Driver. Modify the sample to
add your own features.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The following is a
suggested roadmap to developing your driver:<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo2;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Create WPD driver shell <o:p></o:p></span></p>
<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l1 level2 lfo2;
tab-stops:list 1.0in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Use sample driver as base<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo2;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Update the INF to install this
driver for your device (it will not actually do anything with the device yet)<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo2;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Start implementing
functionality.<span style='mso-spacerun:yes'>  </span>This is where the driver
will start interacting with the device:<o:p></o:p></span></p>
<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l1 level2 lfo2;
tab-stops:list 1.0in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Object Enumeration<o:p></o:p></span></p>
<p style='margin-left:1.5in;text-indent:-.25in;mso-list:l1 level3 lfo2;
tab-stops:list 1.5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>WPD_CATEGORY_OBJECT_ENUMERATION<o:p></o:p></span></p>
<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l1 level2 lfo2;
tab-stops:list 1.0in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Properties<o:p></o:p></span></p>
<p style='margin-left:1.5in;text-indent:-.25in;mso-list:l1 level3 lfo2;
tab-stops:list 1.5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Implement Reads, Writes<o:p></o:p></span></p>
<p style='margin-left:1.5in;text-indent:-.25in;mso-list:l1 level3 lfo2;
tab-stops:list 1.5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>WPD_CATEGORY_OBJECT_PROPERTIES<o:p></o:p></span></p>
<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l1 level2 lfo2;
tab-stops:list 1.0in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Transfer<o:p></o:p></span></p>
<p style='margin-left:1.5in;text-indent:-.25in;mso-list:l1 level3 lfo2;
tab-stops:list 1.5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Implement Resource enumeration,
reads, writes<o:p></o:p></span></p>
<p style='margin-left:1.5in;text-indent:-.25in;mso-list:l1 level3 lfo2;
tab-stops:list 1.5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>WPD_CATEGORY_OBJECT_RESOURCES<o:p></o:p></span></p>
<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l1 level2 lfo2;
tab-stops:list 1.0in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Capabilities<o:p></o:p></span></p>
<p style='margin-left:1.5in;text-indent:-.25in;mso-list:l1 level3 lfo2;
tab-stops:list 1.5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>WPD_CATEGORY_CAPABILITIES<o:p></o:p></span></p>
<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l1 level2 lfo2;
tab-stops:list 1.0in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11 src=PicExportError alt="*"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
style='font-size:10.0pt;font-family:Verdana'>Remaining commands<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>Building the Sample<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>Open a free or checked
DDK build environment, go to this directory, and run <b>build</b>. This creates
WpdMultiTransportDriver.dll in the <span class=SpellE>Objfre</span> or <span
class=SpellE>Objchk</span> directory. Before the sample can be used, it must be
installed by running the “Add Hardware” Wizard from Control Panel:<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>1. Launch the Windows
&quot;Control Panel&quot;.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>2. Double Click the
&quot;Add Hardware&quot; icon (Click “Classic View” link on the left hand pane
if you cant find it).<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>3. The &quot;Add
hardware&quot; Wizard should launch, press the &quot;Next&quot; button. (The
wizard will do a quick search for devices already installed on the system.<span
style='mso-spacerun:yes'>  </span>It may take a minute or two.)<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>4. Choose the
&quot;Install the hardware that I manually select from a list (Advanced)&quot;
option and press the &quot;Next&quot; button.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>5. A list of device
categories will be shown.<span style='mso-spacerun:yes'>  </span>Scroll to the
very end of the list and select &quot;Windows Portable Devices&quot; option,
and click “Next”.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>6. Press the &quot;Have
Disk&quot; button and browse to the location of the device .INF file.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>7. Choose the appropriate
device to install (&quot;Microsoft WPD Sample” for example) and press the
&quot;Next&quot; button.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>8. After the files have
been copied to the system, the device should be installed (you can verify this
by looking in “Device Manager”).<span style='mso-spacerun:yes'>  </span>You can
now run WPD applications.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>Testing the WPD Driver<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>To test the WPD Driver,
double click the appropriate WPD device icon in “My Computer” to start browsing
the sample device contents.<span style='mso-spacerun:yes'>  </span>Or use the <span
class=SpellE><b style='mso-bidi-font-weight:normal'>WpdInfo</b></span>
development tool included in this kit.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>Supported Configurations<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>The WPD DDK sample driver
has been tested in checked and free builds for both 32 and 64-bit platforms.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><u>File<span style='mso-spacerun:yes'>                                </span>Description<o:p></o:p></u></pre><pre><span
class=SpellE>Device.cpp</span><span style='mso-spacerun:yes'>               </span><span style='mso-spacerun:yes'>           </span>Driver's <span
class=SpellE>IWDFDevice</span> implementation</pre><pre><span class=SpellE>Device.h</span><span style='mso-spacerun:yes'>                            </span>Header <span
class=GramE>file</span> for driver's <span class=SpellE>IWDFDevice</span> implementation</pre><pre><span
class=SpellE>Driver.cpp</span><span style='mso-spacerun:yes'>                          </span>Drivers <span
class=SpellE>IDriverEntry</span> implementation </pre><pre><span class=SpellE>Driver.h</span><span style='mso-spacerun:yes'>                            </span>Header <span
class=GramE>file</span> for driver's <span class=SpellE>IDriverEntry</span> implementation</pre><pre><span
class=SpellE><span class=GramE>helpers.cpp</span></span><span style='mso-spacerun:yes'>                         </span>Miscellaneous helper functions</pre><pre><span
class=SpellE><span class=GramE>helpers.h</span></span><span style='mso-spacerun:yes'>                           </span>Miscellaneous helper function definitions</pre><pre>MAKEFILE<span style='mso-spacerun:yes'>                            </span><span
class=SpellE>Makefile</span></pre><pre><span class=SpellE><span class=GramE>makefile.inc</span></span><span style='mso-spacerun:yes'>  </span><span style='mso-spacerun:yes'>                      </span><span
class=SpellE>Makefile</span></pre><pre><span class=SpellE>Queue.cpp</span><span style='mso-spacerun:yes'>                           </span>Driver's queue implementation</pre><pre><span
class=SpellE>Queue.h</span><span style='mso-spacerun:yes'>                             </span>Header <span
class=GramE>file</span> for drivers queue implementation</pre><pre><span
class=SpellE><span class=GramE>resource.h</span></span><span style='mso-spacerun:yes'>                          </span>Resource header</pre><pre><span
class=GramE>sources</span><span style='mso-spacerun:yes'>                             </span><span
class=SpellE>Sources</span> file</pre><pre><span class=SpellE><span
class=GramE>stdafx.h</span></span><span style='mso-spacerun:yes'>                            </span>Precompiled header file</pre><pre><span
class=SpellE>WpdBaseDriver.cpp</span><span style='mso-spacerun:yes'>                   </span>Implements the main WPD message handler which unpacks and dispatches WPD messages</pre><pre><span
class=SpellE>WpdBaseDriver.h</span><span style='mso-spacerun:yes'>                     </span>Header <span
class=GramE>file</span> for the main WPD message handler</pre><pre><span
class=SpellE>WpdCapabilities.cpp</span><span style='mso-spacerun:yes'>                 </span>Implements the commands related to Capabilities</pre><pre><span
class=SpellE>WpdCapabilities.h</span><span style='mso-spacerun:yes'>                   </span>Header <span
class=GramE>file</span> for Capabilities implementation</pre><pre><span
class=SpellE>WpdObjectEnum.cpp</span><span style='mso-spacerun:yes'>                   </span>Implements the commands related to enumerating contents</pre><pre><span
class=SpellE>WpdObjectEnum.h</span><span style='mso-spacerun:yes'>                     </span>Header <span
class=GramE>file</span> for content enumeration implementation</pre><pre><span
class=SpellE>WpdObjectProperties.cpp</span><span style='mso-spacerun:yes'>         </span><span style='mso-spacerun:yes'>    </span>Implements the commands related to handling object meta-data</pre><pre><span
class=SpellE>WpdObjectProperties.h</span><span style='mso-spacerun:yes'>               </span>Header file for commands related to handling object meta-data</pre><pre><span
class=SpellE>WpdObjectResources.cpp</span><span style='mso-spacerun:yes'>              </span>Implements the commands related to transferring data</pre><pre><span
class=SpellE>WpdObjectResources.h</span><span style='mso-spacerun:yes'>                </span>Header file for commands related to transferring data</pre><pre><span
class=SpellE>WpdMultiTransportDriver.cpp</span><span style='mso-spacerun:yes'>             </span>Main DLL file</pre><pre><span
class=SpellE>WpdMultiTransportDriver.def</span><span style='mso-spacerun:yes'>             </span>Exports</pre><pre><span
class=SpellE>WpdMultiTransportDriver.idl</span><span style='mso-spacerun:yes'>             </span>Component Interface file</pre><pre><span
class=SpellE>WpdMultiTransportDriver.inf</span><span style='mso-spacerun:yes'>             </span>Sample Device INF file</pre><pre><span
class=SpellE>WpdMultiTransportDriver.rc</span><span style='mso-spacerun:yes'>              </span>Resource file</pre><pre><span
class=SpellE>WpdMultiTransportDriver.rgs</span><span style='mso-spacerun:yes'>             </span>ATL Self registration file</pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<p align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:"Courier New"'><a href="#top"><span
style='font-family:Verdana'>Top of page</span></a></span><span
style='font-size:10.0pt;font-family:Verdana;mso-bidi-font-family:"Courier New"'>
<o:p></o:p></span></p>
<pre><o:p>&nbsp;</o:p></pre>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-padding-alt:0in 5.4pt 0in 5.4pt'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</td>
</tr>
</table>
<pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif";mso-bidi-font-family:"Courier New"'>©
2006 Microsoft Corporation</span><span style='font-size:10.0pt;font-family:
Verdana;mso-bidi-font-family:"Courier New"'> <o:p></o:p></span></p>
</div>
</body>
</html>

Просмотреть файл

@ -1,496 +0,0 @@
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:p="urn:schemas-microsoft-com:office:powerpoint"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:oa="urn:schemas-microsoft-com:office:activation"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="WpdWudfSampleDriver_files/filelist.xml">
<title>WPD Sample Driver</title>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-alt:"Device Font 10cpi";
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:black;}
h2
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman";
color:black;
font-weight:bold;}
h3
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman";
color:black;
font-weight:bold;}
h4
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman";
color:black;
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:black;}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";
color:black;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:141195626;
mso-list-type:hybrid;
mso-list-template-ids:1101549682 -1772980884 190112462 -1733515742 -301441412 1072717550 1308367348 -377315616 2084882674 1873576632;}
@list l0:level1
{mso-level-number-format:image;
list-style-image:url("WpdWudfSampleDriver_files/image001.gif");
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level2
{mso-level-start-at:2220;
mso-level-number-format:image;
list-style-image:url("WpdWudfSampleDriver_files/image001.gif");
mso-level-text:\F0B7;
mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level3
{mso-level-start-at:2220;
mso-level-number-format:image;
list-style-image:url("WpdWudfSampleDriver_files/image001.gif");
mso-level-text:\F0B7;
mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
<meta name=Template content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple style='tab-interval:.5in'
leftmargin=8>
<div class=Section1>
<h2><span style='font-family:Verdana'>Windows Portable Device (WPD) Sample
Driver <o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>Summary<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>This sample contains
working source code for a WPD driver.<span style='mso-spacerun:yes'> 
</span>WPD Drivers are built using the Windows User-Mode Driver Foundation with
special processing added to handle WPD messages.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>Building a new WPD Driver<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>You are encouraged to use
this sample code to start building your own WPD Driver. Modify the sample to
add your own features.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The following is a
suggested roadmap to developing your driver:<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11
src="WpdWudfSampleDriver_files/image001.gif" alt="*"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Create
WPD driver shell <o:p></o:p></span></p>
<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l0 level2 lfo1;
tab-stops:list 1.0in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11
src="WpdWudfSampleDriver_files/image001.gif" alt="*"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Use
sample driver as base<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11
src="WpdWudfSampleDriver_files/image001.gif" alt="*"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Update
the INF to install this driver for your device (it will not actually do
anything with the device yet)<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11
src="WpdWudfSampleDriver_files/image001.gif" alt="*"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Start
implementing functionality.<span style='mso-spacerun:yes'>  </span>This is
where the driver will start interacting with the device:<o:p></o:p></span></p>
<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l0 level2 lfo1;
tab-stops:list 1.0in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11
src="WpdWudfSampleDriver_files/image001.gif" alt="*"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Object
Enumeration<o:p></o:p></span></p>
<p style='margin-left:1.5in;text-indent:-.25in;mso-list:l0 level3 lfo1;
tab-stops:list 1.5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11
src="WpdWudfSampleDriver_files/image001.gif" alt="*"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>WPD_CATEGORY_OBJECT_ENUMERATION<o:p></o:p></span></p>
<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l0 level2 lfo1;
tab-stops:list 1.0in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11
src="WpdWudfSampleDriver_files/image001.gif" alt="*"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Properties<o:p></o:p></span></p>
<p style='margin-left:1.5in;text-indent:-.25in;mso-list:l0 level3 lfo1;
tab-stops:list 1.5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11
src="WpdWudfSampleDriver_files/image001.gif" alt="*"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Implement
Reads, Writes<o:p></o:p></span></p>
<p style='margin-left:1.5in;text-indent:-.25in;mso-list:l0 level3 lfo1;
tab-stops:list 1.5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11
src="WpdWudfSampleDriver_files/image001.gif" alt="*"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>WPD_CATEGORY_OBJECT_PROPERTIES<o:p></o:p></span></p>
<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l0 level2 lfo1;
tab-stops:list 1.0in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11
src="WpdWudfSampleDriver_files/image001.gif" alt="*"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Transfer<o:p></o:p></span></p>
<p style='margin-left:1.5in;text-indent:-.25in;mso-list:l0 level3 lfo1;
tab-stops:list 1.5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11
src="WpdWudfSampleDriver_files/image001.gif" alt="*"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Implement
Resource enumeration, reads, writes<o:p></o:p></span></p>
<p style='margin-left:1.5in;text-indent:-.25in;mso-list:l0 level3 lfo1;
tab-stops:list 1.5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11
src="WpdWudfSampleDriver_files/image001.gif" alt="*"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>WPD_CATEGORY_OBJECT_RESOURCES<o:p></o:p></span></p>
<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l0 level2 lfo1;
tab-stops:list 1.0in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11
src="WpdWudfSampleDriver_files/image001.gif" alt="*"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Capabilities<o:p></o:p></span></p>
<p style='margin-left:1.5in;text-indent:-.25in;mso-list:l0 level3 lfo1;
tab-stops:list 1.5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11
src="WpdWudfSampleDriver_files/image001.gif" alt="*"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>WPD_CATEGORY_CAPABILITIES<o:p></o:p></span></p>
<p style='margin-left:1.0in;text-indent:-.25in;mso-list:l0 level2 lfo1;
tab-stops:list 1.0in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'><img width=11 height=11
src="WpdWudfSampleDriver_files/image001.gif" alt="*"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Remaining
commands<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>Building the Sample<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>Open a free or checked
DDK build environment, go to this directory, and run <b>build</b>. This creates
WpdWudfSampleDriver.dll in the <span class=SpellE>Objfre</span> or <span
class=SpellE>Objchk</span> directory. Before the sample can be used, it must be
installed by running the “Add Hardware” Wizard from Control Panel:<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>1. Launch the Windows
&quot;Control Panel&quot;.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>2. Double Click the
&quot;Add Hardware&quot; icon (Click “Classic View” link on the left hand pane
if you cant find it).<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>3. The &quot;Add
hardware&quot; Wizard should launch, press the &quot;Next&quot; button. (The
wizard will do a quick search for devices already installed on the system.<span
style='mso-spacerun:yes'>  </span>It may take a minute or two.)<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>4. Choose the
&quot;Install the hardware that I manually select from a list (Advanced)&quot;
option and press the &quot;Next&quot; button.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>5. A list of device
categories will be shown.<span style='mso-spacerun:yes'>  </span>Scroll to the
very end of the list and select &quot;Windows Portable Devices&quot; option,
and click “Next”.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>6. Press the &quot;Have
Disk&quot; button and browse to the location of the device .INF file.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>7. Choose the appropriate
device to install (&quot;Microsoft WPD Sample” for example) and press the
&quot;Next&quot; button.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>8. After the files have
been copied to the system, the device should be installed (you can verify this
by looking in “Device Manager”).<span style='mso-spacerun:yes'>  </span>You can
now run WPD applications.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>Testing the WPD Driver<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>To test the WPD Driver, double
click the appropriate WPD device icon in “My Computer” to start browsing the
sample device contents.<span style='mso-spacerun:yes'>  </span>Or use the <span
class=SpellE><b style='mso-bidi-font-weight:normal'>WpdInfo</b></span>
development tool included in this kit.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>Supported Configurations<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>The WPD DDK sample driver
has been tested in checked and free builds for both 32 and 64-bit platforms.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><u>File<span style='mso-spacerun:yes'>                                </span>Description<o:p></o:p></u></pre><pre><span
class=SpellE>ContextMap.h</span><span style='mso-spacerun:yes'>                        </span>Data structure for storing and retrieving driver contexts<o:p></o:p></pre><pre><span
class=SpellE>Device.cpp</span><span style='mso-spacerun:yes'>                          </span>Driver's <span
class=SpellE>IWDFDevice</span> implementation<o:p></o:p></pre><pre><span
class=SpellE>Device.h</span><span style='mso-spacerun:yes'>                            </span>Header <span
class=GramE>file</span> for driver's <span class=SpellE>IWDFDevice</span> implementation<o:p></o:p></pre><pre><span
class=SpellE>DeviceObjectFakeContent.h</span><span style='mso-spacerun:yes'>           </span>Encapsulates the WPD device object<o:p></o:p></pre><pre><span
class=SpellE>Driver.cpp</span><span style='mso-spacerun:yes'>                          </span>Drivers <span
class=SpellE>IDriverEntry</span> implementation <o:p></o:p></pre><pre><span
class=SpellE>Driver.h</span><span style='mso-spacerun:yes'>                            </span>Header <span
class=GramE>file</span> for driver's <span class=SpellE>IDriverEntry</span> implementation<o:p></o:p></pre><pre><span
class=SpellE>FakeContactContent.h</span><span style='mso-spacerun:yes'>                </span>Encapsulates a contact entry<o:p></o:p></pre><pre><span
class=SpellE>FakeContent.h</span><span style='mso-spacerun:yes'>                       </span>Encapsulates a generic entry<o:p></o:p></pre><pre><span
class=SpellE>FakeDevice.h</span><span style='mso-spacerun:yes'>                        </span>Implementation of an abstract device (this sample does not talk to real hardware)<o:p></o:p></pre><pre><span
class=SpellE>FakeImageContent.h</span><span style='mso-spacerun:yes'>                  </span>Encapsulates an image data entry<o:p></o:p></pre><pre><span
class=SpellE>FakeMusicContent.h</span><span style='mso-spacerun:yes'>                  </span>Encapsulates a music data entry<o:p></o:p></pre><pre><span
class=SpellE>FakeVideoContent.h</span><span style='mso-spacerun:yes'>                  </span>Encapsulates a video data entry<o:p></o:p></pre><pre><span
class=SpellE><span class=GramE>helpers.cpp</span></span><span style='mso-spacerun:yes'>                         </span>Miscellaneous helper functions<o:p></o:p></pre><pre><span
class=SpellE><span class=GramE>helpers.h</span></span><span style='mso-spacerun:yes'>                           </span>Miscellaneous helper function definitions<o:p></o:p></pre><pre>MAKEFILE<span style='mso-spacerun:yes'>                            </span><span
class=SpellE>Makefile</span><o:p></o:p></pre><pre><span class=SpellE><span
class=GramE>makefile.inc</span></span><span style='mso-spacerun:yes'>                        </span><span
class=SpellE>Makefile</span><o:p></o:p></pre><pre><span class=SpellE>Queue.cpp</span><span style='mso-spacerun:yes'>            </span><span style='mso-spacerun:yes'>               </span>Driver's queue implementation<o:p></o:p></pre><pre><span
class=SpellE>NetworkConfigFakeContent.h</span><span style='mso-spacerun:yes'>   </span>Encapsulates a <span
class=SpellE>NetworkConfiguration</span> functional object<o:p></o:p></pre><pre><span
class=SpellE>Queue.h</span><span style='mso-spacerun:yes'>                             </span>Header <span
class=GramE>file</span> for drivers queue implementation<o:p></o:p></pre><pre><span
class=SpellE>RenderingInformationFakeContent.h</span><span style='mso-spacerun:yes'>   </span>Encapsulates a <span
class=SpellE>RenderinfInformation</span> functional object<o:p></o:p></pre><pre><span
class=SpellE><span class=GramE>resource.h</span></span><span style='mso-spacerun:yes'>                          </span>Resource header<o:p></o:p></pre><pre><span
class=SpellE>SampleAudioAnnotation.wav</span><span style='mso-spacerun:yes'>           </span>Sample audio annotation data<o:p></o:p></pre><pre><span
class=SpellE>SampleContactPhoto.png</span><span style='mso-spacerun:yes'>              </span>Sample photo for a contact<o:p></o:p></pre><pre><span
class=SpellE>SampleDeviceIcon.ico</span><span style='mso-spacerun:yes'>                </span>Sample device icon<o:p></o:p></pre><pre><span
class=SpellE>SampleExternalStorageIcon.ico</span><span style='mso-spacerun:yes'>       </span>Sample storage icon<o:p></o:p></pre><pre><span
class=SpellE>SampleImage.jpg</span><span style='mso-spacerun:yes'>                     </span>Sample image data<o:p></o:p></pre><pre><span
class=SpellE>SampleImageThumbnail.jpg</span><span style='mso-spacerun:yes'>            </span>Sample thumbnail<o:p></o:p></pre><pre><span
class=SpellE>SampleInternalStorageIcon.ico</span><span style='mso-spacerun:yes'>       </span>Sample storage icon<o:p></o:p></pre><pre><span
class=SpellE>SampleMusic.wma</span><span style='mso-spacerun:yes'>                     </span>Sample music data<o:p></o:p></pre><pre><span
class=SpellE>SampleVideo.wmv</span><span style='mso-spacerun:yes'>                     </span>Sample video data<o:p></o:p></pre><pre><span
class=GramE>sources</span><span style='mso-spacerun:yes'>                             </span><span
class=SpellE>Sources</span> file<o:p></o:p></pre><pre><span class=SpellE><span
class=GramE>stdafx.h</span></span><span style='mso-spacerun:yes'>                            </span>Precompiled header file<o:p></o:p></pre><pre><span
class=SpellE>StorageObjectFakeContent.h</span><span style='mso-spacerun:yes'>          </span>Encapsulates the behavior for a Storage functional object<o:p></o:p></pre><pre><span
class=SpellE>WpdBaseDriver.cpp</span><span style='mso-spacerun:yes'>                   </span>Implements the main WPD message handler which unpacks and dispatches WPD messages<o:p></o:p></pre><pre><span
class=SpellE>WpdBaseDriver.h</span><span style='mso-spacerun:yes'>                     </span>Header <span
class=GramE>file</span> for the main WPD message handler<o:p></o:p></pre><pre><span
class=SpellE>WpdCapabilities.cpp</span><span style='mso-spacerun:yes'>                 </span>Implements the commands related to Capabilities<o:p></o:p></pre><pre><span
class=SpellE>WpdCapabilities.h</span><span style='mso-spacerun:yes'>                   </span>Header <span
class=GramE>file</span> for Capabilities implementation<o:p></o:p></pre><pre><span
class=SpellE>WpdNetworkConfig.cpp</span><span style='mso-spacerun:yes'>                </span>Implements the commands related to Network Configuration functional object<o:p></o:p></pre><pre><span
class=SpellE>WpdNetworkConfig.h</span><span style='mso-spacerun:yes'>                  </span>Header file for commands related to Network Configuration functional object<o:p></o:p></pre><pre><span
class=SpellE>WpdObjectEnum.cpp</span><span style='mso-spacerun:yes'>                   </span>Implements the commands related to enumerating contents<o:p></o:p></pre><pre><span
class=SpellE>WpdObjectEnum.h</span><span style='mso-spacerun:yes'>                     </span>Header <span
class=GramE>file</span> for content enumeration implementation<o:p></o:p></pre><pre><span
class=SpellE>WpdObjectManagement.cpp</span><span style='mso-spacerun:yes'>             </span>Implements the commands related to managing contents<o:p></o:p></pre><pre><span
class=SpellE>WpdObjectManagement.h</span><span style='mso-spacerun:yes'>               </span>Header file for commands related to managing contents<o:p></o:p></pre><pre><span
class=SpellE>WpdObjectProperties.cpp</span><span style='mso-spacerun:yes'>             </span>Implements the commands related to handling object meta-data<o:p></o:p></pre><pre><span
class=SpellE>WpdObjectProperties.h</span><span style='mso-spacerun:yes'>               </span>Header file for commands related to handling object meta-data<o:p></o:p></pre><pre><span
class=SpellE>WpdObjectPropertiesBulk.cpp</span><span style='mso-spacerun:yes'>         </span>Implements the commands related to bulk handling of object meta-data<o:p></o:p></pre><pre><span
class=SpellE>WpdObjectPropertiesBulk.h</span><span style='mso-spacerun:yes'>        </span><span style='mso-spacerun:yes'>   </span>Header file for commands related to bulk handling of object meta-data<o:p></o:p></pre><pre><span
class=SpellE>WpdObjectResources.cpp</span><span style='mso-spacerun:yes'>              </span>Implements the commands related to transferring data<o:p></o:p></pre><pre><span
class=SpellE>WpdObjectResources.h</span><span style='mso-spacerun:yes'>                </span>Header file for commands related to transferring data<o:p></o:p></pre><pre><span
class=SpellE>WpdStorage.cpp</span><span style='mso-spacerun:yes'>                      </span>Implements the commands related to Storage functional object<o:p></o:p></pre><pre><span
class=SpellE>WpdStorage.h</span><span style='mso-spacerun:yes'>                        </span>Header file for commands related to Storage functional object<o:p></o:p></pre><pre><span
class=SpellE>WpdWudfSampleDriver.cpp</span><span style='mso-spacerun:yes'>             </span>Main DLL file<o:p></o:p></pre><pre><span
class=SpellE>WpdWudfSampleDriver.def</span><span style='mso-spacerun:yes'>             </span>Exports<o:p></o:p></pre><pre><span
class=SpellE>WpdWudfSampleDriver.idl</span><span style='mso-spacerun:yes'>             </span>Component Interface file<o:p></o:p></pre><pre><span
class=SpellE>WpdWudfSampleDriver.inf</span><span style='mso-spacerun:yes'>             </span>Sample Device INF file<o:p></o:p></pre><pre><span
class=SpellE>WpdWudfSampleDriver.rc</span><span style='mso-spacerun:yes'>              </span>Resource file<o:p></o:p></pre><pre><span
class=SpellE>WpdWudfSampleDriver.rgs</span><span style='mso-spacerun:yes'>             </span>ATL Self registration file</pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<p align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:"Courier New"'><a href="#top"><span
style='font-family:Verdana'>Top of page</span></a></span><span
style='font-size:10.0pt;font-family:Verdana;mso-bidi-font-family:"Courier New"'>
<o:p></o:p></span></p>
<pre><o:p>&nbsp;</o:p></pre>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</td>
</tr>
</table>
<pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif";mso-bidi-font-family:"Courier New"'>©
1999 Microsoft Corporation</span><span style='font-size:10.0pt;font-family:
Verdana;mso-bidi-font-family:"Courier New"'> <o:p></o:p></span></p>
</div>
</body>
</html>