<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Channel 9 - Discussions by NotSoTragicHero</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS"></atom:link>
	<image>
		<url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
		<title>Channel 9 - Discussions by NotSoTragicHero</title>
		<link>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions</link>
	</image>
	<description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
	<link>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions</link>
	<language>en</language>
	<pubDate>Tue, 21 May 2013 18:34:46 GMT</pubDate>
	<lastBuildDate>Tue, 21 May 2013 18:34:46 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<c9:totalResults>0</c9:totalResults>
	<c9:pageCount>0</c9:pageCount>
	<c9:pageSize>0</c9:pageSize>
	<item>
		<title>Tech Off - Where do I look to find what I want?</title>
		<description><![CDATA[<p>A few places.</p>
<p>&nbsp;</p>
<p>Check out the MSDN Library. &nbsp;Along with the API, it has a lot of good references and tutorials.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/default.aspx"></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/default.aspx">http://msdn.microsoft.com/en-us/library/default.aspx</a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/default.aspx"></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/default.aspx"></a></p>
<p>&nbsp;</p>
<p>If you can't find what you need by doing a Google search, you can always just ask here, or on the MSDN or CodeProject forums:</p>
<p><a href="http://social.msdn.microsoft.com/Forums/en-US/categories">http://social.msdn.microsoft.com/Forums/en-US/categories</a></p>
<p><a href="http://social.msdn.microsoft.com/Forums/en-US/categories"></a><a href="http://www.codeproject.com/script/Forums/List.aspx">http://www.codeproject.com/script/Forums/List.aspx</a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/default.aspx"></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/default.aspx"></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/default.aspx"></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/default.aspx"></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/default.aspx"></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/default.aspx"></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/default.aspx"></a></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/564878-Where-do-I-look-to-find-what-I-want/b512c672fd374e119a369dea00aac1b6#b512c672fd374e119a369dea00aac1b6</link>
		<pubDate>Wed, 04 Aug 2010 13:59:34 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/564878-Where-do-I-look-to-find-what-I-want/b512c672fd374e119a369dea00aac1b6#b512c672fd374e119a369dea00aac1b6</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>8</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Using RasGetEntryProperties in .NET CF</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">vletoux said:</div><div class="quoteText">
<p><span></p>
<pre class="code"><span class="keyword">&quot;int</span> lpdwSize&quot; should be &quot;ref uint lpdwSize&quot;</pre>
</span>
<p></p>
<p><span></p>
<pre class="code"><br></pre>
</span>
<p></p>
<p>&nbsp;</p>
</div></blockquote>
<p>Thanks! &nbsp;That at least stopped the native exception I was getting.</p>
<p>&nbsp;</p>
<p>However, the function now returns&nbsp;ERROR_NOINTERFACE. &nbsp;Is the function definition still wrong?</p>
<p></p>
<pre class="brush: csharp">[DllImport(&quot;coredll.dll&quot;)]
        private extern static uint RasGetEntryProperties(string lpszPhoneBook, string szEntry, ref RASENTRY lpbEntry,
            ref uint lpdwEntrySize, byte lpb, ref uint lpdwSize);</pre>
<p></p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/562359-Using-RasGetEntryProperties-in-NET-CF/77e64cc901c143b9a68b9dea00aaa95e#77e64cc901c143b9a68b9dea00aaa95e</link>
		<pubDate>Tue, 03 Aug 2010 17:09:48 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/562359-Using-RasGetEntryProperties-in-NET-CF/77e64cc901c143b9a68b9dea00aaa95e#77e64cc901c143b9a68b9dea00aaa95e</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>7</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Using RasGetEntryProperties in .NET CF</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">NotSoTragicHero said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">davewill said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>*delete*</p>
</div></blockquote>
<p>I've updated the first post to better reflect the current problem. &nbsp;Thanks.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/562359-Using-RasGetEntryProperties-in-NET-CF/eef1b0980bdd420fa8719dea00aaa91e#eef1b0980bdd420fa8719dea00aaa91e</link>
		<pubDate>Thu, 29 Jul 2010 15:32:04 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/562359-Using-RasGetEntryProperties-in-NET-CF/eef1b0980bdd420fa8719dea00aaa91e#eef1b0980bdd420fa8719dea00aaa91e</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>7</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Using RasGetEntryProperties in .NET CF</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">davewill said:</div><div class="quoteText">
<p>DWORD RasGetEntryProperties(<br>
&nbsp; LPWSTR lpszPhoneBook, <br>
&nbsp; LPWSTR szEntry, <br>
&nbsp; LPRASENTRY lpbEntry, <br>
&nbsp; LPDWORD lpdwEntrySize, <br>
&nbsp; LPBYTE lpb, <br>
&nbsp; LPDWORD lpdwSize <br>
);</p>
<p><span class="keyword">&quot;string</span> lpb&quot; might be the one that isn't right.&nbsp; not sure though.</p>
</div></blockquote>
<p>*delete*</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/562359-Using-RasGetEntryProperties-in-NET-CF/365a1dbf8d69447cbabc9dea00aaa916#365a1dbf8d69447cbabc9dea00aaa916</link>
		<pubDate>Tue, 27 Jul 2010 20:26:21 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/562359-Using-RasGetEntryProperties-in-NET-CF/365a1dbf8d69447cbabc9dea00aaa916#365a1dbf8d69447cbabc9dea00aaa916</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>7</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Using RasGetEntryProperties in .NET CF</title>
		<description><![CDATA[<p>*delete*</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/562359-Using-RasGetEntryProperties-in-NET-CF/c2fd38766d1d4a178ede9dea00aaa906#c2fd38766d1d4a178ede9dea00aaa906</link>
		<pubDate>Tue, 20 Jul 2010 15:30:14 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/562359-Using-RasGetEntryProperties-in-NET-CF/c2fd38766d1d4a178ede9dea00aaa906#c2fd38766d1d4a178ede9dea00aaa906</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>7</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Using RasGetEntryProperties in .NET CF</title>
		<description><![CDATA[<p>&nbsp;</p>
<p><font face="'Segoe UI', Verdana, Arial, Helvetica, sans-serif" size="3" color="#2A0F01"></font></p>
<p><font face="'Segoe UI', Verdana, Arial, Helvetica, sans-serif" size="3" color="#2A0F01"></font></p>
<p><font face="'Segoe UI', Verdana, Arial, Helvetica, sans-serif" size="3" color="#2A0F01"></font></p>
<p><font face="'Segoe UI', Verdana, Arial, Helvetica, sans-serif" size="3" color="#2A0F01"></font></p>
<p><font face="'Segoe UI', Verdana, Arial, Helvetica, sans-serif" size="3" color="#2A0F01"></font></p>
<p><font face="'Segoe UI', Verdana, Arial, Helvetica, sans-serif" size="3" color="#2A0F01"><span>It seems that I can't get this right... I'm using the following signature:</span></font></p>
<p>&nbsp;</p>
<p><span></p>
<pre class="brush: csharp">[DllImport(&quot;coredll.dll&quot;, CharSet = CharSet.Auto)]
    private extern static uint RasGetEntryProperties(string lpszPhoneBook, string szEntry, ref RASENTRY lpbEntry, ref int lpdwEntrySize, byte lpb, int lpdwSize);</pre>
</span>
<p></p>
<p>&nbsp;</p>
<p><font face="'Segoe UI', Verdana, Arial, Helvetica, sans-serif" size="3" color="#2A0F01"><span>Calling it with the following parameters:</span></font></p>
<p><font face="'Segoe UI', Verdana, Arial, Helvetica, sans-serif" size="3" color="#2A0F01"><span></p>
<pre class="brush: csharp">RasGetEntryProperties(null, name, ref RasEntry, ref dwSize, 0, 128);</pre>
</span></font>
<p></p>
<p>&nbsp;</p>
<p>However, whenever this is called, an error pops up on my device telling me there has been a native exception, without much detail.</p>
<p>I've declared the RASENTRY struct as follows:</p>
<p></p>
<pre class="brush: csharp">private struct RASENTRY
    {
      public int dwSize;
      public int dwfOptions;
      public int dwCountryID;
      public int dwCountryCode;
      [MarshalAs(UnmanagedType.ByValTStr, SizeConst = RAS_MaxAreaCode &#43; 1)]
      public string szAreaCode;
      [MarshalAs(UnmanagedType.ByValTStr, SizeConst = RAS_MaxPhoneNumber &#43; 1)]
      public string szLocalPhoneNumber;
      public int dwAlternatesOffset;
      public RASIPADDR ipaddr;
      public RASIPADDR ipaddrDns;
      public RASIPADDR ipaddrDnsAlt;
      public RASIPADDR ipaddrWins;
      public RASIPADDR ipaddrWinsAlt;
      public int dwFrameSize;
      public int dwfNetProtocols;
      public int dwFramingProtocol;
      [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAX_PATH &#43; 1)]
      public string szScript;
      [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAX_PATH &#43; 1)]
      public string szAutoDialDll;
      [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAX_PATH &#43; 1)]
      public string szAutoDialFunc;
      [MarshalAs(UnmanagedType.ByValTStr, SizeConst = RAS_MaxDeviceType &#43; 1)]
      public string szDeviceType;
      [MarshalAs(UnmanagedType.ByValTStr, SizeConst = RAS_MaxDeviceName &#43; 1)]
      public string szDeviceName;
      [MarshalAs(UnmanagedType.ByValTStr, SizeConst = RAS_MaxPadType &#43; 1)]
      public string szX25PadType;
      [MarshalAs(UnmanagedType.ByValTStr, SizeConst = RAS_MaxX25Address &#43; 1)]
      public string szX25Address;
      [MarshalAs(UnmanagedType.ByValTStr, SizeConst = RAS_MaxFacilities &#43; 1)]
      public string szX25Facilities;
      [MarshalAs(UnmanagedType.ByValTStr, SizeConst = RAS_MaxUserData &#43; 1)]
      public string szX25UserData;
      public int dwChannels;
      public int dwReserved1;
      public int dwReserved2;
      public int dwCustomAuthKey;
    }</pre>
<p></p>
<p>&nbsp;</p>
<p>Any help would be appreciated, thanks!</p>
<p>&nbsp;</p>
<p>-Brandon</p>
<p>&nbsp;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/562359-Using-RasGetEntryProperties-in-NET-CF/562359#562359</link>
		<pubDate>Tue, 20 Jul 2010 14:15:18 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/562359-Using-RasGetEntryProperties-in-NET-CF/562359#562359</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>7</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Retrieving the External IP in WinCE</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">davewill said:</div><div class="quoteText">
<p>Sounds like you don't need anything fancy.&nbsp; Here is a down and dirty.&nbsp; New .NET CE project with Form1, add textbox1 (multiline) and 1 button.&nbsp; Basic code found in help file for WebRequest.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><font size="2" color="#0000ff"><font size="2" color="#0000ff"></p>
<p>Imports</p>
<p>&nbsp;</p>
</font></font>
<p><font size="2">System.Net</font></p>
<p>&nbsp;</p>
<font size="2" color="#0000ff"><font size="2" color="#0000ff">
<p>Imports</p>
<p>&nbsp;</p>
</font></font>
<p><font size="2">System.IO</font></p>
<p>&nbsp;</p>
<font size="2" color="#0000ff"><font size="2" color="#0000ff">
<p>Public</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</font></font>
<p><font size="2" color="#0000ff"><font size="2" color="#0000ff">Class</font></font><font size="2"> Form1</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Private</font></font><font size="2">
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Sub</font></font><font size="2"> Button1_Click(</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">ByVal</font></font><font size="2"> sender
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> System.Object,
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">ByVal</font></font><font size="2"> e
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> System.EventArgs)
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Handles</font></font><font size="2"> Button1.Click</font><font size="2" color="#008000"><font size="2" color="#008000">' Create a request for the URL.
</font></font></p>
<p>&nbsp;</p>
<font size="2">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</font>
<p><font size="2" color="#0000ff"><font size="2" color="#0000ff">Dim</font></font><font size="2"> request
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> WebRequest = WebRequest.Create(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&quot;<a href="http://www.whatismyip.com&quot;">http://www.whatismyip.com&quot;</a></font></font><font size="2">)</font><font size="2" color="#008000"><font size="2" color="#008000">'
 If required by the server, set the credentials.</font></font></p>
<p>&nbsp;</p>
<font size="2">
<p>request.Credentials = CredentialCache.DefaultCredentials</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</font>
<p><font size="2" color="#008000"><font size="2" color="#008000">' Get the response.</font></font></p>
<p>&nbsp;</p>
<font size="2">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</font>
<p><font size="2" color="#0000ff"><font size="2" color="#0000ff">Dim</font></font><font size="2"> response
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> HttpWebResponse =
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">CType</font></font><font size="2">(request.GetResponse(), HttpWebResponse)</font><font size="2" color="#008000"><font size="2" color="#008000">' Display the status.</font></font></p>
<p>&nbsp;</p>
<font size="2">
<p>TextBox1.Text = </p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</font>
<p><font size="2" color="#a31515"><font size="2" color="#a31515">&quot;Status=&quot;</font></font><font size="2"> &amp; response.StatusDescription</font><font size="2" color="#008000"><font size="2" color="#008000">' Get the stream containing content returned by the server.</font></font></p>
<p>&nbsp;</p>
<font size="2">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</font>
<p><font size="2" color="#0000ff"><font size="2" color="#0000ff">Dim</font></font><font size="2"> dataStream
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> Stream = response.GetResponseStream()</font><font size="2" color="#008000"><font size="2" color="#008000">' Open the stream using a StreamReader for easy access.</font></font></p>
<p>&nbsp;</p>
<font size="2">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</font>
<p><font size="2" color="#0000ff"><font size="2" color="#0000ff">Dim</font></font><font size="2"> reader
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2">
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">New</font></font><font size="2"> StreamReader(dataStream)</font><font size="2" color="#008000"><font size="2" color="#008000">' Read the content.</font></font></p>
<p>&nbsp;</p>
<font size="2">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</font>
<p><font size="2" color="#0000ff"><font size="2" color="#0000ff">Dim</font></font><font size="2"> responseFromServer
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2">
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">String</font></font><font size="2"> = reader.ReadToEnd()</font><font size="2" color="#008000"><font size="2" color="#008000">' Display the content.</font></font></p>
<p>&nbsp;</p>
<font size="2">
<p>TextBox1.Text &amp;= responseFromServer</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</font>
<p><font size="2" color="#008000"><font size="2" color="#008000">' Cleanup the streams and the response.</font></font></p>
<p>&nbsp;</p>
<font size="2">
<p>reader.Close()</p>
<p>dataStream.Close()</p>
<p>response.Close()</p>
<p>TextBox1.SelectionStart = TextBox1.Text.IndexOf(</p>
<p>TextBox1.ScrollToCaret()</p>
<p>&nbsp;</p>
<p>End</p>
<p>&nbsp;</p>
</font>
<p><font size="2" color="#a31515"><font size="2" color="#a31515">&quot;Your IP Address Is&quot;</font></font><font size="2">, StringComparison.InvariantCultureIgnoreCase)</font></p>
<p><font size="2" color="#0000ff"><font size="2" color="#0000ff">End</font></font><font size="2">
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Sub</font></font><font size="2">
</font></p>
<p></p>
<p><font size="2" color="#0000ff"><font size="2" color="#0000ff">End Class</font></font></p>
<p>&nbsp;</p>
<p><font size="2" color="#0000ff">Edit: Code insert thingy butchered the code.&nbsp; figured a basic paste was more readable.</font></p>
</div></blockquote>
<p>Thanks for your help once again. &nbsp; <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-2.gif' alt='Big Smile' /></p>
<p>&nbsp;</p>
<p>That worked&nbsp;beautifully. &nbsp;However, it looks as if the modem isn't letting me remotely connect to my device through it <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-6.gif' alt='Sad' /></p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554471-Retrieving-the-External-IP-in-WinCE/d25899c163fe4150a7e89dea00aa422b#d25899c163fe4150a7e89dea00aa422b</link>
		<pubDate>Tue, 08 Jun 2010 13:02:18 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554471-Retrieving-the-External-IP-in-WinCE/d25899c163fe4150a7e89dea00aa422b#d25899c163fe4150a7e89dea00aa422b</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>4</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Retrieving the External IP in WinCE</title>
		<description><![CDATA[<p>We have a WinCE device connected to the net via GSM modem. &nbsp;Our main problem is that we can't remote-connect to this device through VS for deployment and debugging like we can when it is connected via WiFi. &nbsp;We need the external IP of this device to do so,
 but &quot;ipconfig&quot; will only give us the IP assigned by the modem, and not the actual external IP. &nbsp;The device was not flashed with a browser, so we can't even navigate to &quot;whatismyip.com&quot; to get this information.</p>
<p>&nbsp;</p>
<p>So long story short, how can I get my devices external IP, or at the very least remote connect to my device through VS when it's using an external modem?</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554471-Retrieving-the-External-IP-in-WinCE/554471#554471</link>
		<pubDate>Mon, 07 Jun 2010 14:16:02 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554471-Retrieving-the-External-IP-in-WinCE/554471#554471</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>4</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Fighting for Top-Most Window in WinCE</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">figuerres said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">NotSoTragicHero said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>in my app i found that you must do some things in the right order and it's not as simple as it could be.</p>
<p>&nbsp;</p>
<p>here is part of the code, i use the OpenNetCF for part of how it does is't thing.</p>
<p>&nbsp;</p>
<p></p>
<pre class="brush: csharp">
using System; using System.Text;
 using OpenNETCF.Win32; 
using System.Windows.Forms; 
namespace PocketN { 
public class NoTaskBar { 
public static void Hide(Form F) {
 F.Capture = true;
 Win32Window hwnd = Win32Window.GetCapture();
 F.Capture = false;
 hwnd.ExtendedStyle |= WS_EX.NOANIMATION;
 } 
private const uint TOPFULL = 0x20000008; 
private const uint TOPFULLNOICON = 0x24000008; 
public static void FullScreen(Form F, bool TaskIcon) { 
F.SuspendLayout(); F.Capture = true; 
Win32Window hwnd = Win32Window.GetCapture(); 
F.Capture = false; F.WindowState = FormWindowState.Normal;
 if (Program.FullScreen) {
 // full 
if ((Program.CurrentPlatform == Platforms.Casio) &amp;&amp; (Program.Taskbar.TaskBarVisible)) { 
Program.Taskbar.HideTaskBar(); 
} 
if (Program.CurrentPlatform != Platforms.Casio) {
 if (!TaskIcon) { 
hwnd.ExtendedStyle = (WS_EX)TOPFULLNOICON; 
} else { 
hwnd.ExtendedStyle = (WS_EX)TOPFULL; 
} 
F.Top = 28; F.Left = 0;
 F.Width = Screen.PrimaryScreen.WorkingArea.Width - 6;
 F.Height = Screen.PrimaryScreen.WorkingArea.Height - 6;
 } else {
 if (!TaskIcon) {
 hwnd.ExtendedStyle |= WS_EX.NOANIMATION; 
} else { 
hwnd.ExtendedStyle = WS_EX.NONE; 
}
 F.Top = 0; 
F.Left = 0;
 F.Width = Screen.PrimaryScreen.Bounds.Width;
 F.Height = Screen.PrimaryScreen.Bounds.Height;
 }
 } else { 
// normal 
if ((Program.CurrentPlatform == Platforms.Casio) &amp;&amp; (!Program.Taskbar.TaskBarVisible)) {
 Program.Taskbar.ShowTaskBar(); 
}
 if (!TaskIcon) { 
hwnd.ExtendedStyle |= WS_EX.NOANIMATION;
 } else {
 hwnd.ExtendedStyle = WS_EX.NONE; 
} 
if (Program.CurrentPlatform == Platforms.Casio) { 
F.Top = 0; F.Left = 0; F.Width = Screen.PrimaryScreen.Bounds.Width;
 F.Height = Screen.PrimaryScreen.WorkingArea.Height - 3; 
} else {
 F.Top = 28;
 F.Left = 0; 
F.Width = Screen.PrimaryScreen.WorkingArea.Width - 6; 
F.Height = Screen.PrimaryScreen.WorkingArea.Height - 6; 
} 
}
 F.ResumeLayout(); 
} 
} 
}
 </pre>
<p></p>
<p>&nbsp;</p>
<p>Insert Code Block SUCKS!!! it totaly hosed the formatting!</p>
</div></blockquote>
<p>Thanks bud! &nbsp;We've hacked it for now, (doing a lot of invalidating&nbsp; <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-7.gif' alt='Perplexed' /> ), but we'll probably have to come back to this soon when it comes to deployment time. &nbsp;I'll take note!</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/552822-Fighting-for-Top-Most-Window-in-WinCE/4d91788035a84dfb93949deb000e8da5#4d91788035a84dfb93949deb000e8da5</link>
		<pubDate>Wed, 02 Jun 2010 17:06:42 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/552822-Fighting-for-Top-Most-Window-in-WinCE/4d91788035a84dfb93949deb000e8da5#4d91788035a84dfb93949deb000e8da5</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>5</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Creating a New DUN Connection Programatically</title>
		<description><![CDATA[<p>We're in the process of getting ready to deploy a large number of WinCE MDTs. &nbsp;Since we have so many, we're going to have to do most of our set up programatically. &nbsp;What we're looking for is a way to actually create a completely new DUN / GSM over serial
 connection if it doesn't already exist, with everything it needs (APN, phone #, etc) to function and connect. &nbsp;Are there a set of native functions in coredll that can do this, or are we hoping for too much here?</p>
<p>&nbsp;</p>
<p>Thanks!</p>
<p>-Brandon</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/553589-Creating-a-New-DUN-Connection-Programatically/553589#553589</link>
		<pubDate>Wed, 02 Jun 2010 17:04:06 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/553589-Creating-a-New-DUN-Connection-Programatically/553589#553589</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>1</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Fighting for Top-Most Window in WinCE</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">figuerres said:</div><div class="quoteText">
<p>Hmm....</p>
<p>you may need to do something like i have done...</p>
<p>&nbsp;</p>
<p>in an app i wrote i had to take over the device screen, this is a dedicated sales app that the device is *ONLY* allowed to be used for this one app.</p>
<p>&nbsp;</p>
<p>i have a way that the managers and techs can take my app out of fullscreen by calling some win32 / ce system calls.</p>
<p>&nbsp;</p>
<p>if you are interested i can get some of the code later and post the bits i think you will need.</p>
</div></blockquote>
<p>Anything would help us at this point. &nbsp;I'd appreciate that, thanks. &nbsp;We have tried using SetWindowPos and SetForegroundWindow from coredll, but that hasn't seemed to help so far.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/552822-Fighting-for-Top-Most-Window-in-WinCE/09a1624b3bae4b2284c19deb000e8d46#09a1624b3bae4b2284c19deb000e8d46</link>
		<pubDate>Fri, 28 May 2010 16:59:50 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/552822-Fighting-for-Top-Most-Window-in-WinCE/09a1624b3bae4b2284c19deb000e8d46#09a1624b3bae4b2284c19deb000e8d46</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>5</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Fighting for Top-Most Window in WinCE</title>
		<description><![CDATA[<p>We're having an issue with our project. &nbsp;Our software switches back and forth between a GPS software and our program. &nbsp;We have a button that we want to paint over the GPS software. &nbsp;The purpose of this button is to navigate back to our actual program from
 the GPS software. &nbsp;However, we're having some issues with painting and the two applications fighting for a top most position. &nbsp;When we try to give our button a top most position, it keeps having its LostFocus event called, which makes me believe that the two
 are indeed fighting for top position. &nbsp;Assuming this is true, what would be the best way to go about restricting the GPS window from having the top most position?</p>
<p>&nbsp;</p>
<p>Thanks ahead of time.</p>
<p>-Brandon</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/552822-Fighting-for-Top-Most-Window-in-WinCE/552822#552822</link>
		<pubDate>Fri, 28 May 2010 16:46:16 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/552822-Fighting-for-Top-Most-Window-in-WinCE/552822#552822</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>5</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Working with CoPilot Live and the ALK C# SDK</title>
		<description><![CDATA[<p>Does anybody have any experience working with the ALK SDK for CoPilot Live? &nbsp;I figure it's a long shot, but I have some questions if so... Thanks!</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/549183-Working-with-CoPilot-Live-and-the-ALK-SDK/549183#549183</link>
		<pubDate>Mon, 10 May 2010 20:29:03 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/549183-Working-with-CoPilot-Live-and-the-ALK-SDK/549183#549183</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>1</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Issues with .NET CF Serial Communication</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">davewill said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">NotSoTragicHero said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>I can tell you that we use very similar port configuration and setup code on windows mobile devices with hardware handshaking and polling (don't use DataReceived event) and it has been solid as a rock.</p>
</div></blockquote>
<p>Update on this issue in case someone else runs into it. &nbsp;After extensive digging, we have found that the error is a hardware issue with our MDT's serial connections on it's development box. &nbsp;We have connected the GPS / GSM device to the MDT via serial /
 USB adapters, and it has been working just fine.</p>
<p>&nbsp;</p>
<p>PROTIP: When serial development isn't going as planned, check for hardware issues.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/8765f3b160fd4eafbe799deb000cbcd7#8765f3b160fd4eafbe799deb000cbcd7</link>
		<pubDate>Wed, 07 Apr 2010 20:03:16 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/8765f3b160fd4eafbe799deb000cbcd7#8765f3b160fd4eafbe799deb000cbcd7</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>23</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Issues with .NET CF Serial Communication</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">davewill said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">NotSoTragicHero said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>Bummer.&nbsp; I don't know what else to suggest.</p>
</div></blockquote>
<p>Yeah, we've been playing around with this for the better part of over a month now...</p>
<p>&nbsp;</p>
<p>I do appreciate all of your help though. If this is ever solved, I'll be sure to post.</p>
<p>&nbsp;</p>
<p>Thanks!</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/00802633d3f64991b5679deb000cbc7e#00802633d3f64991b5679deb000cbc7e</link>
		<pubDate>Fri, 12 Mar 2010 22:02:32 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/00802633d3f64991b5679deb000cbc7e#00802633d3f64991b5679deb000cbc7e</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>23</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Issues with .NET CF Serial Communication</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">davewill said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">NotSoTragicHero said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>Ok.&nbsp; How about old school polling with a timer just to see if anything shows up.&nbsp; Does that work?</p>
<p>&nbsp;</p>
<p>&nbsp; Private Sub ReadFromPort()<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If port.BytesToRead = 0 Then Exit Sub<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Do While port.BytesToRead &gt; 0<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Read in data...<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim b As System.Byte = CType(port.ReadByte, System.Byte)</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'TODO: put this b somewhere so we know it came in</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Loop<br>
&nbsp; End Sub</p>
<p>&nbsp;</p>
<p>sorry ... vb syntax is the way my brain works.</p>
</div></blockquote>
<p>Nothing. &nbsp;<img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-6.gif' alt='Sad' /></p>
<p>&nbsp;</p>
<p>It seems that no matter what, I can't get anything to return from this thing. &nbsp;I know the device works, as I can poll it using PuTTY just fine. &nbsp; <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-12.gif' alt='Mad' />
</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/07ccbc8e6b9e4097aa639deb000cbbf4#07ccbc8e6b9e4097aa639deb000cbbf4</link>
		<pubDate>Fri, 12 Mar 2010 21:52:15 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/07ccbc8e6b9e4097aa639deb000cbbf4#07ccbc8e6b9e4097aa639deb000cbbf4</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>23</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Issues with .NET CF Serial Communication</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">davewill said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">NotSoTragicHero said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>ok.&nbsp; so your getting problems on the ReadLine.&nbsp; That means the event is firing.&nbsp; The code needs a little work on the actual using of the received data.&nbsp; The port is setup to trigger the event when each byte enters the receive buffer (ReceivedBytesThreshold=1)&nbsp;...
 yet your DataReceived event is trying to read a line at a time rather than doing something like&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; displayString &amp;= port.ReadByte();</p>
</div></blockquote>
<p>Actually, the event isn't being fired still. &nbsp;Since it isn't fired, I'm trying to catch the data in the anonymous thread declared in the constructor for now, which is why I know the exception fires on the ReadLine. &nbsp;Trying ReadByte and ReadLine both cause
 a TimeoutException.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/4f86092018cd45358b959deb000cbb96#4f86092018cd45358b959deb000cbb96</link>
		<pubDate>Fri, 12 Mar 2010 21:30:06 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/4f86092018cd45358b959deb000cbb96#4f86092018cd45358b959deb000cbb96</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>23</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Issues with .NET CF Serial Communication</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">davewill said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">NotSoTragicHero said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>Make sure the port on the GSM side is using hardware handshaking.</p>
<p>&nbsp;</p>
<p>If you are getting a timeout on the Write then it sure sounds like it is waiting on the GSM side to give the goahead.</p>
<p>&nbsp;</p>
<p>How about the send and recv buffer sizes on both sides of the cable?&nbsp; are they sufficient.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>set port.rts = true and port.dtr = false since using hardware handshaking.</p>
</div></blockquote>
<p>The read and write buffer sizes are 4096 and 2048 respectively, so I don't think it is that.</p>
<p>&nbsp;</p>
<p>I don't believe there is any way to check the other side of the cable. &nbsp;&nbsp; <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-6.gif' alt='Sad' /></p>
<p>&nbsp;</p>
<p>The device's manual states that hardware handshaking is in fact enabled, however.</p>
<p>&nbsp;</p>
<p>Currently, I am only getting the ReadLine time out exception.</p>
<p>&nbsp;</p>
<p>Current Code:</p>
<p></p>
<pre class="brush: csharp">using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;
using System.Collections;
using System.Threading;
namespace SerialComTest
{
    public partial class form_SerialCom : Form
    {
        private SerialPort port;
        private String displayString;
        public form_SerialCom()
        {
            InitializeComponent();
            button_Send.Click &#43;= new EventHandler(button_Send_Click);
            port = new SerialPort(&quot;COM1&quot;, 115200, Parity.None, 8, StopBits.One);
            port.Open();
            port.NewLine = Environment.NewLine;
            port.RtsEnable = true;
            port.DtrEnable = false;
            port.Handshake = Handshake.RequestToSend;
            port.ReceivedBytesThreshold = 1;
            port.WriteTimeout = 500;
            port.ReadTimeout = 500;
            port.DiscardInBuffer();
            port.DiscardOutBuffer();
            port.DataReceived &#43;= new SerialDataReceivedEventHandler(port_DataReceived);
            port.ErrorReceived &#43;= new SerialErrorReceivedEventHandler(port_ErrorReceived);
            if (port.IsOpen)
            {
                textBox_Rec.Text &#43;= &quot;Connected to &quot; &#43; port.PortName &#43; Environment.NewLine;
            }
            Thread thread = new Thread(delegate()
            {
                while (true)
                {
                    try
                    {
                        String test = port.ReadLine();
                        textBox_Rec.Text &#43;= test &#43; Environment.NewLine;
                    }
                    catch (TimeoutException) { }
                }
            });
            thread.Start();
        }
        void port_ErrorReceived(object sender, SerialErrorReceivedEventArgs e)
        {
            throw new NotImplementedException();
        }
        void port_DataReceived(object sender, SerialDataReceivedEventArgs e)
        {
            displayString = port.ReadLine();
            try
            {
                this.Invoke(new EventHandler(SetText));
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
        private void SetText(object o, EventArgs e)
        {
            textBox_Rec.Text &#43;= displayString &#43; Environment.NewLine;
            displayString = string.Empty;
        }
        void button_Send_Click(object sender, EventArgs e)
        {
            try
            {
                port.WriteLine(textBox_Send.Text);
            }
            catch (TimeoutException)
            {
                textBox_Rec.Text &#43;= (&quot;The write operation timed out.&quot; &#43; Environment.NewLine);
            }
            textBox_Send.Text = &quot;&quot;;
        }
    }
}</pre>
<p></p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/9a8f47e46c4c45d9bb599deb000cbb38#9a8f47e46c4c45d9bb599deb000cbb38</link>
		<pubDate>Fri, 12 Mar 2010 21:09:16 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/9a8f47e46c4c45d9bb599deb000cbb38#9a8f47e46c4c45d9bb599deb000cbb38</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>23</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Issues with .NET CF Serial Communication</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">davewill said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">NotSoTragicHero said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>Whoa.&nbsp; Hold on.&nbsp; It sounds like your not sure which COM you need to use.&nbsp; Usually COM1 is the port that is the physical port on the windows device.&nbsp; If you are attaching the GSM unit to this physical port on the windows device then COM1 sounds more correct
 but you need to find out what that windows device normally has for COM.</p>
<p>&nbsp;</p>
<p>The cable between the windows unit and the GSM unit ... is it a hardware handshaking cable or a software handshaking cable?</p>
</div></blockquote>
<p>The Windows CE device actually has two&nbsp;physical&nbsp;ports. &nbsp;One is labeled COM1, and the other is&nbsp;labeled&nbsp;COM2. &nbsp;I physically changed the cable to COM1, and changed the port name to COM1. &nbsp;The device between the two units requires hardware handshaking.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/d3c2c7d056ef479abd919deb000cbada#d3c2c7d056ef479abd919deb000cbada</link>
		<pubDate>Fri, 12 Mar 2010 20:45:46 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/d3c2c7d056ef479abd919deb000cbada#d3c2c7d056ef479abd919deb000cbada</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>23</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Issues with .NET CF Serial Communication</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">davewill said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">NotSoTragicHero said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>comment out</p>
<p>&nbsp;</p>
<p>port.RtsEnable = <span class="keyword">true</span>;<br>
port.DtrEnable = <span class="keyword">true</span>;</p>
<p>and see if that matters.</p>
<p>&nbsp;</p>
<p>timeout on write almost sounds like a hardware handshake problem (like a pin isn't going low).</p>
</div></blockquote>
<p>Didn't change anything...&nbsp;</p>
<p>&nbsp;</p>
<p>I got past the WriteLine timeout by switching ports from COM2 to COM1. &nbsp;Maybe something with the port? &nbsp;However, now I get a timeout during the ReadLine call, and ReadExisting returns nothing. &nbsp;DataReceived still doesn't fire.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/9033f32383584782bf109deb000cba81#9033f32383584782bf109deb000cba81</link>
		<pubDate>Fri, 12 Mar 2010 20:26:15 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/9033f32383584782bf109deb000cba81#9033f32383584782bf109deb000cba81</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>23</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Issues with .NET CF Serial Communication</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">davewill said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">NotSoTragicHero said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>Do &quot;port.open()&quot; right after setting port=new rather than after setting the other port properties before the open.</p>
<p>&nbsp;</p>
<p>rule out handshaking by setting port.handshake</p>
<p>&nbsp;</p>
<p>rule out garbage by calling port.DiscardInBuffer and port.DiscardOutBuffer after setting the other port properties but before wiring up the port events.</p>
</div></blockquote>
<p>Thanks!&nbsp; <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-2.gif' alt='Big Smile' /> </p>
<p>&nbsp;</p>
<p>This definitely did something, however, I am now getting a TimeOutException (I set the read/write timeout to 500 ms after the system kept hanging) whenever I try to write anything. &nbsp;I can't seem to find anything wrong with the port properties...</p>
<p>&nbsp;</p>
<p>I feel like this is definitely a step forward, but I still have to be leaving something out somewhere...</p>
<p>&nbsp;</p>
<p>Current Code:</p>
<p></p>
<pre class="brush: csharp">using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;
using System.Collections;
namespace SerialComTest
{
    public partial class form_SerialCom : Form
    {
        private SerialPort port;
        private String displayString;
        public form_SerialCom()
        {
            InitializeComponent();
            button_Send.Click &#43;= new EventHandler(button_Send_Click);
            port = new SerialPort(&quot;COM2&quot;, 115200, Parity.None, 8, StopBits.One);
            port.Open();
            port.NewLine = &quot;\r\n&quot;;
            port.RtsEnable = true;
            port.DtrEnable = true;
            port.Handshake = Handshake.RequestToSend;
            port.ReceivedBytesThreshold = 1;
            port.WriteTimeout = 500;
            port.ReadTimeout = 500;
            port.DiscardInBuffer();
            port.DiscardOutBuffer();
            port.DataReceived &#43;= new SerialDataReceivedEventHandler(port_DataReceived);
            port.ErrorReceived &#43;= new SerialErrorReceivedEventHandler(port_ErrorReceived);
            if (port.IsOpen)
            {
                textBox_Rec.Text &#43;= &quot;Connected to &quot; &#43; port.PortName &#43; Environment.NewLine;
            }
        }
        void port_ErrorReceived(object sender, SerialErrorReceivedEventArgs e)
        {
            throw new NotImplementedException();
        }
        void port_DataReceived(object sender, SerialDataReceivedEventArgs e)
        {
            displayString = port.ReadLine();
            try
            {
                this.Invoke(new EventHandler(SetText));
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
        private void SetText(object o, EventArgs e)
        {
            textBox_Rec.Text &#43;= displayString &#43; Environment.NewLine;
            displayString = string.Empty;
        }
        void button_Send_Click(object sender, EventArgs e)
        {
            try
            {
                port.WriteLine(textBox_Send.Text);
            }
            catch (TimeoutException) { }
            textBox_Send.Text = &quot;&quot;;
        }
    }
}</pre>
<p></p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/157adc08042d427a86c09deb000cb9f8#157adc08042d427a86c09deb000cb9f8</link>
		<pubDate>Fri, 12 Mar 2010 18:47:45 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/157adc08042d427a86c09deb000cb9f8#157adc08042d427a86c09deb000cb9f8</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>23</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Issues with .NET CF Serial Communication</title>
		<description><![CDATA[<p>Our main issue, with the class in the thread that was linked, is that it fails on GetCommState(). &nbsp;We suspect that this is a problem with our DCB, in that the CoreDLL DCB is a stripped down version of the Kernel32 DCB. &nbsp;However, we've tried a ton of combinations,
 and nothing seems to work...&nbsp; <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-10.gif' alt='Embarassed' /></p>
<p>&nbsp;</p>
<p>On the other hand, we can't even get the standard SerialPort, as listed in the first post, to get any data either. &nbsp;We seem to be failing with any implementation of serial communication.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/65adb388296f477cb3ff9deb000cb994#65adb388296f477cb3ff9deb000cb994</link>
		<pubDate>Fri, 12 Mar 2010 16:57:06 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/65adb388296f477cb3ff9deb000cb994#65adb388296f477cb3ff9deb000cb994</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>23</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Issues with .NET CF Serial Communication</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">ManipUni said:</div><div class="quoteText">
<p><a href="http://channel9.msdn.com/forums/TechOff/528962-Stumbling-on-Basic-Serial-Port-IO/">http://channel9.msdn.com/forums/TechOff/528962-Stumbling-on-Basic-Serial-Port-IO/</a></p>
</div></blockquote>
<p>Ploe is my co-worker. &nbsp;His class works great using Kernel32, as I stated. &nbsp;Fails with the CoreDLL implementation. <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-6.gif' alt='Sad' /></p>
<p>&nbsp;</p>
<p>Returns a Win32Error:</p>
<p><span></span>ErrorCode: -2147467259</p>
<p><span></span>NativeErrorCode:&nbsp;12</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/ba1248a2c8a64c19a5b09deb000cb969#ba1248a2c8a64c19a5b09deb000cb969</link>
		<pubDate>Thu, 11 Mar 2010 20:51:36 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/ba1248a2c8a64c19a5b09deb000cb969#ba1248a2c8a64c19a5b09deb000cb969</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>23</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Issues with .NET CF Serial Communication</title>
		<description><![CDATA[<p>We've had more trouble than it's worth with serial communication in the compact framework for CE. &nbsp;We've tried the base SerialPort class provided, the OpenNETCF classes, and we've even tried creating our own wrapper class using the native dlls.</p>
<p>&nbsp;</p>
<p>The code is being deployed to a mobile data terminal running Windows CE, which is connected, via RS232, to a GPS/GSM unit. &nbsp;When I connect this GSM unit directly to my PC, I can connect and make&nbsp;successful&nbsp;calls to it using HyperTerminal as well as with
 our wrapper class. &nbsp;But when I convert the Kernel32 calls to CoreDLL calls, the wrapper class fails, as does the CF SerialPort and OpenNETCF classes.</p>
<p>&nbsp;</p>
<p>I've decided to start from scratch as I've been racking my brain too much and hacking away at too many things for too long now. &nbsp;Below is a quick example class I've written to communicate with the device.</p>
<p>&nbsp;</p>
<p></p>
<pre class="brush: csharp">using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;
namespace SerialComTest
{
    public partial class form_SerialCom : Form
    {
        private SerialPort port;
        private String displayString;
        public form_SerialCom()
        {
            InitializeComponent();
            button_Send.Click &#43;= new EventHandler(button_Send_Click);
            port = new SerialPort(&quot;COM2&quot;, 115200, Parity.None, 8, StopBits.One);
            port.NewLine = &quot;\r\n&quot;;
            port.RtsEnable = true;
            port.DtrEnable = true;
            port.ReceivedBytesThreshold = 1;
            port.DataReceived &#43;= new SerialDataReceivedEventHandler(port_DataReceived);
            port.ErrorReceived &#43;= new SerialErrorReceivedEventHandler(port_ErrorReceived);
            port.Open();
            if (port.IsOpen)
            {
                textBox_Rec.Text &#43;= &quot;Connected to &quot; &#43; port.PortName &#43; Environment.NewLine;
            }
        }
        void port_ErrorReceived(object sender, SerialErrorReceivedEventArgs e)
        {
            throw new NotImplementedException();
        }
        void port_DataReceived(object sender, SerialDataReceivedEventArgs e)
        {
            displayString = port.ReadLine();
            try
            {
                this.Invoke(new EventHandler(SetText));
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
        private void SetText(object o, EventArgs e)
        {
            textBox_Rec.Text &#43;= displayString &#43; Environment.NewLine;
            displayString = string.Empty;
        }
        void button_Send_Click(object sender, EventArgs e)
        {
            port.Write(textBox_Send.Text &#43; port.NewLine);
            textBox_Send.Text = &quot;&quot;;
        }
    }
}</pre>
<p></p>
<p>&nbsp;</p>
<p>When I send an AT command to the device, the DataReceived event never fires. &nbsp;I've also tried setting up a tick to try and capture some return data, yet I still get nothing. &nbsp;I can rule out the data sending as the problem, as I can send a message, via SMS,
 that will cause the device to return data, yet still, nothing happens.</p>
<p>&nbsp;</p>
<p>Any help would be appreciated. &nbsp;Thanks!</p>
<p>-Brandon</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/536671#536671</link>
		<pubDate>Thu, 11 Mar 2010 20:12:15 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/536671-Issues-with-NET-CF-Serial-Communication/536671#536671</guid>
		<dc:creator>Brandon Vulaj</dc:creator>
		<slash:comments>23</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/NotSoTragicHero/Discussions/RSS</wfw:commentRss>
	</item>
</channel>
</rss>