C++/CLI wrapper for native DLL (CppCLINativeDllWrapper)

The code sample demonstrates using C++/CLI to wrap a native DLL. Your .NET project can reference the C++/CLI wrapper to indirectly call the native DLL

C++ (58.5 KB)
 
 
 
 
 
3.3 Star
(3)
15,677 times
Add to favorites
8/22/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">
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>Jialiang Ge</o:Author>
  <o:LastAuthor>Mark Sun</o:LastAuthor>
  <o:Revision>21</o:Revision>
  <o:TotalTime>285</o:TotalTime>
  <o:Created>2011-09-03T10:53:00Z</o:Created>
  <o:LastSaved>2011-11-17T06:14:00Z</o:LastSaved>
  <o:Pages>1</o:Pages>
  <o:Words>1145</o:Words>
  <o:Characters>6530</o:Characters>
  <o:Lines>54</o:Lines>
  <o:Paragraphs>15</o:Paragraphs>
  <o:CharactersWithSpaces>7660</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:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;
	mso-font-charset:2;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:0 268435456 0 0 -2147483648 0;}
@font-face
	{font-family:����;
	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 9 3 1 1 1 1 1;
	mso-font-charset:134;
	mso-generic-font-family:modern;
	mso-font-pitch:fixed;
	mso-font-signature:3 680460288 22 0 262145 0;}
@font-face
	{font-family:"\@������";
	panose-1:2 1 6 9 3 1 1 1 1 1;
	mso-font-charset:134;
	mso-generic-font-family:modern;
	mso-font-pitch:fixed;
	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-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-noshow:yes;
	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-noshow:yes;
	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-noshow:yes;
	mso-style-priority:9;
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-link:"Heading 2";
	mso-ansi-font-size:13.0pt;
	mso-bidi-font-size:13.0pt;
	font-family:"Cambria","serif";
	mso-ascii-font-family:Cambria;
	mso-ascii-theme-font:major-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:major-fareast;
	mso-hansi-font-family:Cambria;
	mso-hansi-theme-font:major-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:major-bidi;
	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;
	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;}
@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:129439487;
	mso-list-type:hybrid;
	mso-list-template-ids:-360805422 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l0:level2
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Courier New";}
@list l0:level3
	{mso-level-number-format:bullet;
	mso-level-text:\F0A7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l0:level4
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l0:level5
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Courier New";}
@list l0:level6
	{mso-level-number-format:bullet;
	mso-level-text:\F0A7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l0:level7
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l0:level8
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Courier New";}
@list l0:level9
	{mso-level-number-format:bullet;
	mso-level-text:\F0A7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
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="1026"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1"/>
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple style='tab-interval:36.0pt'>

<div class=WordSection1>

<h1><span style='font-family:������;mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";mso-no-proof:yes'>DYNAMIC LINK LIBRARY </span>(<span
class=SpellE><span style='font-family:������;mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";mso-no-proof:yes'>CppCLINativeDllWrapper</span></span>)</h1>

<h2>Introduction</h2>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'>This C++/CLI code sample
demonstrates making C++/CLI wrapper classes for a native C++ DLL module that
allow you to call from any .NET code to the classes and functions exported by
the module.</p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span
style='mso-spacerun:yes'>&nbsp; </span><span class=SpellE>CSCallNativeDllWrapper</span>/<span
class=SpellE>VBCallNativeDllWrapper</span> (any .NET clients)<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>--&gt;<span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class=SpellE>CppCLINativeDllWrapper</span> (this C++/CLI
wrapper)<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>--&gt;<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span class=SpellE>CppDynamicLinkLibrary</span> (a native C++ DLL
module)</p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'>In this code sample, the
<span class=SpellE>CSimpleObjectWrapper</span> class wraps the native C++ class
<span class=SpellE>CSimpleObject</span>, and the <span class=SpellE>NativeMethods</span>
class wraps the global functions exported by CppDynamicLinkLibrary.dll.</p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'>The interoperability
features supported by Visual C++/CLI offer a particular advantage over other
.NET languages when it comes to interoperating with native modules. Apart from
the traditional explicit P/Invoke, C++/CLI allows implicit P/Invoke, also known
as C++ <span class=SpellE>Interop</span>, or It Just Work (IJW), which mixes
managed code and native code almost invisibly. The feature provides better type
safety, easier coding, greater performance, and is more forgiving if the native
API is modified. You can use the technology to build .NET wrappers for native
C++ classes and functions if their source code is available, and allow any .NET
clients to access the native C++ classes and functions through the wrappers.<span
style='mso-fareast-font-family:����'><o:p></o:p></span></p>

<h2>Using the Code<o:p>&nbsp;</o:p></h2>

<h2><span style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif";
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
font-weight:normal'>Step1. Create a Visual C++ / CLR / Class Library project
named <span class=SpellE>CppCLINativeDllWrapper</span> in Visual Studio 2010.
The project wizard generates a default empty C++/CLI class:<o:p></o:p></span></h2>

<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'>namespace</span></span><span
style='color:black'> <span class=SpellE>CppCLINativeDllWrapper</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:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span></span><span
class=GramE><span style='color:blue'>public</span></span><span
style='color:black'> </span><span style='color:blue'>ref</span><span
style='color:black'> </span><span style='color:blue'>class</span><span
style='color:black'> Class1<o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span
style='color:green'>// TODO: Add your methods for this class here.</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>};<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>

<h2><span style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif";
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:����;mso-hansi-theme-font:
minor-latin;mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
font-weight:normal'><o:p>&nbsp;</o:p></span></h2>

<h2><span style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif";
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
font-weight:normal'>Step2. Reference the native C++ DLL <span class=SpellE>CppDynamicLinkLibrary</span>.<o:p></o:p></span></h2>

<h2><span style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif";
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
font-weight:normal'><span style='mso-spacerun:yes'>&nbsp; </span></span><span
style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif";
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:����;mso-hansi-theme-font:
minor-latin;mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
font-weight:normal'><span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span
style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif";
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
font-weight:normal'>Option1. Link the LIB file of the DLL by entering the LIB
file name in<span style='mso-spacerun:yes'>&nbsp;&nbsp; </span>Project
Properties / Linker / Input / Additional Dependencies. We can<span
style='mso-spacerun:yes'>&nbsp;&nbsp; </span>configure the search path of the
LIB file in Project <span class=SpellE>roperties</span> / Linker /<span
style='mso-spacerun:yes'>&nbsp;&nbsp; </span>General / Additional Library
Directories.<o:p></o:p></span></h2>

<h2><span style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif";
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
font-weight:normal'><span style='mso-spacerun:yes'>&nbsp; </span>Option2. Select
References from the Project's shortcut menu. On the<span
style='mso-spacerun:yes'>&nbsp;&nbsp; </span>Property Pages dialog box, expand
the Common Properties node, select<span style='mso-spacerun:yes'>&nbsp;&nbsp;
</span>References, and then select the Add New Reference... button. The
Add<span style='mso-spacerun:yes'>&nbsp;&nbsp; </span>Reference dialog box is
displayed. This dialog lists all the libraries <span class=GramE>that<span
style='mso-spacerun:yes'>&nbsp; </span>you</span> can reference. The Projects
tab lists all the projects in the current<span
style='mso-spacerun:yes'>&nbsp;&nbsp; </span>solution and any libraries they
contain. If the <span class=SpellE>CppDynamicLinkLibrary</span><span
style='mso-spacerun:yes'>&nbsp;&nbsp; </span>project is in the current
solution, select <span class=SpellE>CppDynamicLinkLibrary</span> and click<span
style='mso-spacerun:yes'>&nbsp;&nbsp; </span>OK in the Projects tab.<o:p></o:p></span></h2>

<h2><span style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif";
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
font-weight:normal'>Step3. Including the header file that declares the
functions and classes of the DLL.<o:p></o:p></span></h2>

<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:#CC6633'>#include</span><span style='color:black'> </span><span
style='color:#A31515'>&quot;<span class=SpellE>CppDynamicLinkLibrary.h</span>&quot;</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>

<h2><span style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif";
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
font-weight:normal'>You can configure the search path of the header file in
Project Properties / C/C++ / General / Additional Include Directories.<o:p></o:p></span></h2>

<h2><span style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif";
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
font-weight:normal'>Step4. Design the C++/CLI wrapper class <span class=SpellE>CSimpleObjectWrapper</span>
for the native C++ class <span class=SpellE>CSimpleObject</span>.<o:p></o:p></span></h2>

<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'>public</span></span><span
style='color:black'> </span><span style='color:blue'>ref</span><span
style='color:black'> </span><span style='color:blue'>class</span><span
style='color:black'> <span class=SpellE>CSimpleObjectWrapper</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 class=GramE><span style='color:blue'>public</span></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
class=SpellE><span class=GramE>CSimpleObjectWrapper</span></span><span
class=GramE>(</span></span><span style='color:blue'>void</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
class=GramE><span style='color:blue'>virtual</span></span><span
style='color:black'> ~<span class=SpellE>CSimpleObjectWrapper</span>(</span><span
style='color:blue'>void</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><span
style='color:green'>// Property</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
class=GramE><span style='color:blue'>property</span></span><span
style='color:black'> </span><span style='color:blue'>float</span><span
style='color:black'> <span class=SpellE>FloatProperty</span><o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span
class=GramE><span style='color:blue'>float</span></span><span style='color:
black'> get(</span><span style='color:blue'>void</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;&nbsp;&nbsp;&nbsp; </span></span><span
class=GramE><span style='color:blue'>void</span></span><span style='color:black'> set(</span><span
style='color:blue'>float</span><span style='color:black'> </span><span
style='color:blue'>value</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>}<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><span
style='color:green'>// Method</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
class=GramE><span style='color:blue'>virtual</span></span><span
style='color:black'> String ^ <span class=SpellE>ToString</span>(</span><span
style='color:blue'>void</span><span style='color:black'>) override;<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><span
style='color:green'>// Static method</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
class=GramE><span style='color:blue'>static</span></span><span
style='color:black'> </span><span class=SpellE><span style='color:blue'>int</span></span><span
style='color:black'> <span class=SpellE>GetStringLength</span>(String ^ <span
class=SpellE>str</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=GramE><span style='color:blue'>protected</span></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
class=GramE>!<span class=SpellE>CSimpleObjectWrapper</span></span>(</span><span
style='color:blue'>void</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 class=GramE><span style='color:blue'>private</span></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
class=SpellE>CSimpleObject</span> *<span class=SpellE>m_impl</span>;<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>

<h2><span style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif";
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:����;mso-hansi-theme-font:
minor-latin;mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
font-weight:normal'><o:p>&nbsp;</o:p></span></h2>

<h2><span style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif";
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
font-weight:normal'>The class wraps an instance of the native C++ class <span
class=SpellE>CSimpleObject</span>. The instance is pointed by the private
member variable <span class=SpellE>m_impl</span>. It is initialized in the
constructor <span class=SpellE><span class=GramE>CSimpleObjectWrapper</span></span><span
class=GramE>(</span>void);, and is freed in the <span class=SpellE>desctructor</span>
(virtual ~<span class=SpellE>CSimpleObjectWrapper</span>(void);) and the <span
class=SpellE>finalizer</span> (!<span class=SpellE>CSimpleObjectWrapper</span>(void);).<o:p></o:p></span></h2>

<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'>CSimpleObjectWrapper</span></span><span
style='color:black'>::<span class=SpellE><span class=GramE>CSimpleObjectWrapper</span></span><span
class=GramE>(</span></span><span style='color:blue'>void</span><span
style='color:black'>)<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>m_impl</span> = </span><span style='color:blue'>new</span><span
style='color:black'> <span class=SpellE><span class=GramE>CSimpleObject</span></span><span
class=GramE>(</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'><o:p>&nbsp;</o:p></span></pre><pre style='background:white'><span
class=SpellE><span style='color:black'>CSimpleObjectWrapper</span></span><span
style='color:black'>:<span class=GramE>:~</span><span class=SpellE>CSimpleObjectWrapper</span>(</span><span
style='color:blue'>void</span><span style='color:black'>)<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
class=GramE><span style='color:blue'>if</span></span><span style='color:black'> (<span
class=SpellE>m_impl</span>)<o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span
class=GramE><span style='color:blue'>delete</span></span><span
style='color:black'> <span class=SpellE>m_impl</span>;<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class=SpellE>m_impl</span> = NULL;<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </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'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span class=SpellE><span style='color:black'>CSimpleObjectWrapper</span></span><span
style='color:black'>::<span class=GramE>!<span class=SpellE>CSimpleObjectWrapper</span></span>(</span><span
style='color:blue'>void</span><span style='color:black'>)<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
class=GramE><span style='color:blue'>if</span></span><span style='color:black'> (<span
class=SpellE>m_impl</span>)<o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span
class=GramE><span style='color:blue'>delete</span></span><span
style='color:black'> <span class=SpellE>m_impl</span>;<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class=SpellE>m_impl</span> = NULL;<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>}<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>

<h2><span style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif";
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
font-weight:normal'><o:p>&nbsp;</o:p></span></h2>

<h2><span style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif";
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
font-weight:normal'>The public member properties and methods of <span
class=SpellE>CSimpleObjectWrapper</span> <span class=GramE>wraps</span> those
of the native C++ class <span class=SpellE>CSimpleObject</span>. They <span
class=GramE>redirects</span> the calls to <span class=SpellE>CSimpleObject</span>
through the <span class=SpellE>CSimpleObject</span> instance pointed by <span
class=SpellE>m_impl</span>. Type marshaling takes place between the managed and
native code.<o:p></o:p></span></h2>

<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'>float</span></span><span style='color:
black'> <span class=SpellE>CSimpleObjectWrapper</span>::<span class=SpellE>FloatProperty</span>::get(</span><span
style='color:blue'>void</span><span style='color:black'>)<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
class=GramE><span style='color:blue'>return</span></span><span
style='color:black'> <span class=SpellE>m_impl</span>-&gt;<span class=SpellE>get_FloatProperty</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'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span class=GramE><span style='color:blue'>void</span></span><span
style='color:black'> <span class=SpellE>CSimpleObjectWrapper</span>::<span
class=SpellE>FloatProperty</span>::set(</span><span style='color:blue'>float</span><span
style='color:black'> </span><span style='color:blue'>value</span><span
style='color:black'>)<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>m_impl</span>-&gt;<span class=SpellE>set_<span class=GramE>FloatProperty</span></span><span
class=GramE>(</span></span><span style='color:blue'>value</span><span
style='color:black'>);<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:black'>String ^ <span class=SpellE>CSimpleObjectWrapper</span>::<span
class=SpellE><span class=GramE>ToString</span></span><span class=GramE>(</span></span><span
style='color:blue'>void</span><span style='color:black'>)<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
class=SpellE><span class=GramE><span style='color:blue'>wchar_t</span></span></span><span
style='color:black'> <span class=SpellE>szStr</span>[100];<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>HRESULT <span
class=SpellE>hr</span> = <span class=SpellE>m_impl</span>-&gt;<span
class=SpellE><span class=GramE>ToString</span></span><span class=GramE>(</span><span
class=SpellE>szStr</span>, ARRAYSIZE(<span class=SpellE>szStr</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=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'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Marshal::<span
class=SpellE><span class=GramE>ThrowExceptionForHR</span></span><span
class=GramE>(</span><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>}<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'>// Marshal PWSTR to System::String and return it.</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
class=GramE><span style='color:blue'>return</span></span><span
style='color:black'> </span><span class=SpellE><span style='color:blue'>gcnew</span></span><span
style='color:black'> String(<span class=SpellE>szStr</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'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span class=SpellE><span class=GramE><span
style='color:blue'>int</span></span></span><span style='color:black'> <span
class=SpellE>CSimpleObjectWrapper</span>::<span class=SpellE>GetStringLength</span>(System::String ^ <span
class=SpellE>str</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'>// Marshal System::String to PCWSTR, and call the C++ function.</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
class=SpellE>marshal_context</span> ^ context = </span><span class=SpellE><span
style='color:blue'>gcnew</span></span><span style='color:black'> <span
class=SpellE>marshal_<span class=GramE>context</span></span><span class=GramE>(</span>);<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>PCWSTR <span
class=SpellE>pszString</span> = context-&gt;<span class=SpellE>marshal_as</span>&lt;</span><span
class=SpellE><span style='color:blue'>const</span></span><span
style='color:black'> </span><span class=SpellE><span style='color:blue'>wchar_t</span></span><span
style='color:black'>*<span class=GramE>&gt;(</span><span class=SpellE>str</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'>int</span></span></span><span
style='color:black'> length = <span class=SpellE>CSimpleObject</span>::<span
class=SpellE>GetStringLength</span>(<span class=SpellE>pszString</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=GramE><span style='color:blue'>delete</span></span><span
style='color:black'> context;<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=GramE><span style='color:blue'>return</span></span><span
style='color:black'> length;<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>

<h2><span style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif";
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
font-weight:normal'><o:p>&nbsp;</o:p></span></h2>

<h2><span style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif";
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
font-weight:normal'>Step5. Design the C++/CLI wrapper class <span class=SpellE>NativeMethods</span>
for the <span class=GramE>functions <span style='mso-fareast-font-family:����'><span
style='mso-spacerun:yes'>&nbsp;</span></span>exported</span> by the native C++
DLL module.<o:p></o:p></span></h2>

<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'>/// &lt;summary&gt;</span><span style='color:black'><o:p></o:p></span></pre><pre
style='background:white'><span class=GramE><span style='color:green'>/// Function delegate of the 'PFN_COMPARE' callback function.</span></span><span
style='color:green'> </span><span style='color:black'><o:p></o:p></span></pre><pre
style='background:white'><span style='color:green'>/// &lt;/summary&gt;</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>/// &lt;remarks&gt;</span><span style='color:black'><o:p></o:p></span></pre><pre
style='background:white'><span style='color:green'>/// <span class=GramE>The</span> delegate type has the <span
class=SpellE>UnmanagedFunctionPointerAttribute</span>. Using </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>/// this attribute, you can specify the calling convention of the native </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=GramE><span style='color:green'>/// function pointer type.</span></span><span
style='color:green'> In the native API's header file, the callback </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>/// PFN_COMPARE is defined as __<span class=SpellE>stdcall</span> (CALLBACK), so here we specify </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=GramE><span style='color:green'>/// <span class=SpellE>CallingConvention</span>::<span
class=SpellE>StdCall</span>.</span></span><span style='color:black'><o:p></o:p></span></pre><pre
style='background:white'><span style='color:green'>/// &lt;/remarks&gt;</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:black'>[<span class=SpellE><span class=GramE>UnmanagedFunctionPointer</span></span><span
class=GramE>(</span><span class=SpellE>CallingConvention</span>::<span
class=SpellE>StdCall</span>)]<o:p></o:p></span></pre><pre style='background:
white'><span class=GramE><span style='color:blue'>public</span></span><span
style='color:black'> </span><span style='color:blue'>delegate</span><span
style='color:black'> </span><span class=SpellE><span style='color:blue'>int</span></span><span
style='color:black'> <span class=SpellE>CompareCallback</span>(</span><span
class=SpellE><span style='color:blue'>int</span></span><span style='color:black'> a, </span><span
class=SpellE><span style='color:blue'>int</span></span><span style='color:black'> b);<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'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white'><span style='color:green'>/// &lt;summary&gt;</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
style='color:green'>/// This C++/CLI class wraps the functions exported by the native C++ </span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=GramE><span style='color:green'>/// module CppDynamicLinkLibrary.dll.</span></span><span
style='color:green'> </span><span style='color:black'><o:p></o:p></span></pre><pre
style='background:white'><span style='color:green'>/// &lt;/summary&gt;</span><span
style='color:black'><o:p></o:p></span></pre><pre style='background:white'><span
class=GramE><span style='color:blue'>public</span></span><span
style='color:black'> </span><span style='color:blue'>ref</span><span
style='color:black'> </span><span style='color:blue'>class</span><span
style='color:black'> <span class=SpellE>NativeMethods</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 class=GramE><span style='color:blue'>public</span></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
class=GramE><span style='color:blue'>static</span></span><span
style='color:black'> </span><span class=SpellE><span style='color:blue'>int</span></span><span
style='color:black'> GetStringLength1(String ^ <span class=SpellE>str</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=GramE><span style='color:blue'>static</span></span><span
style='color:black'> </span><span class=SpellE><span style='color:blue'>int</span></span><span
style='color:black'> GetStringLength2(String ^ <span class=SpellE>str</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=GramE><span style='color:blue'>static</span></span><span
style='color:black'> </span><span class=SpellE><span style='color:blue'>int</span></span><span
style='color:black'> Max(</span><span class=SpellE><span style='color:blue'>int</span></span><span
style='color:black'> a, </span><span class=SpellE><span style='color:blue'>int</span></span><span
style='color:black'> b, <span class=SpellE>CompareCallback</span> ^ <span
class=SpellE>cmpFunc</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'><o:p>&nbsp;</o:p></span></pre><pre><o:p>&nbsp;</o:p></pre><pre>- <span
class=GramE>end</span> -</pre>

<h2><span style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif";
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;
font-weight:normal'>All methods in <span class=SpellE>NativeMethods</span> are
declared as static for the global functions exported by <span class=SpellE>CppDynamicLinkLibrary</span>.
They redirect calls to the native DLL.</span><span style='font-size:11.0pt;
line-height:115%;font-family:"Calibri","sans-serif";mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:����;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:
"Times New Roman";mso-bidi-theme-font:minor-bidi;font-weight:normal'><o:p></o:p></span></h2>

<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 class=GramE><span style='color:blue'>int</span></span></span><span
style='color:black'> <span class=SpellE>NativeMethods</span>::GetStringLength1(String ^ <span
class=SpellE>str</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'>// Marshal System::String to PCWSTR, and call the C++ function.</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
class=SpellE>marshal_context</span> ^ context = </span><span class=SpellE><span
style='color:blue'>gcnew</span></span><span style='color:black'> <span
class=SpellE>marshal_<span class=GramE>context</span></span><span class=GramE>(</span>);<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>PCWSTR <span
class=SpellE>pszString</span> = context-&gt;<span class=SpellE>marshal_as</span>&lt;</span><span
class=SpellE><span style='color:blue'>const</span></span><span
style='color:black'> </span><span class=SpellE><span style='color:blue'>wchar_t</span></span><span
style='color:black'>*<span class=GramE>&gt;(</span><span class=SpellE>str</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'>int</span></span></span><span
style='color:black'> length = ::GetStringLength1(<span class=SpellE>pszString</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=GramE><span style='color:blue'>delete</span></span><span
style='color:black'> context;<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=GramE><span style='color:blue'>return</span></span><span
style='color:black'> length;<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:blue'>int</span></span></span><span style='color:black'> <span
class=SpellE>NativeMethods</span>::GetStringLength2(String ^ <span
class=SpellE>str</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'>// Marshal System::String to PCWSTR, and call the C++ function.</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
class=SpellE>marshal_context</span> ^ context = </span><span class=SpellE><span
style='color:blue'>gcnew</span></span><span style='color:black'> <span
class=SpellE>marshal_<span class=GramE>context</span></span><span class=GramE>(</span>);<o:p></o:p></span></pre><pre
style='background:white'><span style='color:black'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>PCWSTR <span
class=SpellE>pszString</span> = context-&gt;<span class=SpellE>marshal_as</span>&lt;</span><span
class=SpellE><span style='color:blue'>const</span></span><span
style='color:black'> </span><span class=SpellE><span style='color:blue'>wchar_t</span></span><span
style='color:black'>*<span class=GramE>&gt;(</span><span class=SpellE>str</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'>int</span></span></span><span
style='color:black'> length = ::GetStringLength2(<span class=SpellE>pszString</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=GramE><span style='color:blue'>delete</span></span><span
style='color:black'> context;<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=GramE><span style='color:blue'>return</span></span><span
style='color:black'> length;<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:blue'>int</span></span></span><span style='color:black'> <span
class=SpellE>NativeMethods</span>::Max(</span><span class=SpellE><span
style='color:blue'>int</span></span><span style='color:black'> a, </span><span
class=SpellE><span style='color:blue'>int</span></span><span style='color:black'> b, <span
class=SpellE>CompareCallback</span> ^ <span class=SpellE>cmpFunc</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'>// Convert the delegate to a function pointer.</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
class=SpellE>IntPtr</span> <span class=SpellE>pCmpFunc</span> = Marshal::<span
class=SpellE><span class=GramE>GetFunctionPointerForDelegate</span></span><span
class=GramE>(</span><span class=SpellE>cmpFunc</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=GramE><span style='color:blue'>return</span></span><span
style='color:black'> ::Max(a, b, </span><span class=SpellE><span
style='color:blue'>static_cast</span></span><span style='color:black'>&lt;::PFN_COMPARE&gt;(<span
class=SpellE>pCmpFunc.ToPointer</span>()));<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>

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

<h2>More Information</h2>

<p class=MsoListParagraphCxSpFirst style='text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><span
style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
Symbol'><span style='mso-list:Ignore'>��<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><a
href="http://msdn.microsoft.com/en-us/library/2x8kf7zx.aspx">Using C++ <span
class=SpellE>Interop</span> (Implicit <span class=SpellE>PInvoke</span>)</a></p>

<p class=MsoListParagraphCxSpLast style='text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><span
style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
Symbol'><span style='mso-list:Ignore'>��<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><a
href="http://msdn.microsoft.com/en-us/library/ms235281.aspx">How to: Wrap
Native Class for Use by C#</a></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>