<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Junfeng Zhang's Musing</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/junfeng/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/junfeng/feed.xml</link>
    <description>things about the world, world of things</description>
    <lastBuildDate>Wed, 29 Jul 2015 22:09:42 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>The symbolic link cannot be followed because its type is disabled</title>
      <link>https://docs.microsoft.com/archive/blogs/junfeng/the-symbolic-link-cannot-be-followed-because-its-type-is-disabled</link>
      <pubDate>Mon, 07 May 2012 20:37:02 GMT</pubDate>
      <dc:creator><![CDATA[Junfeng Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/junfeng/2012/05/07/the-symbolic-link-cannot-be-followed-because-its-type-is-disabled/</guid>
      <description><![CDATA[When access a symbolic link on a file server, sometimes you may see the following error:
"The...]]></description>
      <content:encoded><![CDATA[<p>When access a symbolic link on a file server, sometimes you may see the following error:</p>
<p><b>"The symbolic link cannot be followed because its type is disabled"</b></p>
<p>This is because by default <i>remote to remote symbolic links</i> are disabled. You can enable it with fsutil.</p>
<p>C:\Windows\system32&gt;<b>fsutil&nbsp;behavior query SymlinkEvaluation<br /><br /></b>Local to local symbolic links are enabled.<br />Local to remote symbolic links are enabled.<br />Remote to local symbolic links are disabled.<br /><b><i>Remote to remote symbolic links are disabled.</i></b></p>
<p>C:\Windows\system32&gt;<b>fsutil behavior set SymlinkEvaluation R2R:1</b></p>
<p>C:\Windows\system32&gt;<b>fsutil&nbsp;behavior query SymlinkEvaluation<br /><br /></b>Local to local symbolic links are enabled.<br />Local to remote symbolic links are enabled.<br />Remote to local symbolic links are disabled.<br /><b><i>Remote to remote symbolic links are enabled.</i></b></p>
<p>Be sure to run fsutil from elevated command prompt.</p>]]></content:encoded>
    </item>
    <item>
      <title>Getting where the exception is thrown in Windows Error Report for managed application without a dump</title>
      <link>https://docs.microsoft.com/archive/blogs/junfeng/getting-where-the-exception-is-thrown-in-windows-error-report-for-managed-application-without-a-dump</link>
      <pubDate>Mon, 27 Jul 2009 11:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Junfeng Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/junfeng/2009/07/27/getting-where-the-exception-is-thrown-in-windows-error-report-for-managed-application-without-a-dump/</guid>
      <description><![CDATA[A while ago, an internal thread shows how to get where the exception is thrown in Windows Error...]]></description>
      <content:encoded><![CDATA[<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">A while ago, an internal thread shows how to get where the exception is thrown in Windows Error Report for managed application without a dump. The thread is very insightful. Shared below:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><B><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">Subject:</SPAN></B><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"> RE: How to investigate Windows Error Report from managed app?<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-ascii-font-family: Calibri"><o:p><FONT size=3 face="Times New Roman">&nbsp;</FONT></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="COLOR: #1f497d"><FONT size=3><FONT face="Times New Roman">FYI<o:p></o:p></FONT></FONT></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="COLOR: #1f497d"><o:p><FONT size=3 face="Times New Roman">&nbsp;</FONT></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="COLOR: #1f497d"><FONT size=3><FONT face="Times New Roman">I actually found that there is way to find what method caused this error and where without the dump. See below:<o:p></o:p></FONT></FONT></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="COLOR: #1f497d"><o:p><FONT size=3 face="Times New Roman">&nbsp;</FONT></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><B><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: navy; FONT-SIZE: 8.5pt">Problem signature<o:p></o:p></SPAN></B></P>
<P style="LINE-HEIGHT: normal; MARGIN: auto auto auto 8.2pt; mso-add-space: auto" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">Problem Event Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CLR20r3<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal; MARGIN: auto auto auto 8.2pt; mso-add-space: auto" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">Problem Signature 01:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; consoleapplication35.exe<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal; MARGIN: auto auto auto 8.2pt; mso-add-space: auto" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">Problem Signature 02:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.0.0.0<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal; MARGIN: auto auto auto 8.2pt; mso-add-space: auto" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">Problem Signature 03:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 48ed4a20<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal; MARGIN: auto auto auto 8.2pt; mso-add-space: auto" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">Problem Signature 04:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <SPAN style="BACKGROUND: yellow; mso-highlight: yellow">ConsoleApplication35</SPAN><o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal; MARGIN: auto auto auto 8.2pt; mso-add-space: auto" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">Problem Signature 05:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.0.0.0<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal; MARGIN: auto auto auto 8.2pt; mso-add-space: auto" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">Problem Signature 06:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 48ed4a20<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal; MARGIN: auto auto auto 8.2pt; mso-add-space: auto" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">Problem Signature 07:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <SPAN style="BACKGROUND: red; mso-highlight: red">1</SPAN><o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal; MARGIN: auto auto auto 8.2pt; mso-add-space: auto" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">Problem Signature 08:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <SPAN style="BACKGROUND: aqua; mso-highlight: aqua">2e</SPAN><o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal; MARGIN: auto auto auto 8.2pt; mso-add-space: auto" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">Problem Signature 09:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.InvalidOperationException<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal; MARGIN: auto auto auto 8.2pt; mso-add-space: auto" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">OS Version:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.0.6001.2.1.0.272.7<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal; MARGIN: auto auto auto 8.2pt; mso-add-space: auto" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">Locale ID:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1033<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="COLOR: #1f497d; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-ascii-font-family: Calibri"><o:p><FONT size=3 face="Times New Roman">&nbsp;</FONT></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="COLOR: #1f497d"><FONT size=3><FONT face="Times New Roman">The Problem Signature 07 is MethodDef token. And SOS provides !Token2EE command to find the token. The trick here is that it trimmed “06” from the top, so its original value should be 0600000 + the value you see from Problem Signature 07 which is <SPAN style="BACKGROUND: lime; mso-highlight: lime">06</SPAN><SPAN style="BACKGROUND: red; mso-highlight: red">000001</SPAN> in this example.<o:p></o:p></FONT></FONT></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="COLOR: #1f497d"><o:p><FONT size=3 face="Times New Roman">&nbsp;</FONT></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="COLOR: #1f497d"><FONT size=3><FONT face="Times New Roman">Now use !Token2EE to figure out the method:<o:p></o:p></FONT></FONT></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="COLOR: #1f497d"><o:p><FONT size=3 face="Times New Roman">&nbsp;</FONT></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">0:003&gt; !Token2EE <SPAN style="BACKGROUND: yellow; mso-highlight: yellow">ConsoleApplication35</SPAN> <SPAN style="BACKGROUND: lime; mso-highlight: lime">06</SPAN><SPAN style="BACKGROUND: red; mso-highlight: red">000001</SPAN><o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">Module: 00112c5c (ConsoleApplication35.exe)<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">Token: 0x06000001<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">MethodDesc: 00112ff0<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">Name: ConsoleApplication35.Program.Main(System.String[])<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">JITTED Code Address: 001b0070<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="COLOR: #1f497d; mso-hansi-font-family: Calibri; mso-ascii-font-family: Calibri"><o:p><FONT size=3 face="Times New Roman">&nbsp;</FONT></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="COLOR: #1f497d"><FONT size=3><FONT face="Times New Roman">Now you use !dumpil to list all IL for the method and check the IL offset to find which line actually failed.<o:p></o:p></FONT></FONT></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="COLOR: #1f497d"><o:p><FONT size=3 face="Times New Roman">&nbsp;</FONT></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">0:003&gt; !dumpil 00112ff0<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">ilAddr = 00ee2050<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">IL_0000: nop <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">IL_0001: ldstr "notepad.exe"<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">IL_0006: ldnull <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">IL_0007: call System.Diagnostics.Process::Start <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">IL_000c: stloc.0 <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">.try<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">{<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">&nbsp; IL_000d: nop <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">&nbsp; IL_000e: ldloc.0 <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">&nbsp; IL_000f: callvirt System.Diagnostics.Process::WaitForExit <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">&nbsp; IL_0014: nop <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">&nbsp; IL_0015: nop <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">&nbsp; IL_0016: leave.s IL_0028<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">} // end .try<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">.finally<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">{<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">&nbsp; IL_0018: ldloc.0 <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">&nbsp; IL_0019: ldnull <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">&nbsp; IL_001a: ceq <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">&nbsp; IL_001c: stloc.1 <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">&nbsp; IL_001d: ldloc.1 <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">&nbsp; IL_001e: brtrue.s IL_0027<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">&nbsp; IL_0020: ldloc.0 <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">&nbsp; IL_0021: callvirt System.IDisposable::Dispose <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">&nbsp; IL_0026: nop <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">&nbsp; IL_0027: endfinally <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">} // end .finally<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">IL_0028: nop <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">IL_0029: newobj System.InvalidOperationException::.ctor <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="FONT-FAMILY: Consolas; COLOR: #1f497d; FONT-SIZE: 9pt">IL_00<SPAN style="BACKGROUND: aqua; mso-highlight: aqua">2e</SPAN>: throw<o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="COLOR: #1f497d; mso-hansi-font-family: Calibri; mso-ascii-font-family: Calibri"><o:p><FONT size=3 face="Times New Roman">&nbsp;</FONT></o:p></SPAN></P>
<P style="LINE-HEIGHT: normal" class=MsoNormalCxSpMiddle><SPAN style="COLOR: #1f497d"><FONT size=3><FONT face="Times New Roman">That’s it. <o:p></o:p></FONT></FONT></SPAN></P>]]></content:encoded>
    </item>
    <item>
      <title>Internal Manifest vs External Manifest</title>
      <link>https://docs.microsoft.com/archive/blogs/junfeng/internal-manifest-vs-external-manifest</link>
      <pubDate>Mon, 11 May 2009 11:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Junfeng Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/junfeng/2009/05/11/internal-manifest-vs-external-manifest/</guid>
      <description><![CDATA[Internal manifest is the RT_MANIFEST resource in the executable.&nbsp; 
External manifest is...]]></description>
      <content:encoded><![CDATA[<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Internal manifest is the RT_MANIFEST resource in the executable.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3 face=Calibri>External manifest is App.exe.manifest.</FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3 face=Calibri>In Windows XP, Sxs searches external manifest before internal manifest. If an external manifest is found, the internal manifest is ignored.</FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>In Windows Server 2003 and later, the order is reversed. <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>Internal manifest is preferred over external manifest. </FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3 face=Calibri>If you use external manifest, and your scenario works in Windows XP, but not Windows Server 2003 and later, please double check the executable does not have an internal manifest</FONT></P>]]></content:encoded>
    </item>
    <item>
      <title>CLR HRESULT</title>
      <link>https://docs.microsoft.com/archive/blogs/junfeng/clr-hresult</link>
      <pubDate>Mon, 02 Mar 2009 11:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Junfeng Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/junfeng/2009/03/02/clr-hresult/</guid>
      <description><![CDATA[CLR HRESULT’ facility code is 0x13. If an HRESULT error is 0x8013xxxx, it is likely a CLR error....]]></description>
      <content:encoded><![CDATA[<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>CLR HRESULT’ facility code is 0x13. If an HRESULT error is 0x8013xxxx, it is likely a CLR error. </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>All CLR errors are defined in CorError.h. You can find CorError.h in your Visual Studio install (or Microsoft Platform SDK).</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="COLOR: #1f497d"><FONT size=3><FONT face=Calibri><EM><STRONG>C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\CorError.h<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></STRONG></EM></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>For example, </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>#define FUSION_E_REF_DEF_MISMATCH<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>EMAKEHR(0x1040)<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>// The located assembly's manifest definition does not match the assembly reference.</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>That is, 0x80131040 is FUSION_E_REF_DEF_MISMATCH.</FONT></P>]]></content:encoded>
    </item>
    <item>
      <title>Be careful about exception after resource allocation</title>
      <link>https://docs.microsoft.com/archive/blogs/junfeng/be-careful-about-exception-after-resource-allocation</link>
      <pubDate>Mon, 02 Feb 2009 11:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Junfeng Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/junfeng/2009/02/02/be-careful-about-exception-after-resource-allocation/</guid>
      <description><![CDATA[The following is a common code pattern
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Resource resource...]]></description>
      <content:encoded><![CDATA[<p class="MsoNormal" style="margin: 0in 0in 10pt;"><font size="3" face="Calibri">The following is a common code pattern</font></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 9pt; font-family: 新宋体;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(43, 145, 175);">Resource</span> resource = GetResource();<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 9pt; font-family: 新宋体;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>DoWork();<span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: 9pt; line-height: 115%; font-family: 新宋体;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">return</span> resource;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><font size="3" face="Calibri">If DoWork() throws exception, the resource will be leaked. We need to guard against this. </font></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><font size="3" face="Calibri">For example</font></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 9pt; font-family: 新宋体;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">bool</span> success = <span style="color: blue;">false</span>;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 9pt; font-family: 新宋体;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(43, 145, 175);">Resource</span> resource = GetResource();<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 9pt; font-family: 新宋体;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">try<o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 9pt; font-family: 新宋体;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 9pt; font-family: 新宋体;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>DoWork();<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 9pt; font-family: 新宋体;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>success = <span style="color: blue;">true</span>;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 9pt; font-family: 新宋体;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">return</span> resource;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 9pt; font-family: 新宋体;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 9pt; font-family: 新宋体;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">finally<o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 9pt; font-family: 新宋体;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 9pt; font-family: 新宋体;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">if</span> (!success)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 9pt; font-family: 新宋体;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 9pt; font-family: 新宋体;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>DisposeResource(resource);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 9pt; font-family: 新宋体;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: 9pt; line-height: 115%; font-family: 新宋体;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Exception Filter</title>
      <link>https://docs.microsoft.com/archive/blogs/junfeng/exception-filter</link>
      <pubDate>Mon, 08 Dec 2008 11:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Junfeng Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/junfeng/2008/12/08/exception-filter/</guid>
      <description><![CDATA[C# does not support exception filter. However, VB and IL support it. To add exception filter to C#,...]]></description>
      <content:encoded><![CDATA[<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>C# does not support exception filter. However, VB and IL support it. To add exception filter to C#, we can build a function in VB or IL, then call it in C#. </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>The example below is one way we may implement the function to support exception filter. It asks the caller to provide four delegates, and call them at the right places. </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes">Imports</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"> Microsoft.VisualBasic<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes">Namespace</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"> Utility<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">Public</SPAN> <SPAN style="COLOR: blue">Delegate</SPAN> <SPAN style="COLOR: blue">Sub</SPAN> TryDelegate()<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">Public</SPAN> <SPAN style="COLOR: blue">Delegate</SPAN> <SPAN style="COLOR: blue">Function</SPAN> FilterDelegate(<SPAN style="COLOR: blue">ByVal</SPAN> exception <SPAN style="COLOR: blue">As</SPAN> System.Exception) <SPAN style="COLOR: blue">As</SPAN> <SPAN style="COLOR: blue">Boolean<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">Public</SPAN> <SPAN style="COLOR: blue">Delegate</SPAN> <SPAN style="COLOR: blue">Sub</SPAN> CatchDelegate(<SPAN style="COLOR: blue">ByVal</SPAN> exception <SPAN style="COLOR: blue">As</SPAN> System.Exception)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">Public</SPAN> <SPAN style="COLOR: blue">Delegate</SPAN> <SPAN style="COLOR: blue">Sub</SPAN> FinallyDelegate()<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">Public</SPAN> <SPAN style="COLOR: blue">Class</SPAN> ExceptionFilter<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">Inherits</SPAN> System.Object<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">Public</SPAN> <SPAN style="COLOR: blue">Shared</SPAN> <SPAN style="COLOR: blue">Sub</SPAN> TryFilterCatch(<SPAN style="COLOR: blue">ByVal</SPAN> tryDelegate <SPAN style="COLOR: blue">As</SPAN> TryDelegate, <SPAN style="COLOR: blue">ByVal</SPAN> filterDelegate <SPAN style="COLOR: blue">As</SPAN> FilterDelegate, <SPAN style="COLOR: blue">ByVal</SPAN> catchDelegate <SPAN style="COLOR: blue">As</SPAN> CatchDelegate, <SPAN style="COLOR: blue">ByVal</SPAN> finallyDelegate <SPAN style="COLOR: blue">As</SPAN> FinallyDelegate)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">Try<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>tryDelegate()<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">Catch</SPAN> ex <SPAN style="COLOR: blue">As</SPAN> System.Exception <SPAN style="COLOR: blue">When</SPAN> catchDelegate &lt;&gt; <SPAN style="COLOR: blue">Nothing</SPAN> <SPAN style="COLOR: blue">And</SPAN> filterDelegate(ex)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>catchDelegate(ex)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">Finally<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;</SPAN><SPAN style="COLOR: blue">If</SPAN> (finallyDelegate &lt;&gt; <SPAN style="COLOR: blue">Nothing</SPAN>) <SPAN style="COLOR: blue">Then<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>finallyDelegate()<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">End</SPAN> <SPAN style="COLOR: blue">If<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">End</SPAN> <SPAN style="COLOR: blue">Try<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">End</SPAN> <SPAN style="COLOR: blue">Sub<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">End</SPAN> <SPAN style="COLOR: blue">Class<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes">End</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"> <SPAN style="COLOR: blue">Namespace<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3></FONT>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>In C# we can call Utility.TryFilterCatch as the following:</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"> System;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p></o:p></SPAN></P><SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"> Utility;<o:p></o:p></SPAN> 
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes">namespace</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"> ExceptionFilterUsage<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes">{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">class</SPAN> <SPAN style="COLOR: #2b91af">Program<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: blue">void</SPAN> Main(<SPAN style="COLOR: blue">string</SPAN>[] args)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">TryDelegate</SPAN> tryDelegate = <SPAN style="COLOR: blue">delegate</SPAN>() <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Console</SPAN>.WriteLine(<SPAN style="COLOR: #a31515">"In try."</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">throw</SPAN> <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">ApplicationException</SPAN>(); <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>};<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">FilterDelegate</SPAN> filterDelegate = <SPAN style="COLOR: blue">delegate</SPAN>(<SPAN style="COLOR: #2b91af">Exception</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Console</SPAN>.WriteLine(<SPAN style="COLOR: #a31515">"In exception filter."</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (e <SPAN style="COLOR: blue">is</SPAN> <SPAN style="COLOR: #2b91af">ApplicationException</SPAN>)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Console</SPAN>.WriteLine(<SPAN style="COLOR: #a31515">"ApplicationException is thrown, which should never happen."</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">return</SPAN> <SPAN style="COLOR: blue">false</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">return</SPAN> <SPAN style="COLOR: blue">true</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>};<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">CatchDelegate</SPAN> catchDelegate = <SPAN style="COLOR: blue">delegate</SPAN>(<SPAN style="COLOR: #2b91af">Exception</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Console</SPAN>.WriteLine(<SPAN style="COLOR: #a31515">"In Catch: Exception: {0}"</SPAN>, e);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>};<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">FinallyDelegate</SPAN> finallyDelegate = <SPAN style="COLOR: blue">delegate</SPAN>()<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Console</SPAN>.WriteLine(<SPAN style="COLOR: #a31515">"In finally."</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>};<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #2b91af">ExceptionFilter</SPAN>.TryFilterCatch(tryDelegate, filterDelegate, catchDelegate, finallyDelegate);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes">}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><o:p><FONT face=Calibri size=3>&nbsp;</FONT></o:p></P>]]></content:encoded>
    </item>
    <item>
      <title>ThreadPool.BindHandle</title>
      <link>https://docs.microsoft.com/archive/blogs/junfeng/threadpool-bindhandle</link>
      <pubDate>Mon, 01 Dec 2008 11:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Junfeng Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/junfeng/2008/12/01/threadpool-bindhandle/</guid>
      <description><![CDATA[I mentioned that we can use ThreadPool.BindHandle to implement asynchronous IO. Here are roughly the...]]></description>
      <content:encoded><![CDATA[<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>I </FONT><A href="https://blogs.msdn.com/junfeng/archive/2008/11/24/threadpool-unsafequeuenativeoverlapped.aspx" mce_href="https://blogs.msdn.com/junfeng/archive/2008/11/24/threadpool-unsafequeuenativeoverlapped.aspx"><FONT face=Calibri size=3>mentioned</FONT></A><FONT face=Calibri size=3> that we can use </FONT><A href="https://msdn.microsoft.com/en-us/library/system.threading.threadpool.bindhandle.aspx" mce_href="https://msdn.microsoft.com/en-us/library/system.threading.threadpool.bindhandle.aspx"><FONT face=Calibri size=3>ThreadPool.BindHandle</FONT></A><FONT face=Calibri size=3> to implement asynchronous IO. Here are roughly the steps necessary to make it happen:</FONT></P>
<P class=MsoListParagraph style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT face=Calibri size=3>1.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT face=Calibri size=3>Create an overlapped file handle</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">SafeFileHandle</SPAN> handle = CreateFile(<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>filename,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Win32.GENERIC_READ_ACCESS,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Win32.FILE_SHARE_READ | Win32.FILE_SHARE_WRITE | Win32.FILE_SHARE_DELETE,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>(<SPAN style="COLOR: #2b91af">IntPtr</SPAN>)<SPAN style="COLOR: blue">null</SPAN>,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Win32.OPEN_EXISTING,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Win32.FILE_FLAG_OVERLAPPED,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">SafeFileHandle</SPAN>(<SPAN style="COLOR: #2b91af">IntPtr</SPAN>.Zero, <SPAN style="COLOR: blue">false</SPAN>));<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>[<SPAN style="COLOR: #2b91af">DllImport</SPAN>(<SPAN style="COLOR: #a31515">"kernel32.dll"</SPAN>, CharSet = <SPAN style="COLOR: #2b91af">CharSet</SPAN>.Auto, SetLastError = <SPAN style="COLOR: blue">true</SPAN>)]<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: blue">extern</SPAN> <SPAN style="COLOR: #2b91af">SafeFileHandle</SPAN> CreateFile(<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">string</SPAN> lpFileName,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">uint</SPAN> dwDesiredAccess,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">uint</SPAN> dwShareMode,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">//SECURITY_ATTRIBUTES lpSecurityAttributes,<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">IntPtr</SPAN> lpSecurityAttributes,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">uint</SPAN> dwCreationDisposition,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">int</SPAN> dwFlagsAndAttributes,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">SafeFileHandle</SPAN> hTemplateFile);<o:p></o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT face=Calibri size=3>2.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT face=Calibri size=3>Bind the handle to thread pool. </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (!<SPAN style="COLOR: #2b91af">ThreadPool</SPAN>.BindHandle(handle))<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Console</SPAN>.WriteLine(<SPAN style="COLOR: #a31515">"Fail to BindHandle to threadpool."</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">return</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt 0.25in"><SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT face=Calibri size=3>3.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT face=Calibri size=3>Prepare your asynchronous IO callback. </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">byte</SPAN>[] bytes = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: blue">byte</SPAN>[0x8000];<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">IOCompletionCallback</SPAN> iocomplete = <SPAN style="COLOR: blue">delegate</SPAN>(<SPAN style="COLOR: blue">uint</SPAN> errorCode, <SPAN style="COLOR: blue">uint</SPAN> numBytes, <SPAN style="COLOR: #2b91af">NativeOverlapped</SPAN>* _overlapped)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">unsafe<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">try<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (errorCode == Win32.ERROR_HANDLE_EOF)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Console</SPAN>.WriteLine(<SPAN style="COLOR: #a31515">"End of file in callback."</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: blue">if</SPAN> (errorCode != 0 &amp;&amp; numBytes != 0)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Console</SPAN>.WriteLine(<SPAN style="COLOR: #a31515">"Error {0} when reading file."</SPAN>, errorCode);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Console</SPAN>.WriteLine(<SPAN style="COLOR: #a31515">"Read {0} bytes."</SPAN>, numBytes);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">finally<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Overlapped</SPAN>.Free(pOverlapped);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>};<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT face=Calibri size=3>4.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT face=Calibri size=3>Create a NativeOverlapped* pointer. </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Overlapped</SPAN> overlapped = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">Overlapped</SPAN>();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">NativeOverlapped</SPAN>* pOverlapped = overlapped.Pack(iocomplete, bytes);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt 0.25in"><SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>pOverlapped-&gt;OffsetLow = (<SPAN style="COLOR: blue">int</SPAN>)offset;</SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT face=Calibri size=3>5.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT face=Calibri size=3>Call the asynchronous IO API and pass the NativeOverlapped * to it. </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">fixed</SPAN> (<SPAN style="COLOR: blue">byte</SPAN>* p = bytes)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>r = ReadFile(handle, p, bytes.Length, <SPAN style="COLOR: #2b91af">IntPtr</SPAN>.Zero, pOverlapped);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (r == 0)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>r = <SPAN style="COLOR: #2b91af">Marshal</SPAN>.GetLastWin32Error();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (r == Win32.ERROR_HANDLE_EOF)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Console</SPAN>.WriteLine(<SPAN style="COLOR: #a31515">"Done."</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">break</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (r != Win32.ERROR_IO_PENDING)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Console</SPAN>.WriteLine(<SPAN style="COLOR: #a31515">"Failed to read file. LastError is {0}"</SPAN>, <SPAN style="COLOR: #2b91af">Marshal</SPAN>.GetLastWin32Error());<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Overlapped</SPAN>.Free(pOverlapped);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">return</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>[<SPAN style="COLOR: #2b91af">DllImport</SPAN>(<SPAN style="COLOR: #a31515">"KERNEL32.dll"</SPAN>, SetLastError = <SPAN style="COLOR: blue">true</SPAN>)]<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">unsafe</SPAN> <SPAN style="COLOR: blue">internal</SPAN> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: blue">extern</SPAN> <SPAN style="COLOR: blue">int</SPAN> ReadFile(<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">SafeFileHandle</SPAN> handle,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">byte</SPAN>* bytes,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">int</SPAN> numBytesToRead,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">IntPtr</SPAN> numBytesRead_mustBeZero,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">NativeOverlapped</SPAN>* overlapped);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt 0.25in"><FONT face=Calibri size=3>Your IO callback will be invoked by CLR thread when the IO completed. </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt 0.25in"><FONT face=Calibri size=3></FONT>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt 0.25in"><FONT face=Calibri size=3>So when should you use ThreadPool.BindHandle? The answer is almost *Never*. .Net Framework's FileStream class internally uses ThreadPool.BindHandle to implement the async IO. You should always use FileStream if possible. </FONT></P>]]></content:encoded>
    </item>
    <item>
      <title>ThreadPool.UnsafeQueueNativeOverlapped</title>
      <link>https://docs.microsoft.com/archive/blogs/junfeng/threadpool-unsafequeuenativeoverlapped</link>
      <pubDate>Mon, 24 Nov 2008 11:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Junfeng Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/junfeng/2008/11/24/threadpool-unsafequeuenativeoverlapped/</guid>
      <description><![CDATA[CLR’s thread pool has two pools of threads. The first pool is used by...]]></description>
      <content:encoded><![CDATA[<P><SPAN lang=EN style="mso-ansi-language: EN"><FONT size=3><FONT face="Times New Roman"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></SPAN></P>
<P><SPAN lang=EN style="mso-ansi-language: EN"><FONT face="Times New Roman" size=3>CLR’s thread pool has two pools of threads. The first pool is used by </FONT><A href="https://msdn.microsoft.com/en-us/library/system.threading.threadpool.queueuserworkitem.aspx" target=_blank><FONT face="Times New Roman" size=3>ThreadPool.QueueUserWorkItem</FONT></A><FONT face="Times New Roman" size=3>. The second pool is an IoCompletionPort thread pool used by </FONT><A href="https://msdn.microsoft.com/en-us/library/system.threading.threadpool.bindhandle.aspx" target=_blank><FONT face="Times New Roman" size=3>ThreadPool.BindHandle</FONT></A><FONT face="Times New Roman" size=3> and </FONT><A href="https://msdn.microsoft.com/en-us/library/system.threading.threadpool.unsafequeuenativeoverlapped.aspx" target=_blank><FONT face="Times New Roman" size=3>ThreadPool.UnsafeQueueNativeOverlapped</FONT></A><FONT size=3><FONT face="Times New Roman">. <o:p></o:p></FONT></FONT></SPAN></P>
<P><SPAN lang=EN style="mso-ansi-language: EN"><FONT face="Times New Roman" size=3>ThreadPool.BindHandle is used by CLR to implement asynchronous IO. For example, </FONT><A href="https://msdn.microsoft.com/en-us/library/system.io.filestream.aspx" target=_blank><FONT face="Times New Roman" size=3>FileStream</FONT></A><FONT size=3><FONT face="Times New Roman"> uses it to implement BeginRead/BeginWrite. Developers can take advantage of it too. We will talk about that in a separate article. <o:p></o:p></FONT></FONT></SPAN></P>
<P><SPAN lang=EN style="mso-ansi-language: EN"><FONT size=3><FONT face="Times New Roman">ThreadPool.UnsafeQueueNativeOverlapped can be used to queue a non IO work item to the IoCompletionPort thread pool, just like ThreadPool.QueueUserWorkItem. <o:p></o:p></FONT></FONT></SPAN></P>
<P><SPAN lang=EN style="mso-ansi-language: EN"><FONT size=3><FONT face="Times New Roman">Why will you want to use ThreadPool.UnsafeQueueNativeOverlapped instead of ThreadPool.QueueUserWorkItem?<o:p></o:p></FONT></FONT></SPAN></P>
<P><SPAN lang=EN style="mso-ansi-language: EN"><FONT size=3><FONT face="Times New Roman">In our development, we discover an inefficiency of ThreadPool.QueueUserWorkItem. If we have some alternate high and low number of work items, some of the threads may do busy waiting, artificially increase the CPU usage of our application. <o:p></o:p></FONT></FONT></SPAN></P>
<P><SPAN lang=EN style="mso-ansi-language: EN"><FONT size=3><FONT face="Times New Roman">If you have the same pattern, and you have observed high CPU usage when it should not, you can try ThreadPool.UnsafeQueueNativeOverlapped. <o:p></o:p></FONT></FONT></SPAN></P>
<P><SPAN lang=EN style="mso-ansi-language: EN"><FONT size=3><FONT face="Times New Roman">The following is an example how to ThreadPool.UnsafeQueueNativeOverlapped. <o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"> System;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"> System.Runtime.InteropServices;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"> System.Threading;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes">namespace</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"> UQNO<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes">{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">internal</SPAN> <SPAN style="COLOR: blue">class</SPAN> <SPAN style="COLOR: #2b91af">AsyncHelper<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">WaitCallback</SPAN> callback;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">object</SPAN> state;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">internal</SPAN> AsyncHelper(<SPAN style="COLOR: #2b91af">WaitCallback</SPAN> callback, <SPAN style="COLOR: blue">object</SPAN> state)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">this</SPAN>.callback = callback;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">this</SPAN>.state = state;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">unsafe</SPAN> <SPAN style="COLOR: blue">internal</SPAN> <SPAN style="COLOR: blue">void</SPAN> Callback(<SPAN style="COLOR: blue">uint</SPAN> errorCode, <SPAN style="COLOR: blue">uint</SPAN> numBytes, <SPAN style="COLOR: #2b91af">NativeOverlapped</SPAN>* _overlapped)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">try<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">this</SPAN>.callback(<SPAN style="COLOR: blue">this</SPAN>.state);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">finally<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Overlapped</SPAN>.Free(_overlapped);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">class</SPAN> <SPAN style="COLOR: #2b91af">Program<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: blue">void</SPAN> Main(<SPAN style="COLOR: blue">string</SPAN>[] args)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">ManualResetEvent</SPAN> wait = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">ManualResetEvent</SPAN>(<SPAN style="COLOR: blue">false</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">WaitCallback</SPAN> callback = <SPAN style="COLOR: blue">delegate</SPAN>(<SPAN style="COLOR: blue">object</SPAN> state)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Console</SPAN>.WriteLine(<SPAN style="COLOR: #a31515">"callback is executed in thread id {0} name {1}"</SPAN>, <SPAN style="COLOR: #2b91af">Thread</SPAN>.CurrentThread.ManagedThreadId, <SPAN style="COLOR: #2b91af">Thread</SPAN>.CurrentThread.Name);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">ManualResetEvent</SPAN> _wait = (<SPAN style="COLOR: #2b91af">ManualResetEvent</SPAN>)state;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>_wait.Set();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>};<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>AsyncHelper ah = <SPAN style="COLOR: blue">new</SPAN> AsyncHelper(callback, wait);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">unsafe<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Overlapped</SPAN> overlapped = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">Overlapped</SPAN>();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">NativeOverlapped</SPAN>* pOverlapped = overlapped.Pack(ah.Callback, <SPAN style="COLOR: blue">null</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">ThreadPool</SPAN>.UnsafeQueueNativeOverlapped(pOverlapped);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>wait.WaitOne();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes">}</SPAN></P>]]></content:encoded>
    </item>
    <item>
      <title>Conversion between System.String and char *</title>
      <link>https://docs.microsoft.com/archive/blogs/junfeng/conversion-between-system-string-and-char</link>
      <pubDate>Mon, 11 Aug 2008 11:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Junfeng Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/junfeng/2008/08/11/conversion-between-system-string-and-char/</guid>
      <description><![CDATA[We can convert a char * to System.String with System.String’s constructor
string str = new...]]></description>
      <content:encoded><![CDATA[<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>We can convert a char * to System.String with System.String’s constructor</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN lang=EN style="FONT-FAMILY: 'Lucida Console'; mso-ansi-language: EN"><FONT size=3>string str = new string((char*)p);</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>And for the reverse:</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN lang=EN style="FONT-FAMILY: 'Lucida Console'; mso-ansi-language: EN"><FONT size=3>fixed(char *p = str){}<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>Why do we care about conversion between System.String and char *? </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>From </FONT><A href="https://blogs.msdn.com/junfeng/archive/2007/07/09/reverse-p-invoke-marshaling-performance.aspx"><FONT face=Calibri size=3>this article</FONT></A><FONT face=Calibri size=3>, this is the fastest way to marshal strings between managed and native boundary. </FONT></P>]]></content:encoded>
    </item>
    <item>
      <title>XXX is not a valid Win32 application</title>
      <link>https://docs.microsoft.com/archive/blogs/junfeng/xxx-is-not-a-valid-win32-application</link>
      <pubDate>Mon, 04 Aug 2008 11:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Junfeng Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/junfeng/2008/08/04/xxx-is-not-a-valid-win32-application/</guid>
      <description><![CDATA[If you have used your Vista SP1-based computer for extended period, you may experience some problems...]]></description>
      <content:encoded><![CDATA[<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>If you have used your Vista SP1-based computer for extended period, you may experience some problems starting large applications, for example, Office 2007 applications. Specifically, you may receive a message “XXX is not a valid Win32 application”.</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>If you do experience this problem, you can install hotfix KB952709. </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3><A href="https://support.microsoft.com/kb/952709/">https://support.microsoft.com/kb/952709/</A></FONT></P>]]></content:encoded>
    </item>
  </channel>
</rss>