<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type='text/xsl' href='http://bertjansen.spaces.live.com/mmm2008-07-24_12.50/rsspretty.aspx?rssquery=en-US;http%3a%2f%2fbertjansen.spaces.live.com%2ffeed.rss' version='1.0'?><rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:msn="http://schemas.microsoft.com/msn/spaces/2005/rss" xmlns:live="http://schemas.microsoft.com/live/spaces/2006/rss" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Bert's weblog</title><description>A collection of things lingering in my mind</description><link>http://bertjansen.spaces.live.com/</link><language>en-US</language><pubDate>Mon, 04 Aug 2008 09:53:58 GMT</pubDate><lastBuildDate>Mon, 04 Aug 2008 09:53:58 GMT</lastBuildDate><generator>Microsoft Spaces v1.1</generator><docs>http://www.rssboard.org/rss-specification</docs><ttl>60</ttl><live:identity><live:id>-2759794756127330307</live:id><live:alias>bertjansen</live:alias></live:identity><cf:listinfo><cf:group ns="http://schemas.microsoft.com/live/spaces/2006/rss" element="typelabel" label="Type" /><cf:group ns="http://schemas.microsoft.com/live/spaces/2006/rss" element="tag" label="Tag" /><cf:group element="category" label="Category" /><cf:sort element="pubDate" label="Date" data-type="date" default="true" /><cf:sort element="title" label="Title" data-type="string" /><cf:sort ns="http://purl.org/rss/1.0/modules/slash/" element="comments" label="Comments" data-type="number" /></cf:listinfo><item><title>Miguel de Icaza says that the EU Prosecutors are Wrong.</title><link>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!210.entry</link><description>&lt;p&gt; &lt;p&gt;  &lt;p&gt;Miguel de Icaza wrote a an article about the war that's going on between Microsoft and the EU, especially about the new open XML formats used in Microsoft Office 2007. He states that's there's nothing wrong with these formats and fighting against them is pointless... According to him the only thing the open source community could do is making Open Office a better product than Microsoft Office 2007, and that to me sounds as a nearly impossible task to complete :-) &lt;p&gt;&lt;a href="http://tirania.org/blog/archive/2007/Jan-30.html"&gt;Link to Miguel de Icaza: The EU Prosecutors are Wrong.&lt;/a&gt;  &lt;div style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px"&gt;Technorati tags: &lt;a href="http://technorati.com/tags/Office 2007" rel=tag&gt;Office 2007&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Miguel de Icaza" rel=tag&gt;Miguel de Icaza&lt;/a&gt;&lt;/div&gt;      &lt;div style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px"&gt;del.icio.us tags: &lt;a href="http://del.icio.us/popular/office 2007" rel=tag&gt;office 2007&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/Miguel de Icaza" rel=tag&gt;Miguel de Icaza&lt;/a&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2759794756127330307&amp;page=RSS%3a+Miguel+de+Icaza+says+that+the+EU+Prosecutors+are+Wrong.&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bertjansen.spaces.live.com&amp;amp;GT1=bertjansen"&gt;</description><comments>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!210.entry#comment</comments><guid isPermaLink="true">http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!210.entry</guid><pubDate>Wed, 31 Jan 2007 06:31:00 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bertjansen.spaces.live.com/blog/cns!D9B33D4A940B6FFD!210/comments/feed.rss</wfw:commentRss><wfw:comment>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!210.entry#comment</wfw:comment><dcterms:modified>2007-01-31T06:31:00Z</dcterms:modified></item><item><title>Don’t Click It</title><link>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!205.entry</link><description>&lt;p&gt; &lt;p&gt;&lt;a href="http://www.dontclick.it/"&gt;Don’t Click It&lt;/a&gt; is an experiment in human interface design. It is a strange one. &lt;p&gt;You are allowed one click to start off the interface, and from then on as you use the mouse to grok the interface, you are warned not to click. &lt;p&gt;If you do so, you shock the monkey and you are asked why you clicked. If you haven’t clicked in awhile you will be surveyed on if you miss it: “Do you miss the click within this interface”. &lt;p&gt;It is highly strange to navigate for an extended period without clicking. &lt;p&gt;&lt;a href="http://www.dontclick.it/"&gt;&lt;img height=345 alt="Don\'t click it" src="http://ajaxian.com/wp-content/images/dontclickit.png" width=282 border=0&gt;&lt;/a&gt;  &lt;p&gt;  &lt;p&gt; &lt;div&gt;Technorati tags: &lt;a href="http://technorati.com/tags/Mouse" rel=tag&gt;Mouse&lt;/a&gt;, &lt;a href="http://technorati.com/tags/User Interface Design" rel=tag&gt;User Interface Design&lt;/a&gt;&lt;/div&gt;  &lt;div&gt;del.icio.us tags: &lt;a href="http://del.icio.us/popular/Mouse" rel=tag&gt;Mouse&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/User Interface Design" rel=tag&gt;User Interface Design&lt;/a&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2759794756127330307&amp;page=RSS%3a+Don%e2%80%99t+Click+It&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bertjansen.spaces.live.com&amp;amp;GT1=bertjansen"&gt;</description><comments>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!205.entry#comment</comments><guid isPermaLink="true">http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!205.entry</guid><pubDate>Mon, 30 Oct 2006 07:25:20 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bertjansen.spaces.live.com/blog/cns!D9B33D4A940B6FFD!205/comments/feed.rss</wfw:commentRss><wfw:comment>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!205.entry#comment</wfw:comment><dcterms:modified>2006-10-30T07:25:20Z</dcterms:modified></item><item><title>Visual Studio 2005 IDE Enhancements</title><link>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!204.entry</link><description>&lt;p&gt;  &lt;p&gt;Microsoft has released a set of Visual Studio enhancements that are designed to make you more productive. These enhancements where previously part of the Visual Studio SDK, but are now available as a separate download. Features included are: &lt;ul&gt; &lt;li&gt;&lt;b&gt;Source Code Outliner &lt;/b&gt;: The Source Outliner tool is a Visual Studio extension that provides a tree view of your source code's types and members and lets you quickly navigate to them inside the editor. &lt;li&gt;&lt;b&gt;Visual C++ Code Snippets&lt;/b&gt;:The Visual C++ Code Snippets tool lets you insert snippets in your code by using a pop-up menu that contains programming keywords. VB.NET and C# languages have this functionality in Visual Studio 2005.  &lt;li&gt;&lt;b&gt;Indexed Find &lt;/b&gt;: The Indexed Find tool is a Visual Studio extension that uses the Microsoft Indexing Service to provide improved Search capabilities to the integrated development environment (IDE). It sends the results of a search to the Output Window. &lt;li&gt;&lt;b&gt;Super Diff Utility&lt;/b&gt;: The Super Diff Find tool is a Visual Studio extension that compares text files. It uses color coding and graphics to show the difference between the files in deleted text (red), changed text (blue), inserted text (green).  &lt;li&gt;&lt;b&gt;Event Toaster Utility&lt;/b&gt;: The Event Toaster tool is a Visual Studio extension that notifies users about specific events within the Visual Studio IDE.&lt;/ul&gt; &lt;p&gt;This is a free download which &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=cd7c6e48-e41b-48e3-881e-a0e6e97f9534&amp;amp;DisplayLang=en"&gt;can be obtained here&lt;/a&gt;. &lt;p&gt; &lt;div&gt;del.icio.us tags: &lt;a href="http://del.icio.us/popular/Visual Studio 2005" rel=tag&gt;Visual Studio 2005&lt;/a&gt;&lt;/div&gt;         &lt;div&gt;Technorati tags: &lt;a href="http://technorati.com/tags/Visual Studio 2005" rel=tag&gt;Visual Studio 2005&lt;/a&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2759794756127330307&amp;page=RSS%3a+Visual+Studio+2005+IDE+Enhancements&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bertjansen.spaces.live.com&amp;amp;GT1=bertjansen"&gt;</description><comments>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!204.entry#comment</comments><guid isPermaLink="true">http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!204.entry</guid><pubDate>Sun, 29 Oct 2006 13:36:47 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bertjansen.spaces.live.com/blog/cns!D9B33D4A940B6FFD!204/comments/feed.rss</wfw:commentRss><wfw:comment>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!204.entry#comment</wfw:comment><dcterms:modified>2006-10-29T13:36:47Z</dcterms:modified></item><item><title>Fetching TCP/IP routing information using C#...and P/Invoke, part 2</title><link>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!202.entry</link><description>&lt;p&gt;  &lt;p&gt;Recently I wrote about &lt;a href="http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!191.entry"&gt;TCP/IP routing&lt;/a&gt; and how to &lt;a href="http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!192.entry"&gt;list the routing table using C#&lt;/a&gt;. In this article I'll continue this subject, but before digging into code I'll explain why I wrote this code: &lt;blockquote&gt; &lt;p&gt;I've architected a typical smart client application with as major requirement to be able to work online and offline and very important to work using expensive and sometimes slow communication technologies like GPRS and UMTS (3G). In this application it's crucial that we know which network adapter is used for communication with the back office because we do need to upload locally generated docs. If we would do this using a pay-per-bit type technology like GPRS or UMTS then this would be very costly... In essence knowing the used network adapter gives you the capability to gradually allow more application features depending on the type, speed and stability of the used network.&lt;/blockquote&gt; &lt;p&gt;&lt;strong&gt;1. A slight update of the code mentioned in &lt;/strong&gt;&lt;a href="http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!192.entry"&gt;&lt;strong&gt;list the routing table using C#&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;: instead of displaying the route information it will be stored in a list of IPRouteTable objects which are defined like this:&lt;/strong&gt; &lt;p&gt; &lt;div&gt;IPRouteTable class: - &lt;a style=""&gt;Copy Code&lt;/a&gt;&lt;pre style="width:100%"&gt;&lt;div&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;class&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; IPRouteTable
{
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;private&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ifIndex &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 128)"&gt;0&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;;
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;private&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;string&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ifIP &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;;
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;private&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ifMetric &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 128)"&gt;0&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;;
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;private&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;string&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ifName &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;;
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;private&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;string&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ifDescription &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;;
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;private&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; NetworkInterfaceType ifType;
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;private&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; OperationalStatus ifStatus;
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;private&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;long&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ifSpeed &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 128)"&gt;0&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;;

    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;string&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; IfName
    {
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;get&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;return&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ifName; }
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;set&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { ifName &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; value; }
    }

    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;string&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; IfDescription
    {
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;get&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;return&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ifDescription; }
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;set&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { ifDescription &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; value; }
    }

    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; NetworkInterfaceType IfType
    {
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;get&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;return&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ifType; }
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;set&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { ifType &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; value; }
    }

    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; OperationalStatus IfStatus
    {
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;get&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;return&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ifStatus; }
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;set&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { ifStatus &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; value; }
    }

    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;long&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; IfSpeed
    {
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;get&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;return&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ifSpeed; }
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;set&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { ifSpeed &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; value; }
    }

    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; IPRouteTable(&lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ifIndex, &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ifMetric)
    {
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;this&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;.ifIndex &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ifIndex;
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;this&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;.ifMetric &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ifMetric;
    }

    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; IfIndex
    {
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;get&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;return&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ifIndex; }
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;set&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { ifIndex &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; value; }
    }

    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;string&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; IfIP
    {
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;get&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;return&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ifIP; }
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;set&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { ifIP &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; value; }
    }

    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; IfMetric
    {
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;get&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;return&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ifMetric; }
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;set&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { ifMetric &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; value; }
    }

}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;
&lt;p&gt;The code below replaces the Console.WriteLine part from my previous code :
&lt;div&gt;&lt;a style=""&gt;Copy Code&lt;/a&gt;&lt;pre style="width:100%"&gt;&lt;div&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;for&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; (&lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; i &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 128)"&gt;0&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;; i &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; entries; i&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;++&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;)
{

    ip &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; IPToString(IPAddress.NetworkToHostOrder(table[i].dwForwardDest));

    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;if&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; (ip &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;==&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;0.0.0.0&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;)
    {
        ipRoute &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;new&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; IPRouteTable(table[i].dwForwardIfIndex, table[i].dwForwardMetric1);
        ipRouteList.Add(ipRoute);
    }
}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;All routes with forward destination of 0.0.0.0 are added because these all are default routes.
&lt;p&gt;&lt;strong&gt;2. Complete the information in the IPRouteTable objects with the IP address of the used adapter for each default route:&lt;/strong&gt;
&lt;p&gt;We start with the necessary structs and DLL imports:
&lt;p&gt;
&lt;div&gt;&lt;a style=""&gt;Copy Code&lt;/a&gt;&lt;pre style="width:100%"&gt;&lt;div&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;[StructLayout(LayoutKind.Sequential)]
&lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;struct&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; MIB_IPADDRROW
{
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; dwAddr;
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; dwIndex;
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; dwMask;
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; dwBCastAddr;
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; dwReasmSize;
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;short&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; unused1;
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;short&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; unused2;
}

[DllImport(&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;IpHlpApi.dll&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;)]
&lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;static&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;extern&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; GetIpAddrTable(
  IntPtr pIpAddrTable,
  &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;ref&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; pdwSize,
  &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;bool&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; bOrder);&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;
&lt;p&gt;The method below will complete IPRouteTable with the IP address:
&lt;div&gt;&lt;a style=""&gt;Copy Code&lt;/a&gt;&lt;pre style="width:100%"&gt;&lt;div&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;private&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;void&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; LinkWithInterfaceAddresses()
{
    IntPtr pBuf &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; IntPtr.Zero;
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; nBufSize &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 128)"&gt;0&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;;

    GetIpAddrTable(IntPtr.Zero, &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;ref&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; nBufSize, &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;false&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;);
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;try&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;
    {
        pBuf &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; Marshal.AllocHGlobal(nBufSize);
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; r &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; GetIpAddrTable(pBuf, &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;ref&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; nBufSize, &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;false&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;);
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;if&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; (r &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;!=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 128)"&gt;0&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;)
            &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;throw&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;new&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; System.ComponentModel.Win32Exception(r);

        Type tIPAddrRow &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;typeof&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;(MIB_IPADDRROW);
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; nNumRows &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; Marshal.ReadInt32(pBuf);
        IntPtr pRow &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;unchecked&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;((IntPtr)((&lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;)pBuf &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;+&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 128)"&gt;4&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;));
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;while&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; (nNumRows&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;--&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 128)"&gt;0&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;)
        {
            MIB_IPADDRROW row &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; (MIB_IPADDRROW)Marshal.PtrToStructure(pRow, tIPAddrRow);

            &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;foreach&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; (IPRouteTable tab &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;in&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ipRouteList)
            {
                &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;if&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; (tab.IfIndex &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;==&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; row.dwIndex)
                {
                    tab.IfIP &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; IPToString(IPAddress.NetworkToHostOrder(row.dwAddr));
                }
            }
            pRow &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;unchecked&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;((IntPtr)((&lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;)pRow &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;+&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; Marshal.SizeOf(tIPAddrRow)));
        }
    }
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;finally&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;
    {
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;if&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; (pBuf &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;!=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; IntPtr.Zero)
            Marshal.FreeHGlobal(pBuf);
    }
}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;3. The last step is to process all the gathered information and return an object (ConnectionInformation) to the consumer that describes the currently used IP route:&lt;/strong&gt;
&lt;div&gt;ConnectionInformation - &lt;a style=""&gt;Copy Code&lt;/a&gt;&lt;pre style="width:100%"&gt;&lt;div&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;class&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ConnectionInformation
{
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;private&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;string&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; connectionType;
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;private&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;long&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; connectionSpeed;
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;private&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;bool&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; fastNetwork;

    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ConnectionInformation()
    {
    }

    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ConnectionInformation(&lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;string&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; connectionType, &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;long&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; connectionSpeed, &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;bool&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; fastNetwork)
    {
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;this&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;.connectionSpeed &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; connectionSpeed;
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;this&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;.connectionType &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; connectionType;
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;this&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;.fastNetwork &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; fastNetwork;
    }

    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;string&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ConnectionType
    {
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;get&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;return&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; connectionType; }
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;set&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { connectionType &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; value; }
    }

    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;long&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ConnectionSpeed
    {
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;get&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;return&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; connectionSpeed; }
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;set&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { connectionSpeed &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; value; }
    }

    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;public&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;bool&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; FastNetwork
    {
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;get&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;return&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; fastNetwork; }
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;set&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; { fastNetwork &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; value; }
    }
}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This object is constructed in the code below:
&lt;p&gt;
&lt;div&gt;&lt;a style=""&gt;Copy Code&lt;/a&gt;&lt;pre style="width:100%"&gt;&lt;div&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;ConnectionInformation con &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;new&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ConnectionInformation(&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;,&lt;/span&gt;&lt;span style="color:rgb(128, 0, 128)"&gt;0&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;,&lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;false&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;);

&lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; currentMetric &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;int&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;.MaxValue;

&lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;foreach&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; (IPRouteTable tab &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;in&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ipRouteList)
{
    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;if&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; (tab.IfDescription.IndexOf(&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;VPN&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;) &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;==&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;-&lt;/span&gt;&lt;span style="color:rgb(128, 0, 128)"&gt;1&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;)
    {
        &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;if&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; (tab.IfMetric &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; currentMetric)
        {
            &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;if&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; (tab.IfType &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;==&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; NetworkInterfaceType.Ppp)
            {
                &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;if&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; ((tab.IfSpeed &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;/&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 128)"&gt;1000&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;) &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 128)"&gt;120&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;)
                {
                    con.ConnectionType &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;GPRS&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;;
                    con.ConnectionSpeed &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; tab.IfSpeed &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;/&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 128)"&gt;1000&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;;
                }
                &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;else&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;
                {
                    con.ConnectionType &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;UMTS/GPRS&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;;
                    con.ConnectionSpeed &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; tab.IfSpeed &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;/&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 128)"&gt;1000&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;;
                }
            }
            &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;else&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;
            {
                &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;if&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; (tab.IfType &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;==&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; NetworkInterfaceType.Ethernet &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;||&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;
 tab.IfType &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;==&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; NetworkInterfaceType.GigabitEthernet)
                {
                    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;if&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; (tab.IfDescription.IndexOf(&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;Wireless&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;) &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;==&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;-&lt;/span&gt;&lt;span style="color:rgb(128, 0, 128)"&gt;1&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;)
                    {
                        con.ConnectionType &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;LAN&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;;
                        con.ConnectionSpeed &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; tab.IfSpeed &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;/&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 128)"&gt;1000&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;;
                    }
                    &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;else&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;
                    {
                        con.ConnectionType &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;WIRELESS&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;;
                        con.ConnectionSpeed &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; tab.IfSpeed &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;/&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 128)"&gt;1000&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;;

                    }
                }
                &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;else&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;if&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; (tab.IfType &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;==&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; NetworkInterfaceType.Wireless80211)
                {
                    con.ConnectionType &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;WIRELESS&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;;
                    con.ConnectionSpeed &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; tab.IfSpeed &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;/&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(128, 0, 128)"&gt;1000&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;;

                }
            }
            currentMetric &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; tab.IfMetric;
        }
    }
} &lt;/span&gt;&lt;span style="color:rgb(0, 128, 0)"&gt;//&lt;/span&gt;&lt;span style="color:rgb(0, 128, 0)"&gt;foreach (IPRouteTable tab in ipRouteList)&lt;/span&gt;&lt;span style="color:rgb(0, 128, 0)"&gt;
&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;
con.FastNetwork &lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;=&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt; &lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;this&lt;/span&gt;&lt;span style="color:rgb(0, 0, 0)"&gt;.IsFastNetwork(con);&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;
&lt;p&gt;The code fragment above filters out possible VPN tunnels (when you open a VPN, then the VPN appears as a route with normally the  lowest metric) by just checking on the string VPN in the adapter name: if someone knows a clean solution for this, please let me know.
&lt;p&gt;If you want a complete working solution containing all the code of this and the &lt;a href="http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!192.entry"&gt;previous post&lt;/a&gt; then please drop me a comment and I'll mail it to you. 
&lt;p&gt; 
&lt;p&gt;
&lt;div&gt;Technorati tags: &lt;a href="http://technorati.com/tags/TCP/IP" rel=tag&gt;TCP/IP&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Route" rel=tag&gt;Route&lt;/a&gt;, &lt;a href="http://technorati.com/tags/P/Invoke" rel=tag&gt;P/Invoke&lt;/a&gt;&lt;/div&gt;&lt;p&gt;
&lt;div&gt;del.icio.us tags: &lt;a href="http://del.icio.us/popular/TCP/IP" rel=tag&gt;TCP/IP&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/Route" rel=tag&gt;Route&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/P/Invoke" rel=tag&gt;P/Invoke&lt;/a&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2759794756127330307&amp;page=RSS%3a+Fetching+TCP%2fIP+routing+information+using+C%23...and+P%2fInvoke%2c+part+2&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bertjansen.spaces.live.com&amp;amp;GT1=bertjansen"&gt;</description><comments>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!202.entry#comment</comments><guid isPermaLink="true">http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!202.entry</guid><pubDate>Thu, 26 Oct 2006 07:07:16 GMT</pubDate><slash:comments>5</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bertjansen.spaces.live.com/blog/cns!D9B33D4A940B6FFD!202/comments/feed.rss</wfw:commentRss><wfw:comment>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!202.entry#comment</wfw:comment><dcterms:modified>2006-10-26T11:28:27Z</dcterms:modified></item><item><title>An important step, take 2</title><link>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!197.entry</link><description>&lt;p&gt;  &lt;p&gt;In my &lt;a href="http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!196.entry"&gt;last post&lt;/a&gt; I spoke about an important step I've taken. Well it's time to give you all some more details: I'll be joining the Microsoft Belgium as an Architect within the Microsoft Consultancy &amp;amp; Services team. &lt;img alt="smile_teeth" src="http://spaces.live.com/rte/emoticons/smile_teeth.gif"&gt;  I'm very delighted with this and I can't wait to get started, but first I have to finish my current Real Software assignments...&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2759794756127330307&amp;page=RSS%3a+An+important+step%2c+take+2&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bertjansen.spaces.live.com&amp;amp;GT1=bertjansen"&gt;</description><comments>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!197.entry#comment</comments><guid isPermaLink="true">http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!197.entry</guid><pubDate>Tue, 24 Oct 2006 07:20:21 GMT</pubDate><slash:comments>5</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bertjansen.spaces.live.com/blog/cns!D9B33D4A940B6FFD!197/comments/feed.rss</wfw:commentRss><wfw:comment>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!197.entry#comment</wfw:comment><dcterms:modified>2006-10-24T07:21:50Z</dcterms:modified></item><item><title>An important step</title><link>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!196.entry</link><description>&lt;p&gt;  &lt;p&gt;This week I've taken an important step regarding my future career. It's still to soon to reveal more details...but stay tuned and you'll get to know what's this all about...&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2759794756127330307&amp;page=RSS%3a+An+important+step&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bertjansen.spaces.live.com&amp;amp;GT1=bertjansen"&gt;</description><comments>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!196.entry#comment</comments><guid isPermaLink="true">http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!196.entry</guid><pubDate>Wed, 18 Oct 2006 14:54:11 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bertjansen.spaces.live.com/blog/cns!D9B33D4A940B6FFD!196/comments/feed.rss</wfw:commentRss><wfw:comment>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!196.entry#comment</wfw:comment><dcterms:modified>2006-10-18T14:54:11Z</dcterms:modified></item><item><title>Google Code search versus Krugle, Koders, and Codease</title><link>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!195.entry</link><description>&lt;p&gt;  &lt;p&gt;Google recently announced &lt;a href="http://www.google.com/codesearch"&gt;Google Code Search&lt;/a&gt; which allows one to quickly search the code of open-source projects. Completing it with a regex enabled search this results in a quite a powerful code search engine, but how does it compare against the existing code search engines like &lt;em&gt;&lt;a href="http://www.krugle.com/"&gt;Krugle&lt;/a&gt;&lt;/em&gt;, &lt;em&gt;&lt;a href="http://www.koders.com/"&gt;Koders&lt;/a&gt;&lt;/em&gt;, and &lt;a href="http://www.codase.com/"&gt;&lt;em&gt;Codease&lt;/em&gt;&lt;/a&gt;&lt;em&gt; ? &lt;/em&gt;I haven't used Koders are Codease yet, but if I compare Krugle against Google code search then I'm afraid that the investors behind Krugle are getting a bit nervous &lt;img alt="smile_regular" src="http://spaces.live.com/rte/emoticons/smile_regular.gif"&gt;&lt;em&gt; &lt;/em&gt; &lt;p&gt;On the web you can find several pages which list all kind issues in open-source code ranging from funny comments from the developers up to buffer-overflows and hidden passwords and backdoors. A nice selection of these can be found &lt;a href="http://www.kottke.org/06/10/google-code-search"&gt;here&lt;/a&gt;.&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2759794756127330307&amp;page=RSS%3a+Google+Code+search+versus+Krugle%2c+Koders%2c+and+Codease&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bertjansen.spaces.live.com&amp;amp;GT1=bertjansen"&gt;</description><comments>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!195.entry#comment</comments><guid isPermaLink="true">http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!195.entry</guid><pubDate>Fri, 13 Oct 2006 05:36:55 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bertjansen.spaces.live.com/blog/cns!D9B33D4A940B6FFD!195/comments/feed.rss</wfw:commentRss><wfw:comment>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!195.entry#comment</wfw:comment><dcterms:modified>2006-10-13T05:36:55Z</dcterms:modified></item><item><title>ClickOnce for the enterprise</title><link>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!193.entry</link><description>&lt;p&gt;  &lt;p&gt;Recently a &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/admincodep.asp"&gt;nice article about ClickOnce&lt;/a&gt; in enterprise environments has been published onto MSDN. The author (Brian Noyes) describes his paper as: &lt;blockquote&gt; &lt;p&gt;ClickOnce provides an easy-to-use and flexible deployment mechanism for smart client applications built for the .NET Framework 2.0. ClickOnce offers end-user deployment, ready-made installation dialogs, a built-in security model, and automatic or on-demand updates. But while it's great to have so many built-in features, one area that users often request more control is in tracking who uses which applications, controlling access to those applications, and knowing when something goes wrong. You may just need to keep track of who is using which versions of each application at the user level. You may want to restrict access to certain applications and updates based on a user's identity or their association with a role or group. You may want to know when launch errors have occurred for particular users so that you can troubleshoot deployment problems if they exist.  &lt;p&gt;This whitepaper discusses all of these scenarios. It identifies the places you can insert your own code or tools into the process for control or monitoring purposes. Several alternative solutions will be discussed, allowing you to pick the approach that provides the best trade-off of complexity and control given your requirements. This whitepaper also identifies potential hazards of certain solutions that may seem like a good idea, but that can lead to fragility or unexpected results. Along the way, I give you insight into what artifacts are being placed where when you publish and deploy a ClickOnce application.&lt;/blockquote&gt; &lt;p&gt;  &lt;div&gt;del.icio.us tags: &lt;a href="http://del.icio.us/popular/ClickOnce" rel=tag&gt;ClickOnce&lt;/a&gt;&lt;/div&gt;       &lt;div&gt;Technorati tags: &lt;a href="http://technorati.com/tags/ClickOnce" rel=tag&gt;ClickOnce&lt;/a&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2759794756127330307&amp;page=RSS%3a+ClickOnce+for+the+enterprise&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bertjansen.spaces.live.com&amp;amp;GT1=bertjansen"&gt;</description><comments>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!193.entry#comment</comments><guid isPermaLink="true">http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!193.entry</guid><pubDate>Wed, 11 Oct 2006 07:09:53 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bertjansen.spaces.live.com/blog/cns!D9B33D4A940B6FFD!193/comments/feed.rss</wfw:commentRss><wfw:comment>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!193.entry#comment</wfw:comment><dcterms:modified>2006-10-11T07:09:53Z</dcterms:modified></item><item><title>Fetching TCP/IP routing information using C#...and P/Invoke</title><link>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!192.entry</link><description>&lt;p&gt;  &lt;p&gt;This article is a follow-up on the article about finding the used TCP/IP route which you can read &lt;a href="http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!191.entry"&gt;here&lt;/a&gt;. Using the &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp/getipforwardtable.asp"&gt;GetIpForwardTable&lt;/a&gt; API it's possible to fetch almost the same information then outputted by the &lt;a href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/route.mspx?mfr=true"&gt;route print&lt;/a&gt; command. &lt;p&gt;The first step will be to declare the appropriate structs and DLL imports: &lt;p&gt; &lt;div&gt;&lt;pre style="background-color:White"&gt;&lt;div&gt;&lt;span style="color:#000000"&gt;[StructLayout(LayoutKind.Sequential)]
&lt;/span&gt;&lt;span style="color:#0000FF"&gt;public&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;struct&lt;/span&gt;&lt;span style="color:#000000"&gt; MIB_IPFORWARDROW
{
    [MarshalAs(UnmanagedType.U4)]
    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;public&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; dwForwardDest; &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; IP addr of destination&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;    [MarshalAs(UnmanagedType.U4)]
    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;public&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; dwForwardMask; &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; subnetwork mask of destination&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;    [MarshalAs(UnmanagedType.U4)]
    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;public&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; dwForwardPolicy; &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; conditions for multi-path route&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;    [MarshalAs(UnmanagedType.U4)]
    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;public&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; dwForwardNextHop; &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; IP address of next hop&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;    [MarshalAs(UnmanagedType.U4)]
    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;public&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; dwForwardIfIndex; &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; index of interface&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;    [MarshalAs(UnmanagedType.U4)]
    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;public&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; dwForwardType; &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; route type&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;    [MarshalAs(UnmanagedType.U4)]
    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;public&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; dwForwardProto; &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; protocol that generated route&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;    [MarshalAs(UnmanagedType.U4)]
    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;public&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; dwForwardAge; &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; age of route&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;    [MarshalAs(UnmanagedType.U4)]
    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;public&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; dwForwardNextHopAS; &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; autonomous system number&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;    [MarshalAs(UnmanagedType.U4)]
    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;public&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; dwForwardMetric1; &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; protocol-specific metric&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;    [MarshalAs(UnmanagedType.U4)]
    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;public&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; dwForwardMetric2; &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; protocol-specific metric&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;    [MarshalAs(UnmanagedType.U4)]
    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;public&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; dwForwardMetric3; &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; protocol-specific metric&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;    [MarshalAs(UnmanagedType.U4)]
    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;public&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; dwForwardMetric4; &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; protocol-specific metric&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;    [MarshalAs(UnmanagedType.U4)]
    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;public&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; dwForwardMetric5; &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; protocol-specific metric            &lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;}

[DllImport(&lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000"&gt;IpHlpApi.dll&lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000"&gt;)]
[&lt;/span&gt;&lt;span style="color:#0000FF"&gt;return&lt;/span&gt;&lt;span style="color:#000000"&gt;: MarshalAs(UnmanagedType.U4)]
&lt;/span&gt;&lt;span style="color:#0000FF"&gt;static&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;extern&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; GetIpForwardTable(
        IntPtr pIpForwardTable,
        [MarshalAs(UnmanagedType.U4)]
        &lt;/span&gt;&lt;span style="color:#0000FF"&gt;ref&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; pdwSize,
        &lt;/span&gt;&lt;span style="color:#0000FF"&gt;bool&lt;/span&gt;&lt;span style="color:#000000"&gt; bOrder);

&lt;/span&gt;&lt;span style="color:#0000FF"&gt;const&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; ERROR_INSUFFICIENT_BUFFER &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#000000"&gt;122&lt;/span&gt;&lt;span style="color:#000000"&gt;;   &lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Once that's done we can start getting our hands dirty writing some nasty code to use the GetIpForwardTable API:
&lt;p&gt;
&lt;div&gt;&lt;pre style="background-color:White"&gt;&lt;div&gt;&lt;span style="color:#0000FF"&gt;private&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;static&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;void&lt;/span&gt;&lt;span style="color:#000000"&gt; PrintRouteList()
{
    &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; The number of bytes needed.&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; bytesNeeded &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#000000"&gt;0&lt;/span&gt;&lt;span style="color:#000000"&gt;;

    &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; The result from the API call.&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; result &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; GetIpForwardTable(IntPtr.Zero, &lt;/span&gt;&lt;span style="color:#0000FF"&gt;ref&lt;/span&gt;&lt;span style="color:#000000"&gt; bytesNeeded, &lt;/span&gt;&lt;span style="color:#0000FF"&gt;false&lt;/span&gt;&lt;span style="color:#000000"&gt;);

    &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; Call the function, expecting an insufficient buffer.&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;if&lt;/span&gt;&lt;span style="color:#000000"&gt; (result &lt;/span&gt;&lt;span style="color:#000000"&gt;!=&lt;/span&gt;&lt;span style="color:#000000"&gt; ERROR_INSUFFICIENT_BUFFER)
    {
        &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; Throw an exception.&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;        &lt;/span&gt;&lt;span style="color:#0000FF"&gt;throw&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;new&lt;/span&gt;&lt;span style="color:#000000"&gt; Win32Exception(result);
    }

    &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; Allocate the memory, do it in a try/finally block, to ensure
    &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; that it is released.&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;    IntPtr buffer &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; IntPtr.Zero;

    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;try&lt;/span&gt;&lt;span style="color:#000000"&gt;
    {
        &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; Allocate the memory.&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;        buffer &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; Marshal.AllocCoTaskMem(bytesNeeded);

        &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; Make the call again.  If it did not succeed, then
        &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; raise an error.&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;        result &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; GetIpForwardTable(buffer, &lt;/span&gt;&lt;span style="color:#0000FF"&gt;ref&lt;/span&gt;&lt;span style="color:#000000"&gt; bytesNeeded, &lt;/span&gt;&lt;span style="color:#0000FF"&gt;false&lt;/span&gt;&lt;span style="color:#000000"&gt;);

        &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; If the result is not 0 (no error), then throw an exception.&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;        &lt;/span&gt;&lt;span style="color:#0000FF"&gt;if&lt;/span&gt;&lt;span style="color:#000000"&gt; (result &lt;/span&gt;&lt;span style="color:#000000"&gt;!=&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#000000"&gt;0&lt;/span&gt;&lt;span style="color:#000000"&gt;)
        {
            &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; Throw an exception.&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;            &lt;/span&gt;&lt;span style="color:#0000FF"&gt;throw&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;new&lt;/span&gt;&lt;span style="color:#000000"&gt; Win32Exception(result);
        }

        &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; Now we have the buffer, we have to marshal it.  We can read
        &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; the first 4 bytes to get the length of the buffer.&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;        &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; entries &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; Marshal.ReadInt32(buffer);

        &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; Increment the memory pointer by the size of the int.&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;        IntPtr currentBuffer &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;new&lt;/span&gt;&lt;span style="color:#000000"&gt; IntPtr(buffer.ToInt64() &lt;/span&gt;&lt;span style="color:#000000"&gt;+&lt;/span&gt;&lt;span style="color:#000000"&gt; Marshal.SizeOf(&lt;/span&gt;&lt;span style="color:#0000FF"&gt;new&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt;()));

        &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; Allocate an array of entries.&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;        MIB_IPFORWARDROW[] table &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;new&lt;/span&gt;&lt;span style="color:#000000"&gt; MIB_IPFORWARDROW[entries];

        &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; Cycle through the entries.&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;        &lt;/span&gt;&lt;span style="color:#0000FF"&gt;for&lt;/span&gt;&lt;span style="color:#000000"&gt; (&lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; index &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#000000"&gt;0&lt;/span&gt;&lt;span style="color:#000000"&gt;; index &lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#000000"&gt; entries; index&lt;/span&gt;&lt;span style="color:#000000"&gt;++&lt;/span&gt;&lt;span style="color:#000000"&gt;)
        {
            &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; Call PtrToStructure, getting the structure information.&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;            table[index] &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; (MIB_IPFORWARDROW)Marshal.PtrToStructure(&lt;/span&gt;&lt;span style="color:#0000FF"&gt;new&lt;/span&gt;&lt;span style="color:#000000"&gt;
            IntPtr(currentBuffer.ToInt64() &lt;/span&gt;&lt;span style="color:#000000"&gt;+&lt;/span&gt;&lt;span style="color:#000000"&gt; (index &lt;/span&gt;&lt;span style="color:#000000"&gt;*&lt;/span&gt;&lt;span style="color:#000000"&gt;
                    Marshal.SizeOf(&lt;/span&gt;&lt;span style="color:#0000FF"&gt;typeof&lt;/span&gt;&lt;span style="color:#000000"&gt;(MIB_IPFORWARDROW)))), &lt;/span&gt;&lt;span style="color:#0000FF"&gt;typeof&lt;/span&gt;&lt;span style="color:#000000"&gt;(MIB_IPFORWARDROW));
        }

        &lt;/span&gt;&lt;span style="color:#0000FF"&gt;string&lt;/span&gt;&lt;span style="color:#000000"&gt; ip &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000"&gt;;                

        &lt;/span&gt;&lt;span style="color:#0000FF"&gt;for&lt;/span&gt;&lt;span style="color:#000000"&gt; (&lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; i &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#000000"&gt;0&lt;/span&gt;&lt;span style="color:#000000"&gt;; i &lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#000000"&gt; entries; i&lt;/span&gt;&lt;span style="color:#000000"&gt;++&lt;/span&gt;&lt;span style="color:#000000"&gt;)
        {
            ip &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; IPToString(IPAddress.NetworkToHostOrder(table[i].dwForwardDest));

            Console.WriteLine(&lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000"&gt;Destination: {0}  Interface index: {1}  Metric: {2}&lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000"&gt;, 
                ip, table[i].dwForwardIfIndex, table[i].dwForwardMetric1);

            &lt;/span&gt;&lt;span style="color:#0000FF"&gt;if&lt;/span&gt;&lt;span style="color:#000000"&gt; (ip &lt;/span&gt;&lt;span style="color:#000000"&gt;==&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000"&gt;0.0.0.0&lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000"&gt;)
            {
                Console.WriteLine(&lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000"&gt;This is the default route!&lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000"&gt;);
            }
        }
    }
    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;finally&lt;/span&gt;&lt;span style="color:#000000"&gt;
    {
        &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; Release the memory.&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;        Marshal.FreeCoTaskMem(buffer);
    }
}

&lt;/span&gt;&lt;span style="color:#0000FF"&gt;private&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;static&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;string&lt;/span&gt;&lt;span style="color:#000000"&gt; IPToString(&lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; ipaddr)
{
    &lt;/span&gt;&lt;span style="color:#0000FF"&gt;return&lt;/span&gt;&lt;span style="color:#000000"&gt; String.Format(&lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000"&gt;{0}.{1}.{2}.{3}&lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000"&gt;,
      (ipaddr &lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#000000"&gt;24&lt;/span&gt;&lt;span style="color:#000000"&gt;) &lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;amp;&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#000000"&gt;0xFF&lt;/span&gt;&lt;span style="color:#000000"&gt;, (ipaddr &lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#000000"&gt;16&lt;/span&gt;&lt;span style="color:#000000"&gt;) &lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;amp;&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#000000"&gt;0xFF&lt;/span&gt;&lt;span style="color:#000000"&gt;,
      (ipaddr &lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#000000"&gt;8&lt;/span&gt;&lt;span style="color:#000000"&gt;) &lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;amp;&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#000000"&gt;0xFF&lt;/span&gt;&lt;span style="color:#000000"&gt;, ipaddr &lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;amp;&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#000000"&gt;0xFF&lt;/span&gt;&lt;span style="color:#000000"&gt;);
}
&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;When you use this method then following output is generated:
&lt;div&gt;&lt;pre style="background-color:White"&gt;&lt;div&gt;&lt;span style="color:#000000"&gt;Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;0.0&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;0.0&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;65544&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;30&lt;/span&gt;&lt;span style="color:#000000"&gt;
This &lt;/span&gt;&lt;span style="color:#0000FF"&gt;is&lt;/span&gt;&lt;span style="color:#000000"&gt; the &lt;/span&gt;&lt;span style="color:#0000FF"&gt;default&lt;/span&gt;&lt;span style="color:#000000"&gt; route&lt;/span&gt;&lt;span style="color:#000000"&gt;!&lt;/span&gt;&lt;span style="color:#000000"&gt;
Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;127.0&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;0.0&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;1&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;1&lt;/span&gt;&lt;span style="color:#000000"&gt;
Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;192.168&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;163.0&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;2&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;20&lt;/span&gt;&lt;span style="color:#000000"&gt;
Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;192.168&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;163.1&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;1&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;20&lt;/span&gt;&lt;span style="color:#000000"&gt;
Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;192.168&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;163.255&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;2&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;20&lt;/span&gt;&lt;span style="color:#000000"&gt;
Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;192.168&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;238.0&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;3&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;20&lt;/span&gt;&lt;span style="color:#000000"&gt;
Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;192.168&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;238.1&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;1&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;20&lt;/span&gt;&lt;span style="color:#000000"&gt;
Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;192.168&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;238.255&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;3&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;20&lt;/span&gt;&lt;span style="color:#000000"&gt;
Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;192.168&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;240.0&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;65544&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;30&lt;/span&gt;&lt;span style="color:#000000"&gt;
Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;192.168&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;240.100&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;1&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;30&lt;/span&gt;&lt;span style="color:#000000"&gt;
Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;192.168&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;240.255&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;65544&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;30&lt;/span&gt;&lt;span style="color:#000000"&gt;
Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;224.0&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;0.0&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;3&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;20&lt;/span&gt;&lt;span style="color:#000000"&gt;
Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;224.0&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;0.0&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;2&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;20&lt;/span&gt;&lt;span style="color:#000000"&gt;
Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;224.0&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;0.0&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;65544&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;30&lt;/span&gt;&lt;span style="color:#000000"&gt;
Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;255.255&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;255.255&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;5&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;1&lt;/span&gt;&lt;span style="color:#000000"&gt;
Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;255.255&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;255.255&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;6&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;1&lt;/span&gt;&lt;span style="color:#000000"&gt;
Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;255.255&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;255.255&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;65544&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;1&lt;/span&gt;&lt;span style="color:#000000"&gt;
Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;255.255&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;255.255&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;4&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;1&lt;/span&gt;&lt;span style="color:#000000"&gt;
Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;255.255&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;255.255&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;3&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;1&lt;/span&gt;&lt;span style="color:#000000"&gt;
Destination: &lt;/span&gt;&lt;span style="color:#000000"&gt;255.255&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;255.255&lt;/span&gt;&lt;span style="color:#000000"&gt; Interface index: &lt;/span&gt;&lt;span style="color:#000000"&gt;2&lt;/span&gt;&lt;span style="color:#000000"&gt; Metric: &lt;/span&gt;&lt;span style="color:#000000"&gt;1&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;That all for today, soon I'll tell you how to figure out which network adapter is linked to the specified interface index...
&lt;p&gt; 
&lt;div&gt;Technorati tags: &lt;a href="http://technorati.com/tags/TCP/IP" rel=tag&gt;TCP/IP&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Route" rel=tag&gt;Route&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Windows" rel=tag&gt;Windows&lt;/a&gt;, &lt;a href="http://technorati.com/tags/P/Invoke" rel=tag&gt;P/Invoke&lt;/a&gt;&lt;/div&gt;   
&lt;div&gt;del.icio.us tags: &lt;a href="http://del.icio.us/popular/TCP/IP" rel=tag&gt;TCP/IP&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/Route" rel=tag&gt;Route&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/Windows" rel=tag&gt;Windows&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/P/Invoke" rel=tag&gt;P/Invoke&lt;/a&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2759794756127330307&amp;page=RSS%3a+Fetching+TCP%2fIP+routing+information+using+C%23...and+P%2fInvoke&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bertjansen.spaces.live.com&amp;amp;GT1=bertjansen"&gt;</description><comments>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!192.entry#comment</comments><guid isPermaLink="true">http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!192.entry</guid><pubDate>Thu, 05 Oct 2006 22:08:34 GMT</pubDate><slash:comments>1</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bertjansen.spaces.live.com/blog/cns!D9B33D4A940B6FFD!192/comments/feed.rss</wfw:commentRss><wfw:comment>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!192.entry#comment</wfw:comment><dcterms:modified>2006-10-05T22:08:34Z</dcterms:modified></item><item><title>Finding the way home...</title><link>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!191.entry</link><description>&lt;p&gt;Ever wondered how to determine which of your network interfaces is being used to communicate? Suppose you are connected using your wireless adapter, which has received an IP-address from the DHCP server in your network. At this moment all communication to the outside world uses the wireless adapter.  &lt;p&gt;But what would happen if you also plugging in your network cable? Will the system automatically use the faster Ethernet adapter or not?  &lt;p&gt;One way to find this out is using the &lt;a title="Route command" href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/route.mspx?mfr=true"&gt;route&lt;/a&gt; command: open a command prompt and type in route print and you'll get something like this: &lt;p&gt; &lt;div&gt;&lt;pre style="background-color:white;word-wrap:break-word"&gt;&lt;div&gt;&lt;span style="color:#008080"&gt; 1&lt;/span&gt; &lt;span style="color:#000000"&gt;C:\Documents and Settings\jansenbe&amp;gt;route print
&lt;/span&gt;&lt;span style="color:#008080"&gt; 2&lt;/span&gt; &lt;span style="color:#000000"&gt;===========================================================================
&lt;/span&gt;&lt;span style="color:#008080"&gt; 3&lt;/span&gt; &lt;span style="color:#000000"&gt;Interface List
&lt;/span&gt;&lt;span style="color:#008080"&gt; 4&lt;/span&gt; &lt;span style="color:#000000"&gt;0x1 ........................... MS TCP Loopback interface
&lt;/span&gt;&lt;span style="color:#008080"&gt; 5&lt;/span&gt; &lt;span style="color:#000000"&gt;0x2 ...00 50 56 c0 00 08 ...... VMware Virtual Ethernet Adapter for VMnet8
&lt;/span&gt;&lt;span style="color:#008080"&gt; 6&lt;/span&gt; &lt;span style="color:#000000"&gt;0x3 ...00 50 56 c0 00 01 ...... VMware Virtual Ethernet Adapter for VMnet1
&lt;/span&gt;&lt;span style="color:#008080"&gt; 7&lt;/span&gt; &lt;span style="color:#000000"&gt;0x4 ...00 0d 9d 90 31 f6 ...... Broadcom NetXtreme Gigabit Ethernet - Determinis
&lt;/span&gt;&lt;span style="color:#008080"&gt; 8&lt;/span&gt; &lt;span style="color:#000000"&gt;tic Network Enhancer Miniport
&lt;/span&gt;&lt;span style="color:#008080"&gt; 9&lt;/span&gt; &lt;span style="color:#000000"&gt;0x5 ...00 20 e0 26 5d 32 ...... Bluetooth LAN Access Server Driver #2 - Determin
&lt;/span&gt;&lt;span style="color:#008080"&gt;10&lt;/span&gt; &lt;span style="color:#000000"&gt;istic Network Enhancer Miniport
&lt;/span&gt;&lt;span style="color:#008080"&gt;11&lt;/span&gt; &lt;span style="color:#000000"&gt;0x6 ...00 20 e0 26 5d 32 ...... Bluetooth LAN Access Server Driver - Determinist
&lt;/span&gt;&lt;span style="color:#008080"&gt;12&lt;/span&gt; &lt;span style="color:#000000"&gt;ic Network Enhancer Miniport
&lt;/span&gt;&lt;span style="color:#008080"&gt;13&lt;/span&gt; &lt;span style="color:#000000"&gt;0x10008 ...00 0c f1 35 18 db ...... Intel(R) PRO/Wireless LAN 2100 3B Mini PCI A
&lt;/span&gt;&lt;span style="color:#008080"&gt;14&lt;/span&gt; &lt;span style="color:#000000"&gt;dapter - Deterministic Network Enhancer Miniport
&lt;/span&gt;&lt;span style="color:#008080"&gt;15&lt;/span&gt; &lt;span style="color:#000000"&gt;===========================================================================
&lt;/span&gt;&lt;span style="color:#008080"&gt;16&lt;/span&gt; &lt;span style="color:#000000"&gt;===========================================================================
&lt;/span&gt;&lt;span style="color:#008080"&gt;17&lt;/span&gt; &lt;span style="color:#000000"&gt;Active Routes:
&lt;/span&gt;&lt;span style="color:#008080"&gt;18&lt;/span&gt; &lt;span style="color:#000000"&gt;Network Destination        Netmask          Gateway       Interface  Metric
&lt;/span&gt;&lt;span style="color:#008080"&gt;19&lt;/span&gt; &lt;span style="color:#000000"&gt;          0.0.0.0          0.0.0.0  192.168.240.244  192.168.240.100      30
&lt;/span&gt;&lt;span style="color:#008080"&gt;20&lt;/span&gt; &lt;span style="color:#000000"&gt;        127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
&lt;/span&gt;&lt;span style="color:#008080"&gt;21&lt;/span&gt; &lt;span style="color:#000000"&gt;    192.168.163.0    255.255.255.0    192.168.163.1   192.168.163.1       20
&lt;/span&gt;&lt;span style="color:#008080"&gt;22&lt;/span&gt; &lt;span style="color:#000000"&gt;    192.168.163.1  255.255.255.255        127.0.0.1       127.0.0.1       20
&lt;/span&gt;&lt;span style="color:#008080"&gt;23&lt;/span&gt; &lt;span style="color:#000000"&gt;  192.168.163.255  255.255.255.255    192.168.163.1   192.168.163.1       20
&lt;/span&gt;&lt;span style="color:#008080"&gt;24&lt;/span&gt; &lt;span style="color:#000000"&gt;    192.168.238.0    255.255.255.0    192.168.238.1   192.168.238.1       20
&lt;/span&gt;&lt;span style="color:#008080"&gt;25&lt;/span&gt; &lt;span style="color:#000000"&gt;    192.168.238.1  255.255.255.255        127.0.0.1       127.0.0.1       20
&lt;/span&gt;&lt;span style="color:#008080"&gt;26&lt;/span&gt; &lt;span style="color:#000000"&gt;  192.168.238.255  255.255.255.255    192.168.238.1   192.168.238.1       20
&lt;/span&gt;&lt;span style="color:#008080"&gt;27&lt;/span&gt; &lt;span style="color:#000000"&gt;    192.168.240.0    255.255.255.0  192.168.240.100  192.168.240.100      30
&lt;/span&gt;&lt;span style="color:#008080"&gt;28&lt;/span&gt; &lt;span style="color:#000000"&gt;  192.168.240.100  255.255.255.255        127.0.0.1       127.0.0.1       30
&lt;/span&gt;&lt;span style="color:#008080"&gt;29&lt;/span&gt; &lt;span style="color:#000000"&gt;  192.168.240.255  255.255.255.255  192.168.240.100  192.168.240.100      30
&lt;/span&gt;&lt;span style="color:#008080"&gt;30&lt;/span&gt; &lt;span style="color:#000000"&gt;        224.0.0.0        240.0.0.0    192.168.163.1   192.168.163.1       20
&lt;/span&gt;&lt;span style="color:#008080"&gt;31&lt;/span&gt; &lt;span style="color:#000000"&gt;        224.0.0.0        240.0.0.0    192.168.238.1   192.168.238.1       20
&lt;/span&gt;&lt;span style="color:#008080"&gt;32&lt;/span&gt; &lt;span style="color:#000000"&gt;        224.0.0.0        240.0.0.0  192.168.240.100  192.168.240.100      30
&lt;/span&gt;&lt;span style="color:#008080"&gt;33&lt;/span&gt; &lt;span style="color:#000000"&gt;  255.255.255.255  255.255.255.255    192.168.163.1   192.168.163.1       1
&lt;/span&gt;&lt;span style="color:#008080"&gt;34&lt;/span&gt; &lt;span style="color:#000000"&gt;  255.255.255.255  255.255.255.255    192.168.238.1   192.168.238.1       1
&lt;/span&gt;&lt;span style="color:#008080"&gt;35&lt;/span&gt; &lt;span style="color:#000000"&gt;  255.255.255.255  255.255.255.255  192.168.240.100               4       1
&lt;/span&gt;&lt;span style="color:#008080"&gt;36&lt;/span&gt; &lt;span style="color:#000000"&gt;  255.255.255.255  255.255.255.255  192.168.240.100  192.168.240.100      1
&lt;/span&gt;&lt;span style="color:#008080"&gt;37&lt;/span&gt; &lt;span style="color:#000000"&gt;  255.255.255.255  255.255.255.255  192.168.240.100               6       1
&lt;/span&gt;&lt;span style="color:#008080"&gt;38&lt;/span&gt; &lt;span style="color:#000000"&gt;  255.255.255.255  255.255.255.255  192.168.240.100               5       1
&lt;/span&gt;&lt;span style="color:#008080"&gt;39&lt;/span&gt; &lt;span style="color:#000000"&gt;Default Gateway:   192.168.240.244
&lt;/span&gt;&lt;span style="color:#008080"&gt;40&lt;/span&gt; &lt;span style="color:#000000"&gt;===========================================================================
&lt;/span&gt;&lt;span style="color:#008080"&gt;41&lt;/span&gt; &lt;span style="color:#000000"&gt;Persistent Routes:
&lt;/span&gt;&lt;span style="color:#008080"&gt;42&lt;/span&gt; &lt;span style="color:#000000"&gt;  None&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;The output shows all active TCP/IP routes, both static and dynamic, available on your machine. The route we're interested in is the so called default route which all TCP/IP traffic uses when there's no specific route defined. The &lt;a href="http://en.wikipedia.org/wiki/Default_route"&gt;default route&lt;/a&gt; is the one line 19:
&lt;p&gt;
&lt;p&gt;
&lt;div&gt;&lt;pre style="background-color:white"&gt;&lt;div&gt;&lt;span style="color:#008080"&gt;1&lt;/span&gt; &lt;span style="color:#000000"&gt;Network Destination        Netmask          Gateway       Interface  Metric
&lt;/span&gt;&lt;span style="color:#008080"&gt;2&lt;/span&gt; &lt;span style="color:#000000"&gt;          &lt;/span&gt;&lt;span style="color:#000000"&gt;0.0&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;0.0&lt;/span&gt;&lt;span style="color:#000000"&gt;          &lt;/span&gt;&lt;span style="color:#000000"&gt;0.0&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;0.0&lt;/span&gt;&lt;span style="color:#000000"&gt;  &lt;/span&gt;&lt;span style="color:#000000"&gt;192.168&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;240.244&lt;/span&gt;&lt;span style="color:#000000"&gt;  &lt;/span&gt;&lt;span style="color:#000000"&gt;192.168&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;240.100&lt;/span&gt;&lt;span style="color:#000000"&gt;      &lt;/span&gt;&lt;span style="color:#000000"&gt;30&lt;/span&gt;&lt;span style="color:#000000"&gt;
&lt;/span&gt;&lt;span style="color:#008080"&gt;3&lt;/span&gt; &lt;span style="color:#000000"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;
&lt;p&gt;In the route table above only my wireless network adapter was connected. If I also plugged in my Ethernet cable on use the same route print command again then there are two default routes:
&lt;p&gt;
&lt;div&gt;&lt;pre style="background-color:white"&gt;&lt;div&gt;&lt;span style="color:#008080"&gt;1&lt;/span&gt; &lt;span style="color:#000000"&gt;Network Destination        Netmask          Gateway       Interface  Metric
&lt;/span&gt;&lt;span style="color:#008080"&gt;2&lt;/span&gt; &lt;span style="color:#000000"&gt;          &lt;/span&gt;&lt;span style="color:#000000"&gt;0.0&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;0.0&lt;/span&gt;&lt;span style="color:#000000"&gt;          &lt;/span&gt;&lt;span style="color:#000000"&gt;0.0&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;0.0&lt;/span&gt;&lt;span style="color:#000000"&gt;  &lt;/span&gt;&lt;span style="color:#000000"&gt;192.168&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;240.244&lt;/span&gt;&lt;span style="color:#000000"&gt;  &lt;/span&gt;&lt;span style="color:#000000"&gt;192.168&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;240.100&lt;/span&gt;&lt;span style="color:#000000"&gt;      &lt;/span&gt;&lt;span style="color:#000000"&gt;30&lt;/span&gt;&lt;span style="color:#000000"&gt;
&lt;/span&gt;&lt;span style="color:#008080"&gt;3&lt;/span&gt; &lt;span style="color:#000000"&gt;          &lt;/span&gt;&lt;span style="color:#000000"&gt;0.0&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;0.0&lt;/span&gt;&lt;span style="color:#000000"&gt;          &lt;/span&gt;&lt;span style="color:#000000"&gt;0.0&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;0.0&lt;/span&gt;&lt;span style="color:#000000"&gt;  &lt;/span&gt;&lt;span style="color:#000000"&gt;192.168&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;240.244&lt;/span&gt;&lt;span style="color:#000000"&gt;  &lt;/span&gt;&lt;span style="color:#000000"&gt;192.168&lt;/span&gt;&lt;span style="color:#000000"&gt;.&lt;/span&gt;&lt;span style="color:#000000"&gt;240.102&lt;/span&gt;&lt;span style="color:#000000"&gt;      &lt;/span&gt;&lt;span style="color:#000000"&gt;20&lt;/span&gt;&lt;span style="color:#000000"&gt;
&lt;/span&gt;&lt;span style="color:#008080"&gt;4&lt;/span&gt; &lt;span style="color:#000000"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;
&lt;h5&gt;Which one of the two routes is my default route? That the question &lt;img alt="smile_nerd" src="http://spaces.live.com/rte/emoticons/smile_nerd.gif"&gt; ! &lt;/h5&gt;
&lt;p&gt;The answer is simple: Windows will take the route with the &lt;a href="http://technet2.microsoft.com/WindowsServer/en/library/6c7c7ab2-cfdc-4dfe-8560-570d3859f5b11033.mspx?mfr=true"&gt;lowest metric&lt;/a&gt; as it's default route which means in my case that my local area network will be used instead of my wireless network. In most cases Windows will configure this correct, but if you would want to alter this, then take a look at following screenshots:
&lt;p&gt;Open the properties dialog of one of your network connections:
&lt;p&gt;&lt;a href="http://tk1.storage.msn.com/x1pqP5noGPWAA72fBH2VJZUMGXEQ05au1gjtD8YR1DBQm744jhDBTiNzYRyJxFuG8oWyuOpyxzkOOVDDRuWZ9qa4Pu_y3Ngiwjhc2v20KZ4X9aStETAZ8Hdh329IIMf8X0K1E_zoYQIKErOzlXVP-ys4A"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=443 src="http://tk1.storage.msn.com/x1pqP5noGPWAA72fBH2VJZUMGXEQ05au1gjtD8YR1DBQm6JEUIpPQ3ClQr2gA28FOFNH2FfyNVfILtBYknsvJLNd5-R0pPYlvExlTip-WJb-XuCMYwpy0XIpTf963B-f_dZnq6Jw1ALY5gbJL_j_PW1iw" width=367 border=0&gt;&lt;/a&gt; 
&lt;p&gt;Select the Internet Protocal and go to Properties:
&lt;p&gt;&lt;a href="http://tk1.storage.msn.com/x1pqP5noGPWAA72fBH2VJZUMGXEQ05au1gjtD8YR1DBQm615igzZc8P0vWZ0M3QyfxEy3ELZw7plGhx5UzBgt5I5TFQvf9cqoaFE_cpah3ypwBQ2N6a7oEGaQ_7Pt0k8P2Yzdh0alF1OdltMI9Ovs5cZw"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=448 src="http://tk1.storage.msn.com/x1pqP5noGPWAA72fBH2VJZUMGXEQ05au1gjtD8YR1DBQm6DogjAUYh1W0SKYxwxwo5Igkdd3xBMFLp4CPX5f_TPxXEJMKV1Thn6ec6hG4QSRIWMEX1z61CZrDBVyegmZiwQqtiDFRCmx_szQkIgdYjlZg" width=404 border=0&gt;&lt;/a&gt; 
&lt;p&gt;Go to Advanced...And here you can define your own metric!
&lt;p&gt;&lt;a href="http://tk1.storage.msn.com/x1pqP5noGPWAA72fBH2VJZUMGXEQ05au1gjtD8YR1DBQm7bzVLFDNh6n22TSaQCw3dlJrc07iB-cymaPs7r9lEth4dcUJbPMTm_1yKcl98SkeAJZ9h49zy0_GYoElVg70QAcjw0xevxkrODeyJrrMKP8w"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=481 src="http://tk1.storage.msn.com/x1pqP5noGPWAA72fBH2VJZUMGXEQ05au1gjtD8YR1DBQm4fLcO5-vHXyL86Bk2DvXAGQ-Wj1tRv9-6-peIL2snRw-QdnpVQgnczSIzni2mmdCdn22952CY0Tuarph6m2CelpyjSuerFZSzGN3K83dJkXQ" width=404 border=0&gt;&lt;/a&gt; 
&lt;p&gt;In the coming days I'll post more about this topic: How to retrieve this information using C# and how to use this all to detect the speed of the currently used adapter, which can be very handy in smart client applications that want to disallow heavy network operations on slow and more important expensive networks. Each bit transmitted using GPRS or UMTS still is very expensive (at least here in Belgium) &lt;img alt="smile_sad" src="http://spaces.live.com/rte/emoticons/smile_sad.gif"&gt;
&lt;div&gt;Technorati tags: &lt;a href="http://technorati.com/tags/TCP/IP" rel=tag&gt;TCP/IP&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Route" rel=tag&gt;Route&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Windows" rel=tag&gt;Windows&lt;/a&gt;&lt;/div&gt;     
&lt;div&gt;del.icio.us tags: &lt;a href="http://del.icio.us/popular/TCP/IP" rel=tag&gt;TCP/IP&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/Route" rel=tag&gt;Route&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/Windows" rel=tag&gt;Windows&lt;/a&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2759794756127330307&amp;page=RSS%3a+Finding+the+way+home...&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bertjansen.spaces.live.com&amp;amp;GT1=bertjansen"&gt;</description><comments>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!191.entry#comment</comments><guid isPermaLink="true">http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!191.entry</guid><pubDate>Tue, 03 Oct 2006 07:57:58 GMT</pubDate><slash:comments>1</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bertjansen.spaces.live.com/blog/cns!D9B33D4A940B6FFD!191/comments/feed.rss</wfw:commentRss><wfw:comment>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!191.entry#comment</wfw:comment><dcterms:modified>2006-10-03T07:57:58Z</dcterms:modified></item><item><title>Visual Studio 2005 SP1 beta freely available</title><link>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!184.entry</link><description>&lt;p&gt;Microsoft has decided to make the beta of the first Service Pack for Visual Studio 2005 available to a broader public meaning that you no longer need to opt-in for the beta through the &lt;a href="http://connect.microsoft.com"&gt;Microsoft Connect&lt;/a&gt; web site, instead you can download the Beta from the &lt;a href="http://www.microsoft.com/downloads"&gt;Microsoft Downloads&lt;/a&gt; web site: &lt;p&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=8d702463-674b-4978-9e22-c989130f6553&amp;amp;DisplayLang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=8d702463-674b-4978-9e22-c989130f6553&amp;amp;DisplayLang=en&lt;/a&gt;  &lt;p&gt;Thanks to &lt;a href="http://pointerx.net/blogs/glozano/archive/2006/10/01/Visual-Studio-2005-Service-Pack-1-Beta-publicly-available.aspx"&gt;Gabriel&lt;/a&gt; for pointing this out.  &lt;p&gt; &lt;div&gt;Technorati tags: &lt;a href="http://technorati.com/tags/Visual Studio 2005" rel=tag&gt;Visual Studio 2005&lt;/a&gt;, &lt;a href="http://technorati.com/tags/SP1" rel=tag&gt;SP1&lt;/a&gt;&lt;/div&gt;          &lt;div&gt;del.icio.us tags: &lt;a href="http://del.icio.us/popular/Visual Studio 2005" rel=tag&gt;Visual Studio 2005&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/SP1" rel=tag&gt;SP1&lt;/a&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2759794756127330307&amp;page=RSS%3a+Visual+Studio+2005+SP1+beta+freely+available&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bertjansen.spaces.live.com&amp;amp;GT1=bertjansen"&gt;</description><comments>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!184.entry#comment</comments><guid isPermaLink="true">http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!184.entry</guid><pubDate>Mon, 02 Oct 2006 15:21:25 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bertjansen.spaces.live.com/blog/cns!D9B33D4A940B6FFD!184/comments/feed.rss</wfw:commentRss><wfw:comment>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!184.entry#comment</wfw:comment><dcterms:modified>2006-10-02T15:21:25Z</dcterms:modified></item><item><title>Searching for some code...Krugle to the rescue!</title><link>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!183.entry</link><description>&lt;p&gt;  &lt;p&gt;&lt;img src="http://www.krugle.com/media/img/logo_krugle_bl.gif"&gt;  &lt;p&gt;Then you definitely need to checkout &lt;a href="http://www.krugle.com/"&gt;krugle&lt;/a&gt;. Krugle is a search engine specially designed for searching through the code of thousands of open source projects. The folks at krugle describe their service like this: &lt;blockquote&gt; &lt;h3&gt;Product - Find what you need &lt;/h3&gt; &lt;p&gt;Krugle helps you find the code you need and the related technical and licensing information to evaluate and use that code. And once you’ve found what you need, Krugle lets you save it and share it. The process of searching, evaluating and communicating are dramatically faster with Krugle.  &lt;p&gt;Krugle was designed by programmers, for programmers. As a result, it is much more than just a search engine for code. It’s a powerful tool designed to provide the critical information software developers need.  &lt;h3&gt;&lt;br&gt;Find Code &lt;/h3&gt; &lt;p&gt;Unlike conventional search engines, Krugle is designed to locate code. Krugle supports code search by crawling, parsing and indexing code found in all open source repositories, as well as code that exists in archives, mailing lists, blogs, and web pages. And Krugle makes navigating code repositories easy. Start with a single source file and then view its relationship to another file, to understand its use and dependencies. This ability to interactively browse and explore code in a meaningful context provides a more informed view and reduces the time required to make good code decisions. &lt;/blockquote&gt; &lt;p&gt;You can read the full text &lt;a href="http://corp.krugle.com/product/index.html"&gt;here&lt;/a&gt;.  &lt;p&gt;Krugle did already help me, maybe it can also help you &lt;img alt="smile_regular" src="http://spaces.live.com/rte/emoticons/smile_regular.gif"&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2759794756127330307&amp;page=RSS%3a+Searching+for+some+code...Krugle+to+the+rescue!&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bertjansen.spaces.live.com&amp;amp;GT1=bertjansen"&gt;</description><comments>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!183.entry#comment</comments><guid isPermaLink="true">http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!183.entry</guid><pubDate>Fri, 29 Sep 2006 06:29:36 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bertjansen.spaces.live.com/blog/cns!D9B33D4A940B6FFD!183/comments/feed.rss</wfw:commentRss><wfw:comment>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!183.entry#comment</wfw:comment><dcterms:modified>2006-09-29T06:29:36Z</dcterms:modified></item><item><title>New Release! Windows Live Writer 1.0 (Beta) Update with Windows Live Gallery</title><link>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!179.entry</link><description>&lt;p&gt;  &lt;p&gt;This update to Windows Live Writer 1.0 (Beta) features: &lt;ul&gt; &lt;li&gt;Tagging support  &lt;li&gt;Support for Blogger Beta  &lt;li&gt;Improvements to categories  &lt;li&gt;And more...(details below)&lt;/ul&gt; &lt;p&gt;You can also now visit the &lt;a href="http://gallery.live.com/writer/"&gt;Writer community on Windows Live Gallery&lt;/a&gt; to download more plugins and extensions for Writer.  Some of the plugins currently featured on Gallery are:  &lt;ul&gt; &lt;li&gt;&amp;quot;Blog This&amp;quot; Extensions for IE &amp;amp; Firefox  &lt;li&gt;Emoticon, Eventful, and Flickr plug-ins for inserting more rich content&lt;/ul&gt; &lt;p&gt;Read the full story &lt;a href="http://windowslivewriter.spaces.live.com/blog/cns!D85741BB5E0BE8AA!702.entry?_c11_blogpart_blogpart=blogview&amp;amp;_c=blogpart#permalink"&gt;here&lt;/a&gt;. &lt;h2&gt;Does it fix the image upload problem?&lt;/h2&gt; &lt;p&gt;&lt;a href="http://tk1.storage.msn.com/x1pqP5noGPWAA72fBH2VJZUMGXEQ05au1gjtD8YR1DBQm5BUO-A8Y5rpi5uoAKxhTCiXwX6JJ9GA2qWZ3pzdJYsfjdlaYpk4YSAGCzbhvuXMdcPQi5Fh53VhWPQkYbgsLvlbN2e1bH4nCRpAEGn_BIzmw"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height=77 src="http://tk1.storage.msn.com/x1pqP5noGPWAA72fBH2VJZUMGXEQ05au1gjtD8YR1DBQm6TFsOv86gxB9XVJ7wNOqrFcW6yWHlTBuO5Vq8dQxJ8BF0cQqwak1cTIjYGNBJJveYvsxVVJjgAdAWR_TjC-AMnPbXBw9cA9x3X6vN1jEIgXg" width=640 border=0&gt;&lt;/a&gt;  &lt;p&gt;If the image is visible then it's solved...&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2759794756127330307&amp;page=RSS%3a+New+Release!+Windows+Live+Writer+1.0+(Beta)+Update+with+Windows+Live+Gallery&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bertjansen.spaces.live.com&amp;amp;GT1=bertjansen"&gt;</description><comments>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!179.entry#comment</comments><guid isPermaLink="true">http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!179.entry</guid><pubDate>Thu, 28 Sep 2006 11:21:47 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bertjansen.spaces.live.com/blog/cns!D9B33D4A940B6FFD!179/comments/feed.rss</wfw:commentRss><wfw:comment>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!179.entry#comment</wfw:comment><dcterms:modified>2006-09-28T13:48:39Z</dcterms:modified></item><item><title>Visual Studio 2005 Service Pack 1 Beta</title><link>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!176.entry</link><description>&lt;p&gt; &lt;p&gt;&lt;font face=Verdana size=2&gt;Somasegar &lt;/font&gt;&lt;a href="http://blogs.msdn.com/somasegar/archive/2006/09/26/772250.aspx"&gt;&lt;font face=Verdana size=2&gt;mentions&lt;/font&gt;&lt;/a&gt;&lt;font face=Verdana size=2&gt; the release of Visual Studio 2005 Service Pack 1 Beta.&lt;/font&gt; &lt;p&gt;&lt;font face=Verdana size=2&gt;“Microsoft is committed to making customers successful with Visual Studio 2005. As part of this continuing effort, Microsoft has released the Visual Studio 2005 Service Pack 1 (SP1) Beta. Visual Studio 2005 shipped in November of 2005 and this Service Pack incorporates fixes that we have addressed since that release.”&lt;/font&gt; &lt;p&gt;&lt;font face=Verdana size=2&gt;You can learn more about Visual Studio 2005 Service Pack 1 Beta &lt;/font&gt;&lt;a href="http://connect.microsoft.com/VisualStudio/content/content.aspx?ContentID=3311"&gt;&lt;font face=Verdana size=2&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font face=Verdana size=2&gt;. &lt;/font&gt; &lt;p&gt;&lt;font size=2&gt;&lt;/font&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2759794756127330307&amp;page=RSS%3a+Visual+Studio+2005+Service+Pack+1+Beta&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bertjansen.spaces.live.com&amp;amp;GT1=bertjansen"&gt;</description><comments>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!176.entry#comment</comments><guid isPermaLink="true">http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!176.entry</guid><pubDate>Tue, 26 Sep 2006 20:31:41 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bertjansen.spaces.live.com/blog/cns!D9B33D4A940B6FFD!176/comments/feed.rss</wfw:commentRss><wfw:comment>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!176.entry#comment</wfw:comment><dcterms:modified>2006-09-26T20:31:41Z</dcterms:modified></item><item><title>The ClickOnce saga continues...</title><link>http://bertjansen.spaces.live.com/Blog/cns!D9B33D4A940B6FFD!174.entry</link><description>&lt;p&gt;Ever tried to use &lt;a href="http://msdn.microsoft.com/netframework/windowsforms/learning/features/clickonce"&gt;ClickOnce&lt;/a&gt; for an application that has to function with very limited available bandwidth and will work both online and offline (the so-called &lt;a href="http://msdn.microsoft.com/smartclient/"&gt;smart client&lt;/a&gt; applications)  ?? Doing this will confront you with some ClickOnce limitations: &lt;ul&gt; &lt;li&gt;The application and manifest files are always downloaded because they are needed to verify the locally installed bits. On a slow line (&lt;a href="http://en.wikipedia.org/wiki/GPRS"&gt;GPRS&lt;/a&gt; has an average capacity of 40 Kbit/s) combined with a rather large manifest (+100 Kb) this will take quite some time... &lt;li&gt;When your application contains hundreds of files deployed by ClickOnce, then the ClickOnce processing takes minutes on an average laptop... &lt;li&gt;When there's no connection available, e.g. due to no GPRS coverage, ClickOnce will try to connect four times where each attempt waits for a timeout. This takes an unacceptable amount of time when your application is designed to also function offline.&lt;/ul&gt; &lt;p&gt;Although ClickOnce has some drawbacks as mentioned above, it still is a great way to push your application updates. So what can we do about this? &lt;p&gt;The answer is simple, just manage the ClickOnce usage yourself instead of having the Microsoft.Net framework doing it. This is all made possible by the simple fact that the complete ClickOnce functionality is an integral part of the .Net 2.0 framework (the main namespace is &lt;a href="http://msdn2.microsoft.com/en-us/library/system.deployment.application.aspx"&gt;System.Deployment.Application&lt;/a&gt;).  &lt;p&gt;Currently I'm using ClickOnce like this: &lt;ol&gt; &lt;li&gt;Download a version.txt file that resides in root of my deployment IIS. This file contains the version number of the latest deployed version (e.g. 1.1.0.157). This is very simple using the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.net.webrequest.aspx"&gt;WebRequest&lt;/a&gt; class for the HTTP GET and ApplicationDeployment.CurrentDeployment.UpdateLocation.AbsoluteUri to get the ClickOnce URI &lt;li&gt;Compare the version in version.txt with the locally installed version which can be retrieved by the following statement: &lt;a href="http://msdn2.microsoft.com/en-us/library/system.deployment.application.applicationdeployment.currentversion.aspx"&gt;ApplicationDeployment.CurrentDeployment.CurrentVersion&lt;/a&gt; &lt;li&gt;If they match, then the update process ends here and you can continue with your application. This results in superior application startup times compared to the default ClickOnce implementation &lt;img alt="smile_teeth" src="http://spaces.live.com/rte/emoticons/smile_teeth.gif"&gt; &lt;li&gt;If there's a difference that you need to trigger ClickOnce yourself in order to update your app. This can be done by using the following methods of &lt;a href="http://msdn2.microsoft.com/en-us/library/system.deployment.application.applicationdeployment.currentdeployment.aspx"&gt;ApplicationDeployment.CurrentDeployment&lt;/a&gt;: CheckForDetailedUpdate, UpdateAsync. It's easy to integrate this manually triggered ClickOnce update with a UI containing a progress bar and a cancel button which gives your users some feedback...and can be localized...another plus &lt;img alt="smile_wink" src="http://spaces.live.com/rte/emoticons/smile_wink.gif"&gt;&lt;/ol&gt; &lt;p&gt;To ensure that you completely skip the ClickOnce stuff when working offline you need to know whether your offline or not. Depending on the situation this can be easily accomplished by using the new &lt;a href="http://msdn2.microsoft.com/en-us/library/system.net.networkinformation.ping.aspx"&gt;Ping class in the System.Net.NetworkInformation namespace&lt;/a&gt;:  &lt;div&gt;&lt;pre&gt;&lt;div&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;private&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;bool&lt;/span&gt;&lt;span style="color:#000000"&gt; NetWorkPing(&lt;/span&gt;&lt;span style="color:#0000FF"&gt;string&lt;/span&gt;&lt;span style="color:#000000"&gt; serverName)
 {
     Ping pingSender &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;new&lt;/span&gt;&lt;span style="color:#000000"&gt; Ping();
     PingOptions options &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;new&lt;/span&gt;&lt;span style="color:#000000"&gt; PingOptions();

     &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; Use the default Ttl value which is 128,
     &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; but change the fragmentation behavior.&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;     options.DontFragment &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;true&lt;/span&gt;&lt;span style="color:#000000"&gt;;

     &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt; Create a buffer of 32 bytes of data to be transmitted.&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;     &lt;/span&gt;&lt;span style="color:#0000FF"&gt;string&lt;/span&gt;&lt;span style="color:#000000"&gt; data &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000"&gt;aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&lt;/span&gt;&lt;span style="color:#000000"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000"&gt;;
     &lt;/span&gt;&lt;span style="color:#0000FF"&gt;byte&lt;/span&gt;&lt;span style="color:#000000"&gt;[] buffer &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; Encoding.ASCII.GetBytes(data);
     &lt;/span&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt;&lt;span style="color:#000000"&gt; timeout &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#000000"&gt;500&lt;/span&gt;&lt;span style="color:#000000"&gt;;
     &lt;/span&gt;&lt;span style="color:#0000FF"&gt;try&lt;/span&gt;&lt;span style="color:#000000"&gt;
     {
        &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt;Verifying if backoffice can be reached (attempt 1)...&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;         PingReply reply &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; pingSender.Send(serverName, timeout, buffer, options);
         &lt;/span&gt;&lt;span style="color:#0000FF"&gt;if&lt;/span&gt;&lt;span style="color:#000000"&gt; (reply.Status &lt;/span&gt;&lt;span style="color:#000000"&gt;==&lt;/span&gt;&lt;span style="color:#000000"&gt; IPStatus.Success)
         {
             &lt;/span&gt;&lt;span style="color:#0000FF"&gt;return&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#0000FF"&gt;true&lt;/span&gt;&lt;span style="color:#000000"&gt;;
         }
         &lt;/span&gt;&lt;span style="color:#0000FF"&gt;else&lt;/span&gt;&lt;span style="color:#000000"&gt;
         {
             &lt;/span&gt;&lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;span style="color:#008000"&gt;Verifying if backoffice can be reached (attempt 2)...&lt;/span&gt;&lt;span style="color:#008000"&gt;
&lt;/span&gt;&lt;span style="color:#000000"&gt;             reply &lt;/span&gt;&lt;span style="color:#000000"&gt;=&lt;/span&gt;&lt;span style="color:#000000"&gt; pingSender.Send(serverName, timeout &lt;/span&gt;&lt;span style="color:#000000"&gt;*&lt;/span&gt;&lt;span style="color:#000000"&gt; &lt;/span&gt;&lt;span style="color:#000000"&gt;4&lt;/span&gt;&lt;span style="color:#000000"&gt;, buffer, options);
             &lt;/span&gt;&lt;span style="color:#0000FF"&gt;if&lt;/span&gt;&lt;span style="color:#000000"&gt; (reply.Status &lt;/span&gt;&lt;span style="color:#000000"&gt;==&lt;/span&gt;&lt;span style="color:#000000"&gt; IPStatus.Success)
             {
                 &lt;/span&g