<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=gb2312">
<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="cid:filelist.xml@01CD9FF0.536AAD80"><link rel="Edit-Time-Data" href="cid:editdata.mso"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>110</w:Zoom>
<w:SpellingState>Clean</w:SpellingState>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:EnvelopeVis/>
<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:DoNotExpandShiftReturn/>
<w:BreakWrappedTables/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:UseFELayout/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<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" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" 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:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
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:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
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;
panose-1:2 4 5 3 5 4 6 3 2 4;
mso-font-alt:"Calisto MT";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-pitch:variable;
mso-font-signature:-536870145 1073743103 0 0 415 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;
mso-font-alt:"Century Gothic";
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-520092929 1073786111 9 0 415 0;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-alt:Verdana;
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: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:"\@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;}
@font-face
{font-family:STXihei;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
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-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-font-family:SimSun;
mso-fareast-language:ZH-CN;}
a:link, span.MsoHyperlink
{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;}
span.EmailStyle17
{mso-style-type:personal;
mso-style-noshow:yes;
mso-style-unhide:no;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-hansi-font-family:Calibri;
mso-bidi-font-family:Calibri;
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal;
mso-style-noshow:yes;
mso-style-unhide:no;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-hansi-font-family:Calibri;
mso-bidi-font-family:Calibri;
color:#1F497D;}
span.EmailStyle19
{mso-style-type:personal-reply;
mso-style-noshow:yes;
mso-style-unhide:no;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-hansi-font-family:Calibri;
mso-bidi-font-family:Calibri;
color:#1F497D;
font-weight:normal;
font-style:normal;
text-decoration:none;
text-underline:none;
text-decoration:none;
text-line-through:none;}
span.SpellE
{mso-style-name:"";
mso-spl-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;}
--></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="1027" />
</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="purple" style="tab-interval:.5in">
<div class="WordSection1">
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:10.0pt;color:#1F497D">Hi-<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:10.0pt;color:#1F497D"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:10.0pt;color:#1F497D">To be clear, this is not a SCSI pass through request; this is an NVMe pass through command that we’ve encapsulated into an IOCTL that we send to
the miniport.<span style="mso-spacerun:yes"> </span>The guideline we wrote doesn’t specify how the app identifies the miniport and we don’t have sample code there and I suppose we probably should.<span style="mso-spacerun:yes">
</span>Here’s some hacky example code that shows how your app can send a bunch of “identify IOCTLs” which you will have to define on your own (an IOCTL that just says “yes I’m a miniport that you are looking for”).<span style="mso-spacerun:yes">
</span>This routine will keep a list of those adapters in an array of handles with the array index being the
<span class="SpellE">scsiport</span> number where the miniport is at that you are interested in.<span style="mso-spacerun:yes">
</span>So, in your driver quickly define an IOCTL and a handler that looks at a signature or whatever and responses success and this should work for you.<span style="mso-spacerun:yes">
</span>There are more elegant ways of doing it but this should get you going<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:10.0pt;color:#1F497D"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:10.0pt;color:#1F497D">Thx<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:10.0pt;color:#1F497D">Paul<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:10.0pt;color:#1F497D"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><span class="SpellE"><font size="2" color="blue" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";color:blue;mso-fareast-language:EN-US">int</span></font></span><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><span class="SpellE"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US">FindNlAdapters</span></font></span><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US">(<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span>HANDLE<span style="mso-spacerun:yes"> </span><span class="SpellE">nlAdapters</span>[],<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span><span class="SpellE"><font color="blue"><span style="color:blue">int</span></font></span><span style="mso-spacerun:yes">
</span><span class="SpellE">maxHandles</span><o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span>)<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US">{<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span><span class="SpellE"><font color="blue"><span style="color:blue">int</span></font></span><span style="mso-spacerun:yes">
</span><span class="SpellE">scsiPort</span>;<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span>TCHAR<span style="mso-spacerun:yes"> </span>buffer[64];<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span>LPTSTR<span style="mso-spacerun:yes"> </span><span class="SpellE">pszTxt</span> =
<font color="#a31515"><span style="color:#A31515">"\\\\.\\Scsi"</span></font>;<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span>LPCTSTR<span style="mso-spacerun:yes"> </span><span class="SpellE">pszFormat</span> =
<font color="#a31515"><span style="color:#A31515">"%<span class="SpellE">s%d</span>:"</span></font>;<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span><span class="SpellE">size_t</span><span style="mso-spacerun:yes">
</span><span class="SpellE">cchDest</span> = 64;<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:1">
</span>DWORD<span style="mso-spacerun:yes"> </span><span class="SpellE">dw</span>;<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:1">
</span>NVME_PRIVATE_IOCTL <span class="SpellE">myIoctl</span>;<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:1">
</span><span class="SpellE"><font color="blue"><span style="color:blue">int</span></font></span>
<span class="SpellE">nlAdapterCount</span> = 0;<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:1">
</span><span class="SpellE">printf</span>(<font color="#a31515"><span style="color:#A31515">"<span class="SpellE">FindNlAdapters</span>: Searching
<span class="SpellE">ScsiPorts</span>\n"</span></font>);<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span><font color="green"><span style="color:green">// Initialize <span class="SpellE">
nlAdapters</span> array with 0s.</span></font><o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span><span class="SpellE">memset</span>(<span class="SpellE">nlAdapters</span>, 0,
<span class="SpellE">maxHandles</span> * <span class="SpellE"><font color="blue"><span style="color:blue">sizeof</span></font></span>(HANDLE));<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span><font color="blue"><span style="color:blue">for</span></font> (<span class="SpellE">scsiPort</span> = 0;
<span class="SpellE">scsiPort</span> < <span class="SpellE">maxHandles</span>; <span class="SpellE">
scsiPort</span>++) {<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span><span class="SpellE">wsprintf</span>(<span class="SpellE">buffer,pszFormat</span>,
<span class="SpellE">pszTxt</span>, <span class="SpellE">scsiPort</span>);<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:2">
</span>HANDLE hand = <span class="SpellE">CreateFile</span>(buffer,<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span>GENERIC_READ | GENERIC_WRITE,<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span>FILE_SHARE_READ | FILE_SHARE_WRITE,<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span>NULL,<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span>OPEN_EXISTING,<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span>FILE_ATTRIBUTE_NORMAL,<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span>NULL);<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:2">
</span><font color="blue"><span style="color:blue">if</span></font> (hand == INVALID_HANDLE_VALUE) {<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span><span class="SpellE">dw</span> = <span class="SpellE">GetLastError</span>();<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span><span class="SpellE">printf</span>(<font color="#a31515"><span style="color:#A31515">"<span class="SpellE">didnt</span> find %s<span style="mso-spacerun:yes">
</span>err %d \n"</span></font>, buffer, <span class="SpellE">dw</span>);<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:2">
</span>}<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:2">
</span><font color="blue"><span style="color:blue">else</span></font> {<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span><span class="SpellE">printf</span>(<font color="#a31515"><span style="color:#A31515">"found %s \n"</span></font>, buffer);<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span><span class="SpellE">myIoctl.SrbIoCtrl.HeaderLength</span><span style="mso-spacerun:yes">
</span>= <span class="SpellE"><font color="blue"><span style="color:blue">sizeof</span></font></span>(SRB_IO_CONTROL);<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span><span class="SpellE">memcpy</span>(<span class="SpellE">myIoctl.SrbIoCtrl.Signature</span>, NVME_SIG_STR,
<span class="SpellE"><font color="blue"><span style="color:blue">sizeof</span></font></span>(NVME_SIG_STR));<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span><span class="SpellE">myIoctl.SrbIoCtrl.Timeout</span><span style="mso-spacerun:yes">
</span>= 20;<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span><span class="SpellE">myIoctl.SrbIoCtrl.ControlCode</span><span style="mso-spacerun:yes">
</span>= (ULONG)NL_IOCTL_IDENTIFY;<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span><span class="SpellE">myIoctl.SrbIoCtrl.ReturnCode</span><span style="mso-spacerun:yes">
</span>= 0;<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span><span class="SpellE">myIoctl.SrbIoCtrl.Length</span><span style="mso-spacerun:yes">
</span>= <span class="SpellE"><font color="blue"><span style="color:blue">sizeof</span></font></span>(NVME_PRIVATE_IOCTL) -<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span><span class="SpellE"><font color="blue"><span style="color:blue">sizeof</span></font></span>(SRB_IO_CONTROL);<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:2">
</span>BOOL b = <span class="SpellE">DeviceIoControl</span>(hand,<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span>IOCTL_SCSI_MINIPORT,<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span>&<span class="SpellE">myIoctl</span>,<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span><span class="SpellE"><font color="blue"><span style="color:blue">sizeof</span></font></span>(<span class="SpellE">myIoctl</span>),<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span>&<span class="SpellE">myIoctl</span>,<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span><span class="SpellE"><font color="blue"><span style="color:blue">sizeof</span></font></span>(<span class="SpellE">myIoctl</span>),<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span>&<span class="SpellE">dw</span>,<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span>NULL);<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:2">
</span><font color="blue"><span style="color:blue">if</span></font> (FALSE == b) {<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span><span class="SpellE">printf</span>(<font color="#a31515"><span style="color:#A31515">"<span class="SpellE">FindNlAdapters</span>: NL_IOCTL_IDENTIFY: No NL miniport at this location %d\n"</span></font> ,
<span class="SpellE">scsiPort</span>);<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span><span class="SpellE">CloseHandle</span>(hand);<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:2">
</span>}<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:2">
</span><font color="blue"><span style="color:blue">else</span></font> {<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span><span class="SpellE">printf</span>(<font color="#a31515"><span style="color:#A31515">"<span class="SpellE">FindNlAdapters</span>: NL_IOCTL_IDENTIFY: NL miniport at this location %d !!!\n"</span></font> ,
<span class="SpellE">scsiPort</span>);<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span><span class="SpellE">nlAdapters</span>[<span class="SpellE">scsiPort</span>] = hand;<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:3">
</span><span class="SpellE">nlAdapterCount</span>++;<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:2">
</span>}<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-tab-count:2">
</span>}<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span>}<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span><span class="SpellE">printf</span>(<font color="#a31515"><span style="color:#A31515">"<span class="SpellE">FindNlAdapters</span>: NL_IOCTL_IDENTIFY Success:
<span class="SpellE">nlAdapterCount</span>: %d \n"</span></font>, <span class="SpellE">
nlAdapterCount</span>);<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US"><span style="mso-spacerun:yes">
</span><font color="blue"><span style="color:blue">return</span></font> <span class="SpellE">
nlAdapterCount</span>;<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-layout-grid-align:none;text-autospace:none"><font size="2" face="Consolas"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-font-family:"Times New Roman";mso-fareast-language:EN-US">}<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:10.0pt;color:#1F497D"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:10.0pt;color:#1F497D"><o:p> </o:p></span></font></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> nvmewin-bounces@lists.openfabrics.org
[mailto:nvmewin-bounces@lists.openfabrics.org] <b><span style="font-weight:bold">On Behalf Of
</span></b>Yong Chen<br>
<b><span style="font-weight:bold">Sent:</span></b> Monday, October 01, 2012 3:28 PM<br>
<b><span style="font-weight:bold">To:</span></b> nvmewin@lists.openfabrics.org<br>
<b><span style="font-weight:bold">Subject:</span></b> [nvmewin] looking for help with IOCTL tool<o:p></o:p></span></font></p>
</div>
</div>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">Hi, everyone,<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">My team is starting to work on Windows driver based on nvmewin reference driver. Thanks for sharing such excellent work.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">I have a question around IOCTL: which file path should I open in order to send the call to?<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">The PT_IOCTL.doc in the library suggests to open file handle on
<a href="file:///\\.\ScsiN">\\.\ScsiN</a>: before sending DeviceIoControl() down. Unfortunately, our Windows driver never receives anything. The SPTI tool sample in WDK says ScsiN: only works when the device is unclaimed by a SCSI driver. In the case, proper
PathId, TargetId, and Lun must be set in the SCSI pass thru structure, but NVME_PASS_THROUGH_IOCTL doesn’t have these fields.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">According to
<a href="http://msdn.microsoft.com/en-us/library/windows/hardware/ff556013(v=vs.85).aspx">
MSDN</a>, IOCTL send to storage class drivers are mapped to SRBs with function set to SRB_FUNCTION_EXECUTE_SCSI. If I open
<a href="file:///\\.\PhysicalDriveN">\\.\PhysicalDriveN</a>, then I do receive SRBs with such Execute SCSI function code. But the current driver code expects SRB_FUNCTION_IO_CONTROL.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">How do you guys do it?<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">Many thanks in advance,<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt"><o:p> </o:p></span></font></p>
<div class="MsoNormal" align="center" style="text-align:center"><font size="2" face="Calibri"><span style="font-size:11.0pt">
<hr size="2" width="100%" align="center">
</span></font></div>
<p class="MsoNormal"><font size="2" color="black" face="华文细黑"><span style="font-size:10.0pt;font-family:STXihei;color:black">Yong Chen<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="black" face="华文细黑"><span style="font-size:10.0pt;font-family:STXihei;color:black">Storage Architect<br>
</span></font><font size="2" color="black" face="SimSun"><span lang="ZH-CN" style="font-size:10.0pt;font-family:SimSun;color:black">华为技术有限公司</span></font><font size="2" color="black" face="华文细黑"><span style="font-size:10.0pt;font-family:STXihei;color:black">
Huawei Technologies Co., Ltd<o:p></o:p></span></font></p>
<p class="MsoNormal"><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
<v:stroke joinstyle="miter" />
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0" />
<v:f eqn="sum @0 1 0" />
<v:f eqn="sum 0 0 @1" />
<v:f eqn="prod @2 1 2" />
<v:f eqn="prod @3 21600 pixelWidth" />
<v:f eqn="prod @3 21600 pixelHeight" />
<v:f eqn="sum @0 0 1" />
<v:f eqn="prod @6 1 2" />
<v:f eqn="prod @7 21600 pixelWidth" />
<v:f eqn="sum @8 21600 0" />
<v:f eqn="prod @7 21600 pixelHeight" />
<v:f eqn="sum @10 21600 0" />
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" />
<o:lock v:ext="edit" aspectratio="t" />
</v:shapetype><v:shape id="ridImg" o:spid="_x0000_s1026" type="#_x0000_t75" alt="Company_logo" style='position:absolute;margin-left:0;margin-top:0;width:76.5pt;height:24pt;z-index:251657728;visibility:visible;mso-wrap-style:square;mso-wrap-distance-left:0;mso-wrap-distance-top:0;mso-wrap-distance-right:0;mso-wrap-distance-bottom:0;mso-position-horizontal:left;mso-position-horizontal-relative:text;mso-position-vertical:absolute;mso-position-vertical-relative:line' o:allowoverlap="f">
<v:imagedata src="cid:image001.jpg@01CD9FEF.C8D9F5E0" o:title="company_logo" />
<w:wrap type="square"/>
</v:shape><![endif]--><![if !vml]><img width="128" height="40" src="cid:image003.jpg@01CD9FEF.C8D9F5E0" align="left" alt="Company_logo" v:shapes="ridImg"><![endif]><font size="2" color="black" face="华文细黑"><span style="font-size:10.0pt;font-family:STXihei;color:black">Office:
408-330-5482<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="black" face="Cambria"><span style="font-size:10.0pt;font-family:"Cambria","serif";color:black">Mobile: 425-922-0658</span></font><font size="2" color="black" face="华文细黑"><span style="font-size:10.0pt;font-family:STXihei;color:black"><o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="black" face="Calibri"><span style="font-size:11.0pt;color:black">Email:
<a href="mailto:yong.sc.chen@huawei.com">yong.sc.chen@huawei.com</a><br>
2330 Central Expressway<br>
Santa Clara, CA 95050<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="black" face="Calibri"><span style="font-size:11.0pt;color:black"><a href="http://www.huawei.com">http://www.huawei.com</a><o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="1" color="gray" face="SimSun"><span lang="ZH-CN" style="font-size:7.5pt;font-family:SimSun;color:gray">本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁</span></font><font size="1" color="gray" face="华文细黑"><span style="font-size:7.5pt;font-family:STXihei;color:gray"><br>
</span></font><font size="1" color="gray" face="SimSun"><span lang="ZH-CN" style="font-size:7.5pt;font-family:SimSun;color:gray">止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中</span></font><font size="1" color="gray" face="华文细黑"><span style="font-size:7.5pt;font-family:STXihei;color:gray"><br>
</span></font><font size="1" color="gray" face="SimSun"><span lang="ZH-CN" style="font-size:7.5pt;font-family:SimSun;color:gray">的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!</span></font><font size="1" color="gray" face="华文细黑"><span style="font-size:7.5pt;font-family:STXihei;color:gray"><br>
</span></font><font size="1" color="gray" face="Arial"><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:gray">This e-mail and its attachments contain confidential information from HUAWEI, which
<br>
is intended only for the person or entity whose address is listed above. Any use of the
<br>
information contained herein in any way (including, but not limited to, total or partial
<br>
disclosure, reproduction, or dissemination) by persons other than the intended <br>
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by
<br>
phone or email immediately and delete it!</span></font><font color="black"><span style="color:black"><o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt"><o:p> </o:p></span></font></p>
</div>
</body>
</html>