C++ app hosts CLR 4 and invokes .NET assembly (CppHostCLR)

The code sample uses the CLR 4 hosting APIs to host CLR in a native C++ project, load and invoke .NET assemblies

 
 
 
 
 
4.8 Star
(6)
17,652 times
Add to favorites
6/11/2012
E-mail Twitter del.icio.us Digg Facebook
<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="ReadMe_files/filelist.xml">
<link rel=Edit-Time-Data href="ReadMe_files/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:DocumentProperties>
  <o:Author>Jialiang Ge</o:Author>
  <o:LastAuthor>Ruiz Yi (CS&amp;S)</o:LastAuthor>
  <o:Revision>24</o:Revision>
  <o:TotalTime>388</o:TotalTime>
  <o:Created>2011-09-03T11:34:00Z</o:Created>
  <o:LastSaved>2012-02-24T02:55:00Z</o:LastSaved>
  <o:Pages>4</o:Pages>
  <o:Words>1725</o:Words>
  <o:Characters>9836</o:Characters>
  <o:Lines>81</o:Lines>
  <o:Paragraphs>23</o:Paragraphs>
  <o:CharactersWithSpaces>11538</o:CharactersWithSpaces>
  <o:Version>14.00</o:Version>
 </o:DocumentProperties>
 <o:OfficeDocumentSettings>
  <o:AllowPNG/>
 </o:OfficeDocumentSettings>
</xml><![endif]-->
<link rel=themeData href="ReadMe_files/themedata.thmx">
<link rel=colorSchemeMapping href="ReadMe_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:PunctuationKerning/>
  <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>ZH-CN</w:LidThemeAsian>
  <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:DontGrowAutofit/>
   <w:SplitPgBreakAndParaMark/>
   <w:EnableOpenTypeKerning/>
   <w:DontFlipMirrorIndents/>
   <w:OverrideTableStyleHps/>
   <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="&#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" 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" 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:����;
	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:����;
	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-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-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-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:-520081665 -1073717157 41 0 66047 0;}
@font-face
	{font-family:"\@����";
	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-top:0cm;
	margin-right:0cm;
	margin-bottom:10.0pt;
	margin-left:0cm;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
h1
	{mso-style-priority:9;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-link:"Heading 1 Char";
	mso-style-next:Normal;
	margin-top:24.0pt;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:0cm;
	margin-bottom:.0001pt;
	mso-add-space:auto;
	line-height:115%;
	mso-pagination:widow-orphan;
	mso-outline-level:1;
	font-size:14.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;
	mso-font-kerning:0pt;}
h1.CxSpFirst
	{mso-style-priority:9;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-link:"Heading 1 Char";
	mso-style-next:Normal;
	mso-style-type:export-only;
	margin-top:24.0pt;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:0cm;
	margin-bottom:.0001pt;
	mso-add-space:auto;
	line-height:115%;
	mso-pagination:widow-orphan;
	mso-outline-level:1;
	font-size:14.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;
	mso-font-kerning:0pt;}
h1.CxSpMiddle
	{mso-style-priority:9;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-link:"Heading 1 Char";
	mso-style-next:Normal;
	mso-style-type:export-only;
	margin:0cm;
	margin-bottom:.0001pt;
	mso-add-space:auto;
	line-height:115%;
	mso-pagination:widow-orphan;
	mso-outline-level:1;
	font-size:14.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;
	mso-font-kerning:0pt;}
h1.CxSpLast
	{mso-style-priority:9;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-link:"Heading 1 Char";
	mso-style-next:Normal;
	mso-style-type:export-only;
	margin:0cm;
	margin-bottom:.0001pt;
	mso-add-space:auto;
	line-height:115%;
	mso-pagination:widow-orphan;
	mso-outline-level:1;
	font-size:14.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;
	mso-font-kerning:0pt;}
h2
	{mso-style-priority:9;
	mso-style-qformat:yes;
	mso-style-link:"Heading 2 Char";
	mso-style-next:Normal;
	margin-top:10.0pt;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:0cm;
	margin-bottom:.0001pt;
	line-height:115%;
	mso-pagination:widow-orphan;
	mso-outline-level:2;
	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;}
h3
	{mso-style-noshow:yes;
	mso-style-priority:9;
	mso-style-qformat:yes;
	mso-style-link:"Heading 3 Char";
	mso-style-next:Normal;
	margin-top:10.0pt;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:0cm;
	margin-bottom:.0001pt;
	line-height:110%;
	mso-pagination:widow-orphan;
	mso-outline-level:3;
	font-size:11.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;}
h4
	{mso-style-noshow:yes;
	mso-style-priority:9;
	mso-style-qformat:yes;
	mso-style-link:"Heading 4 Char";
	mso-style-next:Normal;
	margin-top:10.0pt;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:0cm;
	margin-bottom:.0001pt;
	line-height:115%;
	mso-pagination:widow-orphan;
	mso-outline-level:4;
	font-size:11.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;
	font-style:italic;}
h5
	{mso-style-noshow:yes;
	mso-style-priority:9;
	mso-style-qformat:yes;
	mso-style-link:"Heading 5 Char";
	mso-style-next:Normal;
	margin-top:10.0pt;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:0cm;
	margin-bottom:.0001pt;
	line-height:115%;
	mso-pagination:widow-orphan;
	mso-outline-level:5;
	font-size:11.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:#7F7F7F;
	mso-themecolor:text1;
	mso-themetint:128;}
h6
	{mso-style-noshow:yes;
	mso-style-priority:9;
	mso-style-qformat:yes;
	mso-style-link:"Heading 6 Char";
	mso-style-next:Normal;
	margin:0cm;
	margin-bottom:.0001pt;
	line-height:110%;
	mso-pagination:widow-orphan;
	mso-outline-level:6;
	font-size:11.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:#7F7F7F;
	mso-themecolor:text1;
	mso-themetint:128;
	font-style:italic;}
p.MsoHeading7, li.MsoHeading7, div.MsoHeading7
	{mso-style-noshow:yes;
	mso-style-priority:9;
	mso-style-qformat:yes;
	mso-style-link:"Heading 7 Char";
	mso-style-next:Normal;
	margin:0cm;
	margin-bottom:.0001pt;
	line-height:115%;
	mso-pagination:widow-orphan;
	mso-outline-level:7;
	font-size:11.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;
	font-style:italic;}
p.MsoHeading8, li.MsoHeading8, div.MsoHeading8
	{mso-style-noshow:yes;
	mso-style-priority:9;
	mso-style-qformat:yes;
	mso-style-link:"Heading 8 Char";
	mso-style-next:Normal;
	margin:0cm;
	margin-bottom:.0001pt;
	line-height:115%;
	mso-pagination:widow-orphan;
	mso-outline-level:8;
	font-size:10.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;}
p.MsoHeading9, li.MsoHeading9, div.MsoHeading9
	{mso-style-noshow:yes;
	mso-style-priority:9;
	mso-style-qformat:yes;
	mso-style-link:"Heading 9 Char";
	mso-style-next:Normal;
	margin:0cm;
	margin-bottom:.0001pt;
	line-height:115%;
	mso-pagination:widow-orphan;
	mso-outline-level:9;
	font-size:10.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;
	letter-spacing:.25pt;
	font-style:italic;}
p.MsoHeader, li.MsoHeader, div.MsoHeader
	{mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-link:"Header Char";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	tab-stops:center 216.0pt right 432.0pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
p.MsoFooter, li.MsoFooter, div.MsoFooter
	{mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-link:"Footer Char";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	tab-stops:center 216.0pt right 432.0pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
p.MsoTitle, li.MsoTitle, div.MsoTitle
	{mso-style-priority:10;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-link:"Title Char";
	mso-style-next:Normal;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:10.0pt;
	margin-left:0cm;
	mso-add-space:auto;
	mso-pagination:widow-orphan;
	border:none;
	mso-border-bottom-alt:solid windowtext .5pt;
	padding:0cm;
	mso-padding-alt:0cm 0cm 1.0pt 0cm;
	font-size:26.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;
	letter-spacing:.25pt;}
p.MsoTitleCxSpFirst, li.MsoTitleCxSpFirst, div.MsoTitleCxSpFirst
	{mso-style-priority:10;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-link:"Title Char";
	mso-style-next:Normal;
	mso-style-type:export-only;
	margin:0cm;
	margin-bottom:.0001pt;
	mso-add-space:auto;
	mso-pagination:widow-orphan;
	border:none;
	mso-border-bottom-alt:solid windowtext .5pt;
	padding:0cm;
	mso-padding-alt:0cm 0cm 1.0pt 0cm;
	font-size:26.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;
	letter-spacing:.25pt;}
p.MsoTitleCxSpMiddle, li.MsoTitleCxSpMiddle, div.MsoTitleCxSpMiddle
	{mso-style-priority:10;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-link:"Title Char";
	mso-style-next:Normal;
	mso-style-type:export-only;
	margin:0cm;
	margin-bottom:.0001pt;
	mso-add-space:auto;
	mso-pagination:widow-orphan;
	border:none;
	mso-border-bottom-alt:solid windowtext .5pt;
	padding:0cm;
	mso-padding-alt:0cm 0cm 1.0pt 0cm;
	font-size:26.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;
	letter-spacing:.25pt;}
p.MsoTitleCxSpLast, li.MsoTitleCxSpLast, div.MsoTitleCxSpLast
	{mso-style-priority:10;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-link:"Title Char";
	mso-style-next:Normal;
	mso-style-type:export-only;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:10.0pt;
	margin-left:0cm;
	mso-add-space:auto;
	mso-pagination:widow-orphan;
	border:none;
	mso-border-bottom-alt:solid windowtext .5pt;
	padding:0cm;
	mso-padding-alt:0cm 0cm 1.0pt 0cm;
	font-size:26.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;
	letter-spacing:.25pt;}
p.MsoSubtitle, li.MsoSubtitle, div.MsoSubtitle
	{mso-style-priority:11;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-link:"Subtitle Char";
	mso-style-next:Normal;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:30.0pt;
	margin-left:0cm;
	line-height:115%;
	mso-pagination:widow-orphan;
	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;
	letter-spacing:.65pt;
	font-style:italic;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	mso-themecolor:hyperlink;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-noshow:yes;
	mso-style-priority:99;
	color:purple;
	mso-themecolor:followedhyperlink;
	text-decoration:underline;
	text-underline:single;}
em
	{mso-style-priority:20;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	letter-spacing:.5pt;
	border:none windowtext 1.0pt;
	mso-border-alt:none windowtext 0cm;
	padding:0cm;
	font-weight:bold;}
pre
	{mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-link:"HTML Preformatted Char";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Courier New";
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
	{mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-link:"Balloon Text Char";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:8.0pt;
	font-family:"Tahoma","sans-serif";
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
	{mso-style-priority:1;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:10.0pt;
	margin-left:36.0pt;
	mso-add-space:auto;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
	{mso-style-priority:34;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-type:export-only;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:36.0pt;
	margin-bottom:.0001pt;
	mso-add-space:auto;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
	{mso-style-priority:34;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-type:export-only;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:36.0pt;
	margin-bottom:.0001pt;
	mso-add-space:auto;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
	{mso-style-priority:34;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-type:export-only;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:10.0pt;
	margin-left:36.0pt;
	mso-add-space:auto;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
p.MsoQuote, li.MsoQuote, div.MsoQuote
	{mso-style-priority:29;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-link:"Quote Char";
	mso-style-next:Normal;
	margin-top:10.0pt;
	margin-right:18.0pt;
	margin-bottom:0cm;
	margin-left:18.0pt;
	margin-bottom:.0001pt;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;
	font-style:italic;}
p.MsoIntenseQuote, li.MsoIntenseQuote, div.MsoIntenseQuote
	{mso-style-priority:30;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-link:"Intense Quote Char";
	mso-style-next:Normal;
	margin-top:10.0pt;
	margin-right:57.6pt;
	margin-bottom:14.0pt;
	margin-left:50.4pt;
	text-align:justify;
	text-justify:inter-ideograph;
	line-height:115%;
	mso-pagination:widow-orphan;
	border:none;
	mso-border-bottom-alt:solid windowtext .5pt;
	padding:0cm;
	mso-padding-alt:0cm 0cm 1.0pt 0cm;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;
	font-weight:bold;
	font-style:italic;}
span.MsoSubtleEmphasis
	{mso-style-priority:19;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	font-style:italic;}
span.MsoIntenseEmphasis
	{mso-style-priority:21;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	font-weight:bold;}
span.MsoSubtleReference
	{mso-style-priority:31;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	font-variant:small-caps;}
span.MsoIntenseReference
	{mso-style-priority:32;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	font-variant:small-caps;
	letter-spacing:.25pt;
	text-decoration:underline;
	text-underline:single;}
span.MsoBookTitle
	{mso-style-priority:33;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	font-variant:small-caps;
	letter-spacing:.25pt;
	font-style:italic;}
p.MsoTocHeading, li.MsoTocHeading, div.MsoTocHeading
	{mso-style-noshow:yes;
	mso-style-priority:39;
	mso-style-qformat:yes;
	mso-style-parent:"Heading 1";
	mso-style-next:Normal;
	margin-top:24.0pt;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:0cm;
	margin-bottom:.0001pt;
	mso-add-space:auto;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:14.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;
	mso-bidi-language:EN-US;
	font-weight:bold;}
p.MsoTocHeadingCxSpFirst, li.MsoTocHeadingCxSpFirst, div.MsoTocHeadingCxSpFirst
	{mso-style-noshow:yes;
	mso-style-priority:39;
	mso-style-qformat:yes;
	mso-style-parent:"Heading 1";
	mso-style-next:Normal;
	mso-style-type:export-only;
	margin-top:24.0pt;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:0cm;
	margin-bottom:.0001pt;
	mso-add-space:auto;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:14.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;
	mso-bidi-language:EN-US;
	font-weight:bold;}
p.MsoTocHeadingCxSpMiddle, li.MsoTocHeadingCxSpMiddle, div.MsoTocHeadingCxSpMiddle
	{mso-style-noshow:yes;
	mso-style-priority:39;
	mso-style-qformat:yes;
	mso-style-parent:"Heading 1";
	mso-style-next:Normal;
	mso-style-type:export-only;
	margin:0cm;
	margin-bottom:.0001pt;
	mso-add-space:auto;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:14.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;
	mso-bidi-language:EN-US;
	font-weight:bold;}
p.MsoTocHeadingCxSpLast, li.MsoTocHeadingCxSpLast, div.MsoTocHeadingCxSpLast
	{mso-style-noshow:yes;
	mso-style-priority:39;
	mso-style-qformat:yes;
	mso-style-parent:"Heading 1";
	mso-style-next:Normal;
	mso-style-type:export-only;
	margin:0cm;
	margin-bottom:.0001pt;
	mso-add-space:auto;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:14.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;
	mso-bidi-language:EN-US;
	font-weight:bold;}
span.Heading1Char
	{mso-style-name:"Heading 1 Char";
	mso-style-priority:9;
	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:"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;
	font-weight:bold;}
span.Heading2Char
	{mso-style-name:"Heading 2 Char";
	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;
	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";
	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;
	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";
	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;
	font-weight:bold;
	font-style:italic;}
span.Heading5Char
	{mso-style-name:"Heading 5 Char";
	mso-style-noshow:yes;
	mso-style-priority:9;
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-link:"Heading 5";
	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:#7F7F7F;
	mso-themecolor:text1;
	mso-themetint:128;
	font-weight:bold;}
span.Heading6Char
	{mso-style-name:"Heading 6 Char";
	mso-style-noshow:yes;
	mso-style-priority:9;
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-link:"Heading 6";
	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:#7F7F7F;
	mso-themecolor:text1;
	mso-themetint:128;
	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:"Courier New";
	mso-ascii-font-family:"Courier New";
	mso-hansi-font-family:"Courier New";
	mso-bidi-font-family:"Courier New";}
span.Heading7Char
	{mso-style-name:"Heading 7 Char";
	mso-style-noshow:yes;
	mso-style-priority:9;
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-link:"Heading 7";
	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;
	font-style:italic;}
span.Heading8Char
	{mso-style-name:"Heading 8 Char";
	mso-style-noshow:yes;
	mso-style-priority:9;
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-link:"Heading 8";
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.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;}
span.Heading9Char
	{mso-style-name:"Heading 9 Char";
	mso-style-noshow:yes;
	mso-style-priority:9;
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-link:"Heading 9";
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.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;
	letter-spacing:.25pt;
	font-style:italic;}
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:11.0pt;
	mso-bidi-font-size:11.0pt;}
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:11.0pt;
	mso-bidi-font-size:11.0pt;}
span.TitleChar
	{mso-style-name:"Title Char";
	mso-style-priority:10;
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-link:Title;
	mso-ansi-font-size:26.0pt;
	mso-bidi-font-size:26.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;
	letter-spacing:.25pt;}
span.SubtitleChar
	{mso-style-name:"Subtitle Char";
	mso-style-priority:11;
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-link:Subtitle;
	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;
	letter-spacing:.65pt;
	font-style:italic;}
span.BalloonTextChar
	{mso-style-name:"Balloon Text Char";
	mso-style-noshow:yes;
	mso-style-priority:99;
	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.QuoteChar
	{mso-style-name:"Quote Char";
	mso-style-priority:29;
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-link:Quote;
	font-style:italic;}
span.IntenseQuoteChar
	{mso-style-name:"Intense Quote Char";
	mso-style-priority:30;
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-link:"Intense Quote";
	font-weight:bold;
	font-style:italic;}
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;
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
 /* Page Definitions */
 @page
	{mso-footnote-separator:url("ReadMe_files/header.htm") fs;
	mso-footnote-continuation-separator:url("ReadMe_files/header.htm") fcs;
	mso-endnote-separator:url("ReadMe_files/header.htm") es;
	mso-endnote-continuation-separator:url("ReadMe_files/header.htm") ecs;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	mso-header-margin:36.0pt;
	mso-footer-margin:36.0pt;
	mso-paper-source:0;}
div.WordSection1
	{page:WordSection1;}
 /* List Definitions */
 @list l0
	{mso-list-id:67770653;
	mso-list-type:hybrid;
	mso-list-template-ids:1613787634 67698711 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
	{mso-level-number-format:alpha-lower;
	mso-level-text:"%1\)";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:54.0pt;
	text-indent:-18.0pt;}
@list l0:level2
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:90.0pt;
	text-indent:-18.0pt;}
@list l0:level3
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	margin-left:126.0pt;
	text-indent:-9.0pt;}
@list l0:level4
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:162.0pt;
	text-indent:-18.0pt;}
@list l0:level5
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:198.0pt;
	text-indent:-18.0pt;}
@list l0:level6
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	margin-left:234.0pt;
	text-indent:-9.0pt;}
@list l0:level7
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:270.0pt;
	text-indent:-18.0pt;}
@list l0:level8
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:306.0pt;
	text-indent:-18.0pt;}
@list l0:level9
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	margin-left:342.0pt;
	text-indent:-9.0pt;}
@list l1
	{mso-list-id:285083589;
	mso-list-type:hybrid;
	mso-list-template-ids:1909197448 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l1:level1
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level2
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level3
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
@list l1:level4
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level5
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level6
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
@list l1:level7
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level8
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level9
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
@list l2
	{mso-list-id:831871817;
	mso-list-type:hybrid;
	mso-list-template-ids:-1512959814 67698711 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l2:level1
	{mso-level-number-format:alpha-lower;
	mso-level-text:"%1\)";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:72.0pt;
	text-indent:-18.0pt;}
@list l2:level2
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:108.0pt;
	text-indent:-18.0pt;}
@list l2:level3
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	margin-left:144.0pt;
	text-indent:-9.0pt;}
@list l2:level4
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:180.0pt;
	text-indent:-18.0pt;}
@list l2:level5
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:216.0pt;
	text-indent:-18.0pt;}
@list l2:level6
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	margin-left:252.0pt;
	text-indent:-9.0pt;}
@list l2:level7
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:288.0pt;
	text-indent:-18.0pt;}
@list l2:level8
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:324.0pt;
	text-indent:-18.0pt;}
@list l2:level9
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	margin-left:360.0pt;
	text-indent:-9.0pt;}
@list l3
	{mso-list-id:886646188;
	mso-list-type:hybrid;
	mso-list-template-ids:-28173348 67698711 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l3:level1
	{mso-level-number-format:alpha-lower;
	mso-level-text:"%1\)";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:72.0pt;
	text-indent:-18.0pt;}
@list l3:level2
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:108.0pt;
	text-indent:-18.0pt;}
@list l3:level3
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	margin-left:144.0pt;
	text-indent:-9.0pt;}
@list l3:level4
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:180.0pt;
	text-indent:-18.0pt;}
@list l3:level5
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:216.0pt;
	text-indent:-18.0pt;}
@list l3:level6
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	margin-left:252.0pt;
	text-indent:-9.0pt;}
@list l3:level7
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:288.0pt;
	text-indent:-18.0pt;}
@list l3:level8
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:324.0pt;
	text-indent:-18.0pt;}
@list l3:level9
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	margin-left:360.0pt;
	text-indent:-9.0pt;}
@list l4
	{mso-list-id:1089695427;
	mso-list-type:hybrid;
	mso-list-template-ids:271465448 67698711 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l4:level1
	{mso-level-number-format:alpha-lower;
	mso-level-text:"%1\)";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:72.0pt;
	text-indent:-18.0pt;}
@list l4:level2
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:108.0pt;
	text-indent:-18.0pt;}
@list l4:level3
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	margin-left:144.0pt;
	text-indent:-9.0pt;}
@list l4:level4
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:180.0pt;
	text-indent:-18.0pt;}
@list l4:level5
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:216.0pt;
	text-indent:-18.0pt;}
@list l4:level6
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	margin-left:252.0pt;
	text-indent:-9.0pt;}
@list l4:level7
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:288.0pt;
	text-indent:-18.0pt;}
@list l4:level8
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:324.0pt;
	text-indent:-18.0pt;}
@list l4:level9
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	margin-left:360.0pt;
	text-indent:-9.0pt;}
@list l5
	{mso-list-id:1583219348;
	mso-list-type:hybrid;
	mso-list-template-ids:146330504 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l5:level1
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l5:level2
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l5:level3
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
@list l5:level4
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l5:level5
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l5:level6
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
@list l5:level7
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l5:level8
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l5:level9
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
@list l6
	{mso-list-id:1631473940;
	mso-list-type:hybrid;
	mso-list-template-ids:1589965270 67698711 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l6:level1
	{mso-level-number-format:alpha-lower;
	mso-level-text:"%1\)";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:72.0pt;
	text-indent:-18.0pt;}
@list l6:level2
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:108.0pt;
	text-indent:-18.0pt;}
@list l6:level3
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	margin-left:144.0pt;
	text-indent:-9.0pt;}
@list l6:level4
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:180.0pt;
	text-indent:-18.0pt;}
@list l6:level5
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:216.0pt;
	text-indent:-18.0pt;}
@list l6:level6
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	margin-left:252.0pt;
	text-indent:-9.0pt;}
@list l6:level7
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:288.0pt;
	text-indent:-18.0pt;}
@list l6:level8
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:324.0pt;
	text-indent:-18.0pt;}
@list l6:level9
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	margin-left:360.0pt;
	text-indent:-9.0pt;}
@list l7
	{mso-list-id:1934782525;
	mso-list-type:hybrid;
	mso-list-template-ids:-1211332056 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l7:level1
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l7:level2
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l7:level3
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
@list l7:level4
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l7:level5
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l7:level6
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
@list l7:level7
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l7:level8
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l7:level9
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
-->
</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:0cm 5.4pt 0cm 5.4pt;
	mso-para-margin:0cm;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]--><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="2049"/>
</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:36.0pt'>

<div class=WordSection1>

<h1>C++ app hosts CLR 4 and invokes .NET assembly (<span class=SpellE>CppHostCLR</span>)<span
style='mso-fareast-font-family:����'><o:p></o:p></span></h1>

<h2>Introduction</h2>

<p class=MsoNormal><span style='mso-fareast-font-family:����'>The Common Language
Runtime (CLR) allows a level of integration between itself and a host. This C++
code sample demonstrates using the Hosting Interfaces of .NET Framework 4.0 to
host a specific version of CLR in the process, load a .NET assembly, and invoke
the types in the <span style='mso-bidi-font-weight:bold'>assembly.<o:p></o:p></span></span></p>

<p class=MsoNormal><span style='mso-fareast-font-family:����'>The code sample
also demonstrates the new In-Process Side-by-Side feature in .NET Framework 4.
The .NET Framework 4 runtime, and all future runtimes, are able to run
in-process with one another. .NET Framework 4 runtime and beyond are also able
to run in-process with a<span style='mso-bidi-font-weight:bold'>ny single older
runtime. In the</span> words, you will be able to load 4<span style='mso-bidi-font-weight:
bold'>.0 </span>and 2.0 in the same process, but you will not be able to load
1.1 and 2.0 in the same process. The code sample hosts .NET runtime 4.0 and 2.0
side by side, and loads a .NET2.0 assembly into the two runtimes.<span
style='mso-bidi-font-weight:bold'><o:p></o:p></span></span></p>

<h2>Building the Sample<span style='mso-fareast-font-family:����'><o:p></o:p></span></h2>

<p class=MsoNormal><span style='mso-fareast-font-family:����'>The output path of
these 3 projects should be same. In this sample, the output path is <b
style='mso-bidi-font-weight:normal'>$(<span class=SpellE>SolutionDir</span>)\$(Configuration)\</b>.<o:p></o:p></span></p>

<h2>Running the Sample</h2>

<p class=MsoListParagraphCxSpFirst style='text-indent:-18.0pt;mso-list:l7 level1 lfo4'><![if !supportLists]><span
style='mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin'><span
style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]>Press <b style='mso-bidi-font-weight:normal'>F5</b>
to debug this project<span style='mso-fareast-font-family:����'>, and you will
see</span></p>

<p class=MsoListParagraphCxSpMiddle><span style='mso-no-proof:yes'><!--[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="Picture_x0020_1" o:spid="_x0000_i1026" type="#_x0000_t75"
 style='width:6in;height:125.25pt;visibility:visible;mso-wrap-style:square'>
 <v:imagedata src="ReadMe_files/image001.png" o:title=""/>
</v:shape><![endif]--><![if !vml]><img width=576 height=167
src="ReadMe_files/image003.jpg" v:shapes="Picture_x0020_1"><![endif]></span><span
style='mso-fareast-font-family:����'><o:p></o:p></span></p>

<p class=MsoListParagraphCxSpMiddle><span style='mso-fareast-font-family:����'>The
first step demonstrates how to host .NET4.0 and .NET2.0 side by side, and load
a .NET2.0 assembly into the two runtimes. It uses .NET Framework 4.0 Hosting interfaces
to host a .NET runtime, and use the <span class=SpellE><b style='mso-bidi-font-weight:
normal'>ICorRuntimeHost</b></span> interface that was provided in .NET v1.x to
load a .NET assembly and invoke its type.<o:p></o:p></span></p>

<p class=MsoListParagraphCxSpMiddle><span style='mso-fareast-font-family:����'><o:p>&nbsp;</o:p></span></p>

<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l7 level1 lfo4'><![if !supportLists]><span
style='mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin'><span
style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='mso-fareast-font-family:����'>Press
Enter to continue<o:p></o:p></span></p>

<p class=MsoListParagraphCxSpMiddle><span style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape
 id="Picture_x0020_11" o:spid="_x0000_i1025" type="#_x0000_t75" style='width:6in;
 height:63pt;visibility:visible;mso-wrap-style:square'>
 <v:imagedata src="ReadMe_files/image005.png" o:title=""/>
</v:shape><![endif]--><![if !vml]><img width=576 height=84
src="ReadMe_files/image004.jpg" v:shapes="Picture_x0020_11"><![endif]></span><span
style='mso-fareast-font-family:����'><o:p></o:p></span></p>

<p class=MsoListParagraphCxSpLast><span style='mso-fareast-font-family:����'>This
step demonstrates using .NET Framework 4.0 Hosting Interfaces to host a .NET
runtime, and use the <span class=SpellE><b style='mso-bidi-font-weight:normal'>ICLRRuntimeHost</b></span>
interface that was provided in .NET v2.0 to load a .NET4.0 assembly and invoke
its type. Because <span class=SpellE><b style='mso-bidi-font-weight:normal'>ICLRRuntimeHost</b></span>
is not compatible with .NET runtime v1.x, the requested runtime must not be
v1.x.<o:p></o:p></span></p>

<h2>Using the Code<span style='mso-fareast-font-family:����'><o:p></o:p></span></h2>

<p class=MsoListParagraphCxSpFirst style='text-indent:-18.0pt;mso-list:l5 level1 lfo6'><![if !supportLists]><b
style='mso-bidi-font-weight:normal'><span style='mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Calibri;mso-bidi-theme-font:
minor-latin'><span style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></b><![endif]><b style='mso-bidi-font-weight:normal'><span
style='mso-fareast-font-family:����'>Loading the Common Language Runtime into a
Process.<o:p></o:p></span></b></p>

<p class=MsoListParagraphCxSpMiddle><span style='mso-fareast-font-family:����'>A
host can load the CLR into a process by using one of the following procedures:<o:p></o:p></span></p>

<p class=MsoListParagraphCxSpMiddle><span style='mso-fareast-font-family:����'><o:p>&nbsp;</o:p></span></p>

<p class=MsoListParagraphCxSpLast style='margin-left:72.0pt;mso-add-space:auto;
text-indent:-18.0pt;mso-list:l5 level2 lfo6'><![if !supportLists]><span
style='mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin'><span
style='mso-list:Ignore'>a.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='mso-fareast-font-family:����'>Call
the <span class=SpellE><b style='mso-bidi-font-weight:normal'>CLRCreateInstance</b></span>
function to get either an <span class=SpellE><b style='mso-bidi-font-weight:
normal'>ICLRMetaHost</b></span> or an <span class=SpellE><b style='mso-bidi-font-weight:
normal'>ICLRMetaHostPolicy</b></span> interface.<o:p></o:p></span></p>

<div>

<div style='border:solid #D0D2D2 1.5pt;padding:8.0pt 8.0pt 8.0pt 8.0pt'><pre>- C++ code snippet -</pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:black'>HRESULT <span class=SpellE>hr</span>;<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span class=SpellE><span style='color:black'>ICLRMetaHost</span></span><span
style='color:black'> *<span class=SpellE>pMetaHost</span> = NULL;<o:p></o:p></span></pre><pre
style='background:white'><span class=SpellE><span class=GramE><span
style='color:black'>wprintf</span></span></span><span class=GramE><span
style='color:black'>(</span></span><span class=SpellE><span style='color:black'>L</span><span
style='color:#A31515'>&quot;Load</span></span><span style='color:#A31515'> and start the .NET runtime %s \n&quot;</span><span
style='color:black'>, <span class=SpellE>pszVersion</span>);<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span class=SpellE><span class=GramE><span
style='color:black'>hr</span></span></span><span style='color:black'> = <span
class=SpellE>CLRCreateInstance</span>(<span class=SpellE>CLSID_CLRMetaHost</span>, IID_PPV_ARGS(&amp;<span
class=SpellE>pMetaHost</span>));<o:p></o:p></span></pre><pre style='background:
white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (FAILED(<span class=SpellE>hr</span>))<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>wprintf</span></span><span class=GramE>(</span><span
class=SpellE>L<span style='color:#A31515'>&quot;CLRCreateInstance</span></span></span><span
style='color:#A31515'> failed w/<span class=SpellE>hr</span> 0x%08lx\n&quot;</span><span
style='color:black'>, <span class=SpellE>hr</span>);<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
class=SpellE><span class=GramE><span style='color:blue'>goto</span></span></span><span
style='color:black'> Cleanup;<o:p></o:p></span></pre><pre style='background:
white'><span style='color:black'>}<o:p></o:p></span></pre><pre><o:p>&nbsp;</o:p></pre><pre>- <span
class=GramE>end</span> -</pre></div>

</div>

<p class=MsoListParagraphCxSpFirst style='margin-left:72.0pt;mso-add-space:
auto'><span style='mso-fareast-font-family:����'><o:p>&nbsp;</o:p></span></p>

<p class=MsoListParagraphCxSpMiddle style='margin-left:72.0pt;mso-add-space:
auto'><span style='mso-fareast-font-family:����'><o:p>&nbsp;</o:p></span></p>

<p class=MsoListParagraphCxSpLast style='margin-left:72.0pt;mso-add-space:auto;
text-indent:-18.0pt;mso-list:l5 level2 lfo6'><![if !supportLists]><span
style='mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin'><span
style='mso-list:Ignore'>b.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='mso-fareast-font-family:����'>Call
the <span class=SpellE><b style='mso-bidi-font-weight:normal'>ICLRMetaHost</b></span><b
style='mso-bidi-font-weight:normal'>::<span class=SpellE>EnumerateInstalledRuntimes</span></b>,
<span class=SpellE><b style='mso-bidi-font-weight:normal'>ICLRMetaHost</b></span><b
style='mso-bidi-font-weight:normal'>::<span class=SpellE>GetRuntime</span></b>
or <span class=SpellE><b style='mso-bidi-font-weight:normal'>ICLRMetaHostPolicy</b></span><b
style='mso-bidi-font-weight:normal'>::<span class=SpellE>GetRequestedRuntime</span></b>
method to get a valid <span class=SpellE><b style='mso-bidi-font-weight:normal'>ICLRRuntimeInfo</b></span>
pointer.<o:p></o:p></span></p>

<div>

<div style='border:solid #D0D2D2 1.5pt;padding:8.0pt 8.0pt 8.0pt 8.0pt'><pre>- C++ code snippet -</pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span class=SpellE><span style='color:black'>ICLRRuntimeInfo</span></span><span
style='color:black'> *<span class=SpellE>pRuntimeInfo</span> = NULL;<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// Get the <span
class=SpellE>ICLRRuntimeInfo</span> corresponding to a particular CLR version. It </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// supersedes <span class=SpellE>CorBindToRuntimeEx</span> with STARTUP_LOADER_SAFEMODE.</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=SpellE><span class=GramE><span style='color:black'>hr</span></span></span><span
style='color:black'> = <span class=SpellE>pMetaHost</span>-&gt;<span
class=SpellE>GetRuntime</span>(<span class=SpellE>pszVersion</span>, IID_PPV_ARGS(&amp;<span
class=SpellE>pRuntimeInfo</span>));<o:p></o:p></span></pre><pre
style='background:white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (FAILED(<span class=SpellE>hr</span>))<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>wprintf</span></span><span class=GramE>(</span><span
class=SpellE>L<span style='color:#A31515'>&quot;ICLRMetaHost</span></span></span><span
style='color:#A31515'>::<span class=SpellE>GetRuntime</span> failed w/<span
class=SpellE>hr</span> 0x%08lx\n&quot;</span><span style='color:black'>, <span
class=SpellE>hr</span>);<o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
class=SpellE><span class=GramE><span style='color:blue'>goto</span></span></span><span
style='color:black'> Cleanup;<o:p></o:p></span></pre><pre style='background:
white'><span style='color:black'>}<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// Check if the specified runtime can be loaded into the process. This </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// method will take into account other runtimes that may already be </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// loaded into the process and set <span class=SpellE>pbLoadable</span> to TRUE if this runtime can </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// be loaded in an in-process side-by-side fashion. </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'>BOOL <span class=SpellE>fLoadable</span>;<o:p></o:p></span></pre><pre
style='background:white'><span class=SpellE><span class=GramE><span
style='color:black'>hr</span></span></span><span style='color:black'> = <span
class=SpellE>pRuntimeInfo</span>-&gt;<span class=SpellE>IsLoadable</span>(&amp;<span
class=SpellE>fLoadable</span>);<o:p></o:p></span></pre><pre style='background:
white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (FAILED(<span class=SpellE>hr</span>))<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>wprintf</span></span><span class=GramE>(</span><span
class=SpellE>L<span style='color:#A31515'>&quot;ICLRRuntimeInfo</span></span></span><span
style='color:#A31515'>::<span class=SpellE>IsLoadable</span> failed w/<span
class=SpellE>hr</span> 0x%08lx\n&quot;</span><span style='color:black'>, <span
class=SpellE>hr</span>);<o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
class=SpellE><span class=GramE><span style='color:blue'>goto</span></span></span><span
style='color:black'> Cleanup;<o:p></o:p></span></pre><pre style='background:
white'><span style='color:black'>}<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (!<span class=SpellE>fLoadable</span>)<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>wprintf</span></span><span class=GramE>(</span>L</span><span
style='color:#A31515'>&quot;.NET runtime %s cannot be loaded\n&quot;</span><span
style='color:black'>, <span class=SpellE>pszVersion</span>);<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
class=SpellE><span class=GramE><span style='color:blue'>goto</span></span></span><span
style='color:black'> Cleanup;<o:p></o:p></span></pre><pre style='background:
white'><span style='color:black'>}<o:p></o:p></span></pre><pre><o:p>&nbsp;</o:p></pre><pre>- <span
class=GramE>end</span> -</pre></div>

</div>

<p class=MsoListParagraphCxSpFirst style='margin-left:72.0pt;mso-add-space:
auto'><span style='mso-fareast-font-family:����'><o:p>&nbsp;</o:p></span></p>

<p class=MsoListParagraphCxSpMiddle style='margin-left:72.0pt;mso-add-space:
auto'><span style='mso-fareast-font-family:����'><o:p>&nbsp;</o:p></span></p>

<p class=MsoListParagraphCxSpMiddle style='margin-left:72.0pt;mso-add-space:
auto;text-indent:-18.0pt;mso-list:l5 level2 lfo6'><![if !supportLists]><span
style='mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin'><span
style='mso-list:Ignore'>c.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='mso-fareast-font-family:����'>Get <span
class=SpellE><b style='mso-bidi-font-weight:normal'>ICorRuntimeHost</b></span>
for .NET v1.x, .NET2.0 and .NET 4.0. This interface is provided in .NET v1.x and
is compatible with all .NET Frameworks.<o:p></o:p></span></p>

<p class=MsoListParagraphCxSpMiddle style='margin-left:72.0pt;mso-add-space:
auto'><span style='mso-fareast-font-family:����'>Call the <span class=SpellE><b
style='mso-bidi-font-weight:normal'>ICLRRuntimeInfo</b></span><b
style='mso-bidi-font-weight:normal'>::<span class=SpellE>GetInterface</span></b>
method. Specify <span class=SpellE><b style='mso-bidi-font-weight:normal'>CLSID_CorRuntimeHost</b></span><b
style='mso-bidi-font-weight:normal'> </b>for the <span class=SpellE>rclsid</span>
parameter and <span class=SpellE><b style='mso-bidi-font-weight:normal'>IID_ICorRuntimeHost</b></span>
for the <span class=SpellE>riid</span> parameter.<o:p></o:p></span></p>

<p class=MsoListParagraphCxSpLast><b style='mso-bidi-font-weight:normal'><span
style='mso-fareast-font-family:����'><o:p>&nbsp;</o:p></span></b></p>

<div>

<div style='border:solid #D0D2D2 1.5pt;padding:8.0pt 8.0pt 8.0pt 8.0pt'><pre>- C++ code snippet -</pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// Load the CLR into the current process and return a runtime interface </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// pointer. <span class=SpellE>ICorRuntimeHost</span> and <span
class=SpellE>ICLRRuntimeHost</span> are the two CLR hosting<span style='mso-spacerun:yes'>&nbsp; </span></span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// interfaces supported by CLR 4.0. Here we demo the <span
class=SpellE>ICorRuntimeHost</span> </span><span style='color:black'><o:p></o:p></span></pre><pre
style='background:white'><span style='color:green'>// interface that was provided in .NET v1.x, and is compatible with all </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// .NET Frameworks. </span><span style='color:black'><o:p></o:p></span></pre><pre
style='background:white'><span class=SpellE><span class=GramE><span
style='color:black'>hr</span></span></span><span style='color:black'> = <span
class=SpellE>pRuntimeInfo</span>-&gt;<span class=SpellE>GetInterface</span>(<span
class=SpellE>CLSID_CorRuntimeHost</span>, <o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span>IID_PPV_<span
class=GramE>ARGS(</span>&amp;<span class=SpellE>pCorRuntimeHost</span>));<o:p></o:p></span></pre><pre
style='background:white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (FAILED(<span class=SpellE>hr</span>))<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>wprintf</span></span><span class=GramE>(</span><span
class=SpellE>L<span style='color:#A31515'>&quot;ICLRRuntimeInfo</span></span></span><span
style='color:#A31515'>::<span class=SpellE>GetInterface</span> failed w/<span
class=SpellE>hr</span> 0x%08lx\n&quot;</span><span style='color:black'>, <span
class=SpellE>hr</span>);<o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
class=SpellE><span class=GramE><span style='color:blue'>goto</span></span></span><span
style='color:black'> Cleanup;<o:p></o:p></span></pre><pre style='background:
white'><span style='color:black'>}<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// Start the CLR.</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=SpellE><span class=GramE><span style='color:black'>hr</span></span></span><span
style='color:black'> = <span class=SpellE>pCorRuntimeHost</span>-&gt;Start();<o:p></o:p></span></pre><pre
style='background:white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (FAILED(<span class=SpellE>hr</span>))<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>wprintf</span></span><span class=GramE>(</span>L</span><span
style='color:#A31515'>&quot;CLR failed to start w/<span class=SpellE>hr</span> 0x%08lx\n&quot;</span><span
style='color:black'>, <span class=SpellE>hr</span>);<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
class=SpellE><span class=GramE><span style='color:blue'>goto</span></span></span><span
style='color:black'> Cleanup;<o:p></o:p></span></pre><pre style='background:
white'><span style='color:black'>}<o:p></o:p></span></pre><pre><o:p>&nbsp;</o:p></pre><pre>- <span
class=GramE>end</span> -</pre></div>

</div>

<p class=MsoListParagraphCxSpFirst><b style='mso-bidi-font-weight:normal'><span
style='mso-fareast-font-family:����'><o:p>&nbsp;</o:p></span></b></p>

<p class=MsoListParagraphCxSpMiddle style='margin-left:72.0pt;mso-add-space:
auto;text-indent:-18.0pt;mso-list:l5 level2 lfo6'><![if !supportLists]><span
style='mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin'><span
style='mso-list:Ignore'>d.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='mso-fareast-font-family:����'>Get <span
class=SpellE><b style='mso-bidi-font-weight:normal'>ICLRRuntimeHost</b></span><b
style='mso-bidi-font-weight:normal'> </b>for .NET2.0 and .NET 4.0. This interface
is provided in .NET2.0 and is not compatible with all .NET v1.x.<o:p></o:p></span></p>

<p class=MsoListParagraphCxSpLast style='margin-left:72.0pt;mso-add-space:auto'><span
style='mso-fareast-font-family:����'>Call the <span class=SpellE><b
style='mso-bidi-font-weight:normal'>ICLRRuntimeInfo</b></span><b
style='mso-bidi-font-weight:normal'>::<span class=SpellE>GetInterface</span></b>
method. Specify <span class=SpellE><b style='mso-bidi-font-weight:normal'>CLSID_CLRRuntimeHost</b></span><b
style='mso-bidi-font-weight:normal'> </b>for the <span class=SpellE>rclsid</span>
parameter and <span class=SpellE><b style='mso-bidi-font-weight:normal'>IID_ICLRRuntimeHost</b></span>
for the <span class=SpellE>riid</span> parameter.<o:p></o:p></span></p>

<div>

<div style='border:solid #D0D2D2 1.5pt;padding:8.0pt 8.0pt 8.0pt 8.0pt'><pre>- C++ code snippet -</pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// Load the CLR into the current process and return a runtime interface </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// pointer. <span class=SpellE>ICorRuntimeHost</span> and <span
class=SpellE>ICLRRuntimeHost</span> are the two CLR hosting<span style='mso-spacerun:yes'>&nbsp; </span></span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// interfaces supported by CLR 4.0. Here we demo the <span
class=SpellE>ICLRRuntimeHost</span> </span><span style='color:black'><o:p></o:p></span></pre><pre
style='background:white'><span style='color:green'>// interface that was provided in .NET v2.0 to support CLR 2.0 new </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// features. <span class=SpellE>ICLRRuntimeHost</span> does not support loading the .NET v1.x </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// runtimes.</span><span style='color:black'><o:p></o:p></span></pre><pre
style='background:white'><span class=SpellE><span class=GramE><span
style='color:black'>hr</span></span></span><span style='color:black'> = <span
class=SpellE>pRuntimeInfo</span>-&gt;<span class=SpellE>GetInterface</span>(<span
class=SpellE>CLSID_CLRRuntimeHost</span>, <o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span>IID_PPV_<span
class=GramE>ARGS(</span>&amp;<span class=SpellE>pClrRuntimeHost</span>));<o:p></o:p></span></pre><pre
style='background:white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (FAILED(<span class=SpellE>hr</span>))<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>wprintf</span></span><span class=GramE>(</span><span
class=SpellE>L<span style='color:#A31515'>&quot;ICLRRuntimeInfo</span></span></span><span
style='color:#A31515'>::<span class=SpellE>GetInterface</span> failed w/<span
class=SpellE>hr</span> 0x%08lx\n&quot;</span><span style='color:black'>, <span
class=SpellE>hr</span>);<o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
class=SpellE><span class=GramE><span style='color:blue'>goto</span></span></span><span
style='color:black'> Cleanup;<o:p></o:p></span></pre><pre style='background:
white'><span style='color:black'>}<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// Start the CLR.</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=SpellE><span class=GramE><span style='color:black'>hr</span></span></span><span
style='color:black'> = <span class=SpellE>pClrRuntimeHost</span>-&gt;Start();<o:p></o:p></span></pre><pre
style='background:white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (FAILED(<span class=SpellE>hr</span>))<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>wprintf</span></span><span class=GramE>(</span>L</span><span
style='color:#A31515'>&quot;CLR failed to start w/<span class=SpellE>hr</span> 0x%08lx\n&quot;</span><span
style='color:black'>, <span class=SpellE>hr</span>);<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
class=SpellE><span class=GramE><span style='color:blue'>goto</span></span></span><span
style='color:black'> Cleanup;<o:p></o:p></span></pre><pre style='background:
white'><span style='color:black'>}<o:p></o:p></span></pre><pre><o:p>&nbsp;</o:p></pre><pre>- <span
class=GramE>end</span> -</pre></div>

</div>

<p class=MsoListParagraphCxSpFirst style='margin-left:72.0pt;mso-add-space:
auto'><span style='mso-fareast-font-family:����'><o:p>&nbsp;</o:p></span></p>

<p class=MsoListParagraphCxSpMiddle><span style='mso-fareast-font-family:����'><o:p>&nbsp;</o:p></span></p>

<p class=MsoListParagraphCxSpMiddle><b style='mso-bidi-font-weight:normal'><span
style='mso-fareast-font-family:����'><o:p>&nbsp;</o:p></span></b></p>

<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l5 level1 lfo6'><![if !supportLists]><b
style='mso-bidi-font-weight:normal'><span style='mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Calibri;mso-bidi-theme-font:
minor-latin'><span style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></b><![endif]><b style='mso-bidi-font-weight:normal'><span
style='mso-fareast-font-family:����'>Load a .NET assembly and call the static
method.</span><o:p></o:p></b></p>

<p class=MsoListParagraphCxSpMiddle style='margin-left:72.0pt;mso-add-space:
auto;text-indent:-18.0pt;mso-list:l5 level2 lfo6'><![if !supportLists]><span
style='mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin'><span
style='mso-list:Ignore'>a.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='mso-fareast-font-family:����'>If we
get <span class=SpellE><b style='mso-bidi-font-weight:normal'>ICorRuntimeHost</b></span>
interface, we can use following code.</span></p>

<p class=MsoListParagraphCxSpLast><span style='mso-fareast-font-family:����'><o:p>&nbsp;</o:p></span></p>

<div>

<div style='border:solid #D0D2D2 1.5pt;padding:8.0pt 8.0pt 8.0pt 8.0pt'><pre>- C++ code snippet -</pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span class=SpellE><span style='color:black'>IUnknownPtr</span></span><span
style='color:black'> <span class=SpellE>spAppDomainThunk</span> = NULL;<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>_<span class=SpellE>AppDomainPtr</span> <span
class=SpellE>spDefaultAppDomain</span> = NULL;<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// <span class=GramE>The</span> .NET assembly to load.</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=SpellE><span class=GramE><span style='color:black'>bstr_t</span></span></span><span
style='color:black'> <span class=SpellE>bstrAssemblyName</span>(<span
class=SpellE>pszAssemblyName</span>);<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>_<span class=SpellE>AssemblyPtr</span> <span
class=SpellE>spAssembly</span> = NULL;<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// <span class=GramE>The</span> .NET class to instantiate.</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=SpellE><span class=GramE><span style='color:black'>bstr_t</span></span></span><span
style='color:black'> <span class=SpellE>bstrClassName</span>(<span
class=SpellE>pszClassName</span>);<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>_<span class=SpellE>TypePtr</span> <span
class=SpellE>spType</span> = NULL;<o:p></o:p></span></pre><pre
style='background:white'><span class=SpellE><span class=GramE><span
style='color:black'>variant_t</span></span></span><span style='color:black'> <span
class=SpellE>vtObject</span>;<o:p></o:p></span></pre><pre style='background:
white'><span class=SpellE><span class=GramE><span style='color:black'>variant_t</span></span></span><span
style='color:black'> <span class=SpellE>vtEmpty</span>;<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// <span class=GramE>The</span> static method in the .NET class to invoke.</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=SpellE><span class=GramE><span style='color:black'>bstr_t</span></span></span><span
style='color:black'> <span class=SpellE>bstrStaticMethodName</span>(<span
class=SpellE>L<span style='color:#A31515'>&quot;GetStringLength</span></span></span><span
style='color:#A31515'>&quot;</span><span style='color:black'>);<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>SAFEARRAY *<span
class=SpellE>psaStaticMethodArgs</span> = NULL;<o:p></o:p></span></pre><pre
style='background:white'><span class=SpellE><span class=GramE><span
style='color:black'>variant_t</span></span></span><span style='color:black'> <span
class=SpellE>vtStringArg</span>(<span class=SpellE>L<span style='color:#A31515'>&quot;HelloWorld</span></span></span><span
style='color:#A31515'>&quot;</span><span style='color:black'>);<o:p></o:p></span></pre><pre
style='background:white'><span class=SpellE><span class=GramE><span
style='color:black'>variant_t</span></span></span><span style='color:black'> <span
class=SpellE>vtLengthRet</span>;<o:p></o:p></span></pre><pre style='background:
white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// <span class=GramE>The</span> instance method in the .NET class to invoke.</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=SpellE><span class=GramE><span style='color:black'>bstr_t</span></span></span><span
style='color:black'> <span class=SpellE>bstrMethodName</span>(<span
class=SpellE>L<span style='color:#A31515'>&quot;ToString</span></span></span><span
style='color:#A31515'>&quot;</span><span style='color:black'>);<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>SAFEARRAY *<span
class=SpellE>psaMethodArgs</span> = NULL;<o:p></o:p></span></pre><pre
style='background:white'><span class=SpellE><span class=GramE><span
style='color:black'>variant_t</span></span></span><span style='color:black'> <span
class=SpellE>vtStringRet</span>;<o:p></o:p></span></pre><pre style='background:
white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// Get a pointer to the default <span
class=SpellE>AppDomain</span> in the CLR.</span><span style='color:black'><o:p></o:p></span></pre><pre
style='background:white'><span class=SpellE><span class=GramE><span
style='color:black'>hr</span></span></span><span style='color:black'> = <span
class=SpellE>pCorRuntimeHost</span>-&gt;<span class=SpellE>GetDefaultDomain</span>(&amp;<span
class=SpellE>spAppDomainThunk</span>);<o:p></o:p></span></pre><pre
style='background:white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (FAILED(<span class=SpellE>hr</span>))<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>wprintf</span></span><span class=GramE>(</span><span
class=SpellE>L<span style='color:#A31515'>&quot;ICorRuntimeHost</span></span></span><span
style='color:#A31515'>::<span class=SpellE>GetDefaultDomain</span> failed w/<span
class=SpellE>hr</span> 0x%08lx\n&quot;</span><span style='color:black'>, <span
class=SpellE>hr</span>);<o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
class=SpellE><span class=GramE><span style='color:blue'>goto</span></span></span><span
style='color:black'> Cleanup;<o:p></o:p></span></pre><pre style='background:
white'><span style='color:black'>}<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span class=SpellE><span class=GramE><span
style='color:black'>hr</span></span></span><span style='color:black'> = spAppDomainThunk-&gt;QueryInterface(IID_PPV_ARGS(&amp;spDefaultAppDomain));<o:p></o:p></span></pre><pre
style='background:white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (FAILED(<span class=SpellE>hr</span>))<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp; </span><span style='mso-spacerun:yes'>&nbsp;&nbsp;</span><span
class=SpellE><span class=GramE>wprintf</span></span><span class=GramE>(</span><span
class=SpellE>L<span style='color:#A31515'>&quot;Failed</span></span></span><span
style='color:#A31515'> to get default <span class=SpellE>AppDomain</span> w/<span
class=SpellE>hr</span> 0x%08lx\n&quot;</span><span style='color:black'>, <span
class=SpellE>hr</span>);<o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
class=SpellE><span class=GramE><span style='color:blue'>goto</span></span></span><span
style='color:black'> Cleanup;<o:p></o:p></span></pre><pre style='background:
white'><span style='color:black'>}<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// Load the .NET assembly.</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=SpellE><span class=GramE><span style='color:black'>wprintf</span></span></span><span
class=GramE><span style='color:black'>(</span></span><span class=SpellE><span
style='color:black'>L</span><span style='color:#A31515'>&quot;Load</span></span><span
style='color:#A31515'> the assembly %s\n&quot;</span><span style='color:black'>, <span
class=SpellE>pszAssemblyName</span>);<o:p></o:p></span></pre><pre
style='background:white'><span class=SpellE><span class=GramE><span
style='color:black'>hr</span></span></span><span style='color:black'> = <span
class=SpellE>spDefaultAppDomain</span>-&gt;Load_2(<span class=SpellE>bstrAssemblyName</span>, &amp;<span
class=SpellE>spAssembly</span>);<o:p></o:p></span></pre><pre style='background:
white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (FAILED(<span class=SpellE>hr</span>))<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>wprintf</span></span><span class=GramE>(</span><span
class=SpellE>L<span style='color:#A31515'>&quot;Failed</span></span></span><span
style='color:#A31515'> to load the assembly w/<span class=SpellE>hr</span> 0x%08lx\n&quot;</span><span
style='color:black'>, <span class=SpellE>hr</span>);<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
class=SpellE><span class=GramE><span style='color:blue'>goto</span></span></span><span
style='color:black'> Cleanup;<o:p></o:p></span></pre><pre style='background:
white'><span style='color:black'>}<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// Get the Type of <span
class=SpellE>CSSimpleObject</span>.</span><span style='color:black'><o:p></o:p></span></pre><pre
style='background:white'><span class=SpellE><span class=GramE><span
style='color:black'>hr</span></span></span><span style='color:black'> = <span
class=SpellE>spAssembly</span>-&gt;GetType_2(<span class=SpellE>bstrClassName</span>, &amp;<span
class=SpellE>spType</span>);<o:p></o:p></span></pre><pre style='background:
white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (FAILED(<span class=SpellE>hr</span>))<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>wprintf</span></span><span class=GramE>(</span><span
class=SpellE>L<span style='color:#A31515'>&quot;Failed</span></span></span><span
style='color:#A31515'> to get the Type interface w/<span class=SpellE>hr</span> 0x%08lx\n&quot;</span><span
style='color:black'>, <span class=SpellE>hr</span>);<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
class=SpellE><span class=GramE><span style='color:blue'>goto</span></span></span><span
style='color:black'> Cleanup;<o:p></o:p></span></pre><pre style='background:
white'><span style='color:black'>}<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// Call the static method of the class: </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>//<span style='mso-spacerun:yes'>&nbsp;&nbsp; </span>public static <span
class=SpellE>int</span> <span class=SpellE><span class=GramE>GetStringLength</span></span><span
class=GramE>(</span>string <span class=SpellE>str</span>);</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><o:p>&nbsp;</o:p></span></pre><pre style='background:white'><span
style='color:green'>// <span class=GramE>Create</span> a safe array to contain the arguments of the method. The safe </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// array must be created with <span class=SpellE><span
class=GramE>vt</span></span> = VT_VARIANT because .NET reflection </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// expects an array of Object - VT_VARIANT. There is only one argument, </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// so <span class=SpellE>cElements</span> = 1.</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=SpellE><span class=GramE><span style='color:black'>psaStaticMethodArgs</span></span></span><span
style='color:black'> = <span class=SpellE>SafeArrayCreateVector</span>(VT_VARIANT, 0, 1);<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>LONG index = 0;<o:p></o:p></span></pre><pre
style='background:white'><span class=SpellE><span class=GramE><span
style='color:black'>hr</span></span></span><span style='color:black'> = <span
class=SpellE>SafeArrayPutElement</span>(<span class=SpellE>psaStaticMethodArgs</span>, &amp;index, &amp;<span
class=SpellE>vtStringArg</span>);<o:p></o:p></span></pre><pre style='background:
white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (FAILED(<span class=SpellE>hr</span>))<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>wprintf</span></span><span class=GramE>(</span><span
class=SpellE>L<span style='color:#A31515'>&quot;SafeArrayPutElement</span></span></span><span
style='color:#A31515'> failed w/<span class=SpellE>hr</span> 0x%08lx\n&quot;</span><span
style='color:black'>, <span class=SpellE>hr</span>);<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
class=SpellE><span class=GramE><span style='color:blue'>goto</span></span></span><span
style='color:black'> Cleanup;<o:p></o:p></span></pre><pre style='background:
white'><span style='color:black'>}<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// <span class=GramE>Invoke</span> the &quot;<span
class=SpellE>GetStringLength</span>&quot; method from the Type interface.</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=SpellE><span class=GramE><span style='color:black'>hr</span></span></span><span
style='color:black'> = <span class=SpellE>spType</span>-&gt;InvokeMember_3(<span
class=SpellE>bstrStaticMethodName</span>, </span><span class=SpellE><span
style='color:blue'>static_cast</span></span><span style='color:black'>&lt;<span
class=SpellE>BindingFlags</span>&gt;(<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE>BindingFlags_InvokeMethod</span> | <span class=SpellE>BindingFlags_Static</span> | <span
class=SpellE>BindingFlags_Public</span>), <o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span>NULL, <span
class=SpellE>vtEmpty</span>, <span class=SpellE>psaStaticMethodArgs</span>, &amp;<span
class=SpellE>vtLengthRet</span>);<o:p></o:p></span></pre><pre style='background:
white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (FAILED(<span class=SpellE>hr</span>))<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>wprintf</span></span><span class=GramE>(</span><span
class=SpellE>L<span style='color:#A31515'>&quot;Failed</span></span></span><span
style='color:#A31515'> to invoke <span class=SpellE>GetStringLength</span> w/<span
class=SpellE>hr</span> 0x%08lx\n&quot;</span><span style='color:black'>, <span
class=SpellE>hr</span>);<o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
class=SpellE><span class=GramE><span style='color:blue'>goto</span></span></span><span
style='color:black'> Cleanup;<o:p></o:p></span></pre><pre style='background:
white'><span style='color:black'>}<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// Print the call result of the static method.</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=SpellE><span class=GramE><span style='color:black'>wprintf</span></span></span><span
class=GramE><span style='color:black'>(</span></span><span class=SpellE><span
style='color:black'>L</span><span style='color:#A31515'>&quot;Call</span></span><span
style='color:#A31515'> %<span class=SpellE>s.%s</span>(\&quot;%s\&quot;) =&gt; %d\n&quot;</span><span
style='color:black'>, <o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span
class=SpellE><span style='color:blue'>static_cast</span></span><span
style='color:black'>&lt;PCWSTR<span class=GramE>&gt;(</span><span class=SpellE>bstrClassName</span>), <o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span
class=SpellE><span style='color:blue'>static_cast</span></span><span
style='color:black'>&lt;PCWSTR<span class=GramE>&gt;(</span><span class=SpellE>bstrStaticMethodName</span>), <o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span
class=SpellE><span style='color:blue'>static_cast</span></span><span
style='color:black'>&lt;PCWSTR<span class=GramE>&gt;(</span><span class=SpellE>vtStringArg.bstrVal</span>), <o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span><span
class=SpellE>vtLengthRet.lVal</span>);<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// Instantiate the class.</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=SpellE><span class=GramE><span style='color:black'>hr</span></span></span><span
style='color:black'> = <span class=SpellE>spAssembly</span>-&gt;<span
class=SpellE>CreateInstance</span>(<span class=SpellE>bstrClassName</span>, &amp;<span
class=SpellE>vtObject</span>);<o:p></o:p></span></pre><pre style='background:
white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (FAILED(<span class=SpellE>hr</span>))<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>wprintf</span></span><span class=GramE>(</span><span
class=SpellE>L<span style='color:#A31515'>&quot;Assembly</span></span></span><span
style='color:#A31515'>::<span class=SpellE>CreateInstance</span> failed w/<span
class=SpellE>hr</span> 0x%08lx\n&quot;</span><span style='color:black'>, <span
class=SpellE>hr</span>);<o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
class=SpellE><span class=GramE><span style='color:blue'>goto</span></span></span><span
style='color:black'> Cleanup;<o:p></o:p></span></pre><pre style='background:
white'><span style='color:black'>}<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// Call the instance method of the class.</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>//<span style='mso-spacerun:yes'>&nbsp;&nbsp; </span>public string <span
class=SpellE><span class=GramE>ToString</span></span><span class=GramE>(</span>);</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><o:p>&nbsp;</o:p></span></pre><pre style='background:white'><span
style='color:green'>// <span class=GramE>Create</span> a safe array to contain the arguments of the method.</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=SpellE><span class=GramE><span style='color:black'>psaMethodArgs</span></span></span><span
style='color:black'> = <span class=SpellE>SafeArrayCreateVector</span>(VT_VARIANT, 0, 0);<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// <span class=GramE>Invoke</span> the &quot;<span
class=SpellE>ToString</span>&quot; method from the Type interface.</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=SpellE><span class=GramE><span style='color:black'>hr</span></span></span><span
style='color:black'> = <span class=SpellE>spType</span>-&gt;InvokeMember_3(<span
class=SpellE>bstrMethodName</span>, </span><span class=SpellE><span
style='color:blue'>static_cast</span></span><span style='color:black'>&lt;<span
class=SpellE>BindingFlags</span>&gt;(<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE>BindingFlags_InvokeMethod</span> | <span class=SpellE>BindingFlags_Instance</span> | <span
class=SpellE>BindingFlags_Public</span>),<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>NULL, <span
class=SpellE>vtObject</span>, <span class=SpellE>psaMethodArgs</span>, &amp;<span
class=SpellE>vtStringRet</span>);<o:p></o:p></span></pre><pre style='background:
white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (FAILED(<span class=SpellE>hr</span>))<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>wprintf</span></span><span class=GramE>(</span><span
class=SpellE>L<span style='color:#A31515'>&quot;Failed</span></span></span><span
style='color:#A31515'> to invoke <span class=SpellE>ToString</span> w/<span
class=SpellE>hr</span> 0x%08lx\n&quot;</span><span style='color:black'>, <span
class=SpellE>hr</span>);<o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
class=SpellE><span class=GramE><span style='color:blue'>goto</span></span></span><span
style='color:black'> Cleanup;<o:p></o:p></span></pre><pre style='background:
white'><span style='color:black'>}<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// Print the call result of the method.</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=SpellE><span class=GramE><span style='color:black'>wprintf</span></span></span><span
class=GramE><span style='color:black'>(</span></span><span class=SpellE><span
style='color:black'>L</span><span style='color:#A31515'>&quot;Call</span></span><span
style='color:#A31515'> %<span class=SpellE>s.%s</span>() =&gt; %s\n&quot;</span><span
style='color:black'>, <o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span
class=SpellE><span style='color:blue'>static_cast</span></span><span
style='color:black'>&lt;PCWSTR<span class=GramE>&gt;(</span><span class=SpellE>bstrClassName</span>), <o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span
class=SpellE><span style='color:blue'>static_cast</span></span><span
style='color:black'>&lt;PCWSTR<span class=GramE>&gt;(</span><span class=SpellE>bstrMethodName</span>), <o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span
class=SpellE><span style='color:blue'>static_cast</span></span><span
style='color:black'>&lt;PCWSTR<span class=GramE>&gt;(</span><span class=SpellE>vtStringRet.bstrVal</span>));<o:p></o:p></span></pre><pre><o:p>&nbsp;</o:p></pre><pre>- <span
class=GramE>end</span> -</pre></div>

</div>

<p class=MsoListParagraphCxSpFirst><span style='mso-fareast-font-family:����'><o:p>&nbsp;</o:p></span></p>

<p class=MsoListParagraphCxSpLast><span style='mso-fareast-font-family:����'>The above
C++ code does the same thing as this C# code:<o:p></o:p></span></p>

<div>

<div style='border:solid #D0D2D2 1.5pt;padding:8.0pt 8.0pt 8.0pt 8.0pt'><pre>- C# code snippet -</pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:black'>Assembly <span class=SpellE>assembly</span> = <span
class=SpellE><span class=GramE>AppDomain.CurrentDomain.Load</span></span><span
class=GramE>(</span><span class=SpellE>pszAssemblyName</span>);<o:p></o:p></span></pre><pre
style='background:white'><span class=GramE><span style='color:blue'>object</span></span><span
style='color:black'> length = <span class=SpellE>type.InvokeMember</span>(</span><span
style='color:#A31515'>&quot;<span class=SpellE>GetStringLength</span>&quot;</span><span
style='color:black'>, <o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span><span
class=SpellE>BindingFlags.InvokeMethod</span> | <span class=SpellE>BindingFlags.Static</span> | <o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span><span
class=SpellE>BindingFlags.Public</span>, </span><span style='color:blue'>null</span><span
style='color:black'>, </span><span style='color:blue'>null</span><span
style='color:black'>, </span><span style='color:blue'>new</span><span
style='color:black'> </span><span class=GramE><span style='color:blue'>object</span><span
style='color:black'>[</span></span><span style='color:black'>] { </span><span
style='color:#A31515'>&quot;<span class=SpellE>HelloWorld</span>&quot;</span><span
style='color:black'> });<o:p></o:p></span></pre><pre style='background:white'><span
class=GramE><span style='color:blue'>object</span></span><span
style='color:black'> <span class=SpellE>obj</span> = <span class=SpellE>assembly.CreateInstance</span>(</span><span
style='color:#A31515'>&quot;<span class=SpellE>CSClassLibrary.CSSimpleObject</span>&quot;</span><span
style='color:black'>);<o:p></o:p></span></pre><pre style='background:white'><span
class=GramE><span style='color:blue'>object</span></span><span
style='color:black'> <span class=SpellE>str</span> = <span class=SpellE>type.InvokeMember</span>(</span><span
style='color:#A31515'>&quot;<span class=SpellE>ToString</span>&quot;</span><span
style='color:black'>, <o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span><span
class=SpellE>BindingFlags.InvokeMethod</span> | <span class=SpellE>BindingFlags.Instance</span> | <o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span><span
class=SpellE>BindingFlags.Public</span>, </span><span style='color:blue'>null</span><span
style='color:black'>, <span class=SpellE>obj</span>, </span><span
style='color:blue'>new</span><span style='color:black'> </span><span
class=GramE><span style='color:blue'>object</span><span style='color:black'>[</span></span><span
style='color:black'>] { });<o:p></o:p></span></pre><pre><o:p>&nbsp;</o:p></pre><pre>- <span
class=GramE>end</span> -</pre></div>

</div>

<p class=MsoListParagraphCxSpFirst><span style='mso-fareast-font-family:����'><o:p>&nbsp;</o:p></span></p>

<p class=MsoListParagraphCxSpLast style='margin-left:72.0pt;mso-add-space:auto;
text-indent:-18.0pt;mso-list:l5 level2 lfo6'><![if !supportLists]><span
style='mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin'><span
style='mso-list:Ignore'>b.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='mso-fareast-font-family:����'>If we
get <span class=SpellE><b style='mso-bidi-font-weight:normal'>ICLRRuntimeHost</b></span>
interface, we can use following code.<o:p></o:p></span></p>

<div>

<div style='border:solid #D0D2D2 1.5pt;padding:8.0pt 8.0pt 8.0pt 8.0pt'><pre>- C++ code snippet -</pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// <span class=GramE>The</span> invoked method of <span
class=SpellE>ExecuteInDefaultAppDomain</span> must have the </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// following signature: static <span class=SpellE>int</span> <span
class=SpellE>pwzMethodName</span> (String <span class=SpellE>pwzArgument</span>)</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// where <span class=SpellE>pwzMethodName</span> represents the name of the invoked method, and </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// <span class=SpellE>pwzArgument</span> represents the string value passed as a parameter to that </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// method. If the HRESULT return value of <span
class=SpellE>ExecuteInDefaultAppDomain</span> is </span><span style='color:
black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// set to S_OK, <span class=SpellE>pReturnValue</span> is set to the integer value returned by the </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>// invoked method. Otherwise, <span class=SpellE>pReturnValue</span> is not set.</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=SpellE><span class=GramE><span style='color:black'>hr</span></span></span><span
style='color:black'> = <span class=SpellE>pClrRuntimeHost</span>-&gt;<span
class=SpellE>ExecuteInDefaultAppDomain</span>(<span class=SpellE>pszAssemblyPath</span>, <o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span><span
class=SpellE><span class=GramE>pszClassName</span></span>, <span class=SpellE>pszStaticMethodName</span>, <span
class=SpellE>pszStringArg</span>, &amp;<span class=SpellE>dwLengthRet</span>);<o:p></o:p></span></pre><pre
style='background:white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (FAILED(<span class=SpellE>hr</span>))<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>wprintf</span></span><span class=GramE>(</span><span
class=SpellE>L<span style='color:#A31515'>&quot;Failed</span></span></span><span
style='color:#A31515'> to call <span class=SpellE>GetStringLength</span> w/<span
class=SpellE>hr</span> 0x%08lx\n&quot;</span><span style='color:black'>, <span
class=SpellE>hr</span>);<o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
class=SpellE><span class=GramE><span style='color:blue'>goto</span></span></span><span
style='color:black'> Cleanup;<o:p></o:p></span></pre><pre style='background:
white'><span style='color:black'>}<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>// Print the call result of the static method.</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=SpellE><span class=GramE><span style='color:black'>wprintf</span></span></span><span
class=GramE><span style='color:black'>(</span></span><span class=SpellE><span
style='color:black'>L</span><span style='color:#A31515'>&quot;Call</span></span><span
style='color:#A31515'> %<span class=SpellE>s.%s</span>(\&quot;%s\&quot;) =&gt; %d\n&quot;</span><span
style='color:black'>, <span class=SpellE>pszClassName</span>, <span
class=SpellE>pszStaticMethodName</span>, <o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span><span
class=SpellE><span class=GramE>pszStringArg</span></span>, <span class=SpellE>dwLengthRet</span>);<o:p></o:p></span></pre><pre><o:p>&nbsp;</o:p></pre><pre>- <span
class=GramE>end</span> -</pre></div>

</div>

<p class=MsoListParagraphCxSpFirst style='margin-left:72.0pt;mso-add-space:
auto'><span style='mso-fareast-font-family:����'><o:p>&nbsp;</o:p></span></p>

<p class=MsoListParagraphCxSpMiddle><span style='mso-fareast-font-family:����'><o:p>&nbsp;</o:p></span></p>

<p class=MsoListParagraphCxSpMiddle><span style='mso-fareast-font-family:����'><o:p>&nbsp;</o:p></span></p>

<p class=MsoListParagraphCxSpLast style='text-indent:-18.0pt;mso-list:l5 level1 lfo6'><![if !supportLists]><b
style='mso-bidi-font-weight:normal'><span style='mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Calibri;mso-bidi-theme-font:
minor-latin'><span style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></b><![endif]><b style='mso-bidi-font-weight:normal'><span
style='mso-fareast-font-family:����'>Clean up the runtime</span>.<o:p></o:p></b></p>

<div>

<div style='border:solid #D0D2D2 1.5pt;padding:8.0pt 8.0pt 8.0pt 8.0pt'><pre>- C# code snippet -</pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (<span class=SpellE>pMetaHost</span>)<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>pMetaHost</span></span>-&gt;Release();<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>pMetaHost</span></span> = NULL;<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>}<o:p></o:p></span></pre><pre
style='background:white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (<span class=SpellE>pRuntimeInfo</span>)<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>pRuntimeInfo</span></span>-&gt;Release();<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>pRuntimeInfo</span></span> = NULL;<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>}<o:p></o:p></span></pre><pre
style='background:white'><span class=GramE><span style='color:blue'>if</span></span><span
style='color:black'> (<span class=SpellE>pCorRuntimeHost</span>)<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
style='color:green'>// <span class=GramE>Please</span> note that after a call to Stop, the CLR cannot be </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span
style='color:green'>// reinitialized into the same process. This step is usually not </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span
style='color:green'>// necessary. You can leave the .NET runtime loaded in your process.</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
style='color:green'>//<span class=SpellE><span class=GramE>wprintf</span></span><span
class=GramE>(</span><span class=SpellE>L&quot;Stop</span> the .NET runtime\n&quot;);</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
style='color:green'>//<span class=SpellE>pCorRuntimeHost</span>-&gt;<span
class=GramE>Stop(</span>);</span><span style='color:black'><o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>pCorRuntimeHost</span></span>-&gt;Release();<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
class=SpellE><span class=GramE>pCorRuntimeHost</span></span> = NULL;<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'>}<o:p></o:p></span></pre><pre><o:p>&nbsp;</o:p></pre><pre>- <span
class=GramE>end</span> -</pre></div>

</div>

<p class=MsoListParagraphCxSpFirst style='margin-left:72.0pt;mso-add-space:
auto'><o:p>&nbsp;</o:p></p>

<p class=MsoListParagraphCxSpLast><b style='mso-bidi-font-weight:normal'><o:p>&nbsp;</o:p></b></p>

<h2>More Information</h2>

<p class=MsoNormal><a
href="http://msdn.microsoft.com/en-us/library/dd380850.aspx">MSDN: Hosting
Overview</a><span style='mso-fareast-font-family:����'><o:p></o:p></span></p>

<p class=MsoNormal><a
href="http://msdn.microsoft.com/en-us/magazine/ee819091.aspx">CLR Inside Out:
In-Process Side-by-Side</a></p>

</div>

</body>

</html>