<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>.NET Security Blog : Other</title><link>http://blogs.msdn.com/shawnfa/archive/tags/Other/default.aspx</link><description>Tags: Other</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>CLR Inside Out: Digging into IDisposable</title><link>http://blogs.msdn.com/shawnfa/archive/2007/06/20/clr-inside-out-digging-into-idisposable.aspx</link><pubDate>Wed, 20 Jun 2007 19:10:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3427140</guid><dc:creator>shawnfa</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/shawnfa/comments/3427140.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shawnfa/commentrss.aspx?PostID=3427140</wfw:commentRss><description>&lt;p&gt;My third MSDN magazine article, &lt;a href="http://msdn.microsoft.com/msdnmag/issues/07/07/CLRInsideOut/default.aspx"&gt;Digging into IDisposable&lt;/a&gt;,&amp;nbsp;appeared in &lt;a href="http://msdn.microsoft.com/msdnmag/issues/07/07/default.aspx"&gt;this month's issue&lt;/a&gt;&amp;nbsp;in the CLR Inside Out Column.&amp;nbsp; It's a bit of a departure from my usual security fare; this time looking at how to best handle writing class libraries that must manage resources.&lt;/p&gt; &lt;p&gt;Also in this month's issue, &lt;a href="http://weblogs.asp.net/kennykerr/"&gt;Kenny Kerr&lt;/a&gt; provides a good &lt;a href="http://msdn.microsoft.com/msdnmag/issues/07/07/Security/default.aspx"&gt;introduction to the new CNG APIs available on Vista&lt;/a&gt;.&amp;nbsp; Especially interesting is the code snippets he provides translating from CNG RSA keys to RSAParameters for use with RSACryptoServiceProvider.&amp;nbsp; (And for a quick rundown of the managed CNG classes Kenny mentions in the v3.5 framework, you can see the posts in my &lt;a href="http://blogs.msdn.com/shawnfa/archive/tags/CNG/default.aspx"&gt;CNG category&lt;/a&gt;).&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3427140" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Cryptography/default.aspx">Cryptography</category><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Other/default.aspx">Other</category><category domain="http://blogs.msdn.com/shawnfa/archive/tags/CNG/default.aspx">CNG</category></item><item><title>Introduction to the Orcas Add-In Model</title><link>http://blogs.msdn.com/shawnfa/archive/2007/02/20/introduction-to-the-orcas-add-in-model.aspx</link><pubDate>Tue, 20 Feb 2007 21:08:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1728286</guid><dc:creator>shawnfa</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/shawnfa/comments/1728286.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shawnfa/commentrss.aspx?PostID=1728286</wfw:commentRss><description>&lt;p&gt;One of the features the CLR team is adding in Orcas is that we're providing a new model to help enable your application to host Add-Ins.&amp;nbsp; I've got a special interest in this set of features, as I always try to make my hobby applications pluggable for some reason, and I tend to end up writing a ton of infrastructure that, once Orcas ships, I will no longer have to.&amp;nbsp;&amp;nbsp;The&amp;nbsp;Add-In team has&amp;nbsp;done the work to enable discovery, versioning, and most importantly (from my perspective at least :-) ) securely sandboxing those Add-Ins.&lt;/p&gt; &lt;p&gt;Recently, they've done a pretty big brain-dump of how their feature is going to work.&amp;nbsp; Some of the resources available are:&lt;/p&gt; &lt;p&gt;MSDN Magazine Articles:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://msdn.microsoft.com/msdnmag/issues/07/02/CLRInsideOut/default.aspx"&gt;.NET Application Extensibility (part 1)&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn.microsoft.com/msdnmag/issues/07/03/CLRInsideOut/default.aspx"&gt;.NET Application Extensibility (part 2)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Blogs&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/clraddins/"&gt;The Add-In Team Blog&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/zifengh/"&gt;Jason He's Blog&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Jason's blog is interesting because he's decided to go through the steps to upgrade Paint.NET to use the new AddIn model, and discuss his experiences.&amp;nbsp; If you're intereseted in making your apps extensible, it's worth checking out this feature to see if it's made your life any easier.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1728286" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Other/default.aspx">Other</category><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Orcas/default.aspx">Orcas</category></item><item><title>Happy Holidays!</title><link>http://blogs.msdn.com/shawnfa/archive/2006/12/22/happy-holidays.aspx</link><pubDate>Sat, 23 Dec 2006 04:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1334163</guid><dc:creator>shawnfa</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/shawnfa/comments/1334163.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shawnfa/commentrss.aspx?PostID=1334163</wfw:commentRss><description>&lt;P&gt;In an effort to escape Seattle's ... interesting ... weather patterns of the last few months, I've taken off to New York for the holidays.&amp;nbsp; (And unlike &lt;A class="" href="http://blogs.msdn.com/shawnfa/archive/2005/12/19/505506.aspx" mce_href="http://blogs.msdn.com/shawnfa/archive/2005/12/19/505506.aspx"&gt;last year's 19 degree temperature drop&lt;/A&gt;, this year it's actually going to be warmer in the Northeast.&amp;nbsp; Go figure.)&lt;/P&gt;
&lt;P&gt;So, until January, Happy Holidays!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;-Shawn&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1334163" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Other/default.aspx">Other</category></item><item><title>SecureString Redux</title><link>http://blogs.msdn.com/shawnfa/archive/2006/11/01/securestring-redux.aspx</link><pubDate>Thu, 02 Nov 2006 01:17:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:927385</guid><dc:creator>shawnfa</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/shawnfa/comments/927385.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shawnfa/commentrss.aspx?PostID=927385</wfw:commentRss><description>&lt;p&gt;A few times over the last couple of days discussion about a tool on the Internet which can attach to your process and dump out the contents of your SecureStrings has come up.&amp;nbsp; If this tool can exist, then what benefit does &lt;a href="http://msdn2.microsoft.com/en-us/library/system.security.securestring.aspx"&gt;SecureString&lt;/a&gt; really provide?&lt;/p&gt; &lt;p&gt;The fact that this tool can exist is not a hole in the SecureString feature.&amp;nbsp; Presumably at some point you'll want to be able to access the data you're storing in your string (after all, if you didn't want to ever access that data again, why store it in the first place?).&amp;nbsp; If you're going to want to access it, then the process that did the encryption on the string data will need a way to decrypt the data again.&amp;nbsp; So it's not a failure that code in your process can decrypt the SecureString contents, it's by design.&amp;nbsp; (Note that to access the Marshal APIs which do decrypt the string, you need to be have SecurityPermission/UnmanagedCode -- or essentially be fully trusted.&amp;nbsp; This means that arbitrary partial trust code in your process cannot in fact access the plaintext contents of your string).&lt;/p&gt; &lt;p&gt;Back in &lt;a href="http://blogs.msdn.com/shawnfa/archive/2004/05/27/143254.aspx"&gt;my original post about SecureString&lt;/a&gt; I mentioned several problems with storing sensitive data, such as a password in a standard System.String.&amp;nbsp; SecureString solves these problems.&amp;nbsp; Namely:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;The string is not stored in the managed heap while standard strings are.&amp;nbsp; This means that a string can be moved around by the GC, leaving multiple copies of the sensitive data in memory.&amp;nbsp; Your code will not know that this has happened, and even if it could figure out that the string was moved, you have no way to clear out the other copies.&amp;nbsp; Instead you have to wait for the CLR to allocate another object where the sensitive data is so that the memory gets erased.&lt;/li&gt; &lt;li&gt;SecureStrings are stored in an encrypted form.&amp;nbsp; While they will have to be decrypted during the periods of time that they are used, this period can be kept as small as possible.&amp;nbsp; If your process is swapped out to disk while the string is encrypted, the plaintext will not end up in the swap file.&lt;/li&gt; &lt;li&gt;The keys used to encrypt the string are tied to the user, logon session, and process.&amp;nbsp; This means that any minidumps taken of the process will contain secure strings which are not decryptable.&amp;nbsp; If Watson sends dumps off to Microsoft or if you have to have a client send you a minidump of a crashing application, they can rest assured that you cannot access the sensitive data in the strings.&lt;/li&gt; &lt;li&gt;SecureStrings are securely zeroed out when they're disposed of.&amp;nbsp; System.Strings are immutable and cannot be cleared when you've finished with the sensitive data.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;While the SecureString class does not prevent fully trusted code which is running in your process from decrypting the contents of the string and doing whatever it wants to do with it, it does provide several other features.&amp;nbsp; It's all about risk management -- keeping the sensitive data as inaccessible as possible when it's not being used, and being able to erase your records of it when it is no longer needed.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=927385" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Other/default.aspx">Other</category></item><item><title>Quickly Testing Code Under Different Cultures</title><link>http://blogs.msdn.com/shawnfa/archive/2006/10/20/quickly-testing-code-under-different-cultures.aspx</link><pubDate>Fri, 20 Oct 2006 21:27:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:850047</guid><dc:creator>shawnfa</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/shawnfa/comments/850047.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shawnfa/commentrss.aspx?PostID=850047</wfw:commentRss><description>&lt;P&gt;Earlier this week, a situation came up where we needed to make sure a new feature worked when it was used with a non-English culture.&amp;nbsp; Normally we'd run some tests on a Japanese machine, but one wasn't readily available at the time.&amp;nbsp; Instead, I put together a quick tool that our tester could use to run his tests under.&lt;/P&gt;
&lt;P&gt;The tool simply switches the current culture (and UI culture by default) of the running thread, then proceeds to execute the target application.&amp;nbsp; The obvious downside is that the tool only changes the culture of the main thread, so any work done on newly created threads or the thread pool will not automatically pick up the culture change.&amp;nbsp; However, for cases where you know that your work will only be done on one thread, or you manually propagate culture information, this will work as a quick and dirty way to launch applications.&lt;/P&gt;
&lt;P&gt;(The usual disclaimers apply -- this code is provided as-is and if&amp;nbsp;it happens to cause your monitor to explode while you run it, Microsoft is not responsible, etc, etc.)&lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: black thin inset; PADDING-RIGHT: 1em; BORDER-TOP: black thin inset; PADDING-LEFT: 1em; FONT-SIZE: 10pt; BACKGROUND: lightgrey; PADDING-BOTTOM: 1em; MARGIN: 1em 1em 1em 2em; BORDER-LEFT: black thin inset; COLOR: black; PADDING-TOP: 1em; BORDER-BOTTOM: black thin inset; FONT-FAMILY: monospace"&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; System;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; System.Diagnostics;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; System.IO;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; System.Globalization;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; System.Security;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; System.Threading;&lt;/P&gt;
&lt;P style="MARGIN: 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;&amp;lt;summary&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tool which runs an application with the main thread set to the specified culture&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;&amp;lt;/summary&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;class&lt;/SPAN&gt; RunLoc&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;{&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; application;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;[] applicationArguments;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;CultureInfo&lt;/SPAN&gt; culture;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;bool&lt;/SPAN&gt; onlyUI;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;bool&lt;/SPAN&gt; verbose;&lt;/P&gt;
&lt;P style="MARGIN: 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; Main(&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;[] args)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (!ParseArguments(args))&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Usage();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; -1;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="COLOR: teal"&gt;Debug&lt;/SPAN&gt;.Assert(!&lt;SPAN style="COLOR: teal"&gt;String&lt;/SPAN&gt;.IsNullOrEmpty(application), &lt;SPAN style="COLOR: maroon"&gt;"!String.IsNullOrEmpty(application)"&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="COLOR: teal"&gt;Debug&lt;/SPAN&gt;.Assert(culture != &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;, &lt;SPAN style="COLOR: maroon"&gt;"culture != null"&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="MARGIN: 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (verbose)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"RunLoc running on .NET version {0} ({1} bit)"&lt;/SPAN&gt;,&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Environment&lt;/SPAN&gt;.Version,&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;IntPtr&lt;/SPAN&gt;.Size * 8);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (!onlyUI)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"&amp;nbsp; Current culture:&amp;nbsp;&amp;nbsp;&amp;nbsp; {0} [replacing with {1}]"&lt;/SPAN&gt;,&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Thread&lt;/SPAN&gt;.CurrentThread.CurrentCulture.DisplayName,&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; culture.DisplayName);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"&amp;nbsp; Current UI culture: {0} [replacing with {1}]"&lt;/SPAN&gt;,&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Thread&lt;/SPAN&gt;.CurrentThread.CurrentUICulture.DisplayName,&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; culture.DisplayName);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.WriteLine();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;try&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (!onlyUI)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Thread&lt;/SPAN&gt;.CurrentThread.CurrentCulture = culture;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Thread&lt;/SPAN&gt;.CurrentThread.CurrentUICulture = culture;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;catch&lt;/SPAN&gt; (&lt;SPAN style="COLOR: teal"&gt;NotSupportedException&lt;/SPAN&gt;)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.Error.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"Error: Culture {0} is not supported."&lt;/SPAN&gt;, culture.DisplayName);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; -1;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;catch&lt;/SPAN&gt; (&lt;SPAN style="COLOR: teal"&gt;SecurityException&lt;/SPAN&gt;)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.Error.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"Error: RunLoc does not have sufficient permission to change the culture"&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; -1;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;try&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;AppDomain&lt;/SPAN&gt;.CurrentDomain.ExecuteAssembly(application, &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;, applicationArguments);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;catch&lt;/SPAN&gt; (&lt;SPAN style="COLOR: teal"&gt;FileNotFoundException&lt;/SPAN&gt;)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.Error.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"Error: '{0}' could not be found"&lt;/SPAN&gt;, application);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; -1;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;catch&lt;/SPAN&gt; (&lt;SPAN style="COLOR: teal"&gt;SecurityException&lt;/SPAN&gt;)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.Error.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"Error: RunLoc does not have sufficient permission to run the application"&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; -1;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;bool&lt;/SPAN&gt; ParseArguments(&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;[] arguments)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="COLOR: teal"&gt;Debug&lt;/SPAN&gt;.Assert(arguments != &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="MARGIN: 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (arguments.Length &amp;lt; 2)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// All of the RunLoc arguments must come before the application name, since that is just followed&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// by its own arguments. Loop until we hit the last argument, or until we find the application name.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; currentArgument = 0;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;while&lt;/SPAN&gt; (currentArgument &amp;lt; arguments.Length &amp;amp;&amp;amp; application == &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (&lt;SPAN style="COLOR: teal"&gt;String&lt;/SPAN&gt;.Equals(arguments[currentArgument], &lt;SPAN style="COLOR: maroon"&gt;"/v"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: teal"&gt;StringComparison&lt;/SPAN&gt;.OrdinalIgnoreCase))&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; verbose = &lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;else&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (&lt;SPAN style="COLOR: teal"&gt;String&lt;/SPAN&gt;.Equals(arguments[currentArgument], &lt;SPAN style="COLOR: maroon"&gt;"/onlyui"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: teal"&gt;StringComparison&lt;/SPAN&gt;.OrdinalIgnoreCase))&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; onlyUI = &lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;else&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (culture == &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;try&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; culture = &lt;SPAN style="COLOR: teal"&gt;CultureInfo&lt;/SPAN&gt;.GetCultureInfo(arguments[currentArgument]);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;catch&lt;/SPAN&gt; (&lt;SPAN style="COLOR: teal"&gt;ArgumentException&lt;/SPAN&gt;)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.Error.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"Error: culture '{0}' is not found"&lt;/SPAN&gt;, arguments[currentArgument]);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;else&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; application = arguments[currentArgument];&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; currentArgument++;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// Make sure our required parameters are present&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (culture == &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.Error.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"Error: No culture given."&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (&lt;SPAN style="COLOR: teal"&gt;String&lt;/SPAN&gt;.IsNullOrEmpty(application))&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.Error.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"Error: No application given."&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// Any remaining arguments belong to the application&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (currentArgument &amp;lt; arguments.Length - 1)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; applicationArguments = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;[arguments.Length - currentArgument];&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Array&lt;/SPAN&gt;.Copy(arguments, currentArgument, applicationArguments, 0, applicationArguments.Length);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; Usage()&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"Usage: RunLoc [/v] [/onlyui] culture application [application arguments ...]"&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.WriteLine();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"&amp;nbsp; /v&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; - verbose mode"&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"&amp;nbsp; /onlyui&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; - only change the UI culture"&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"&amp;nbsp; culture&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; - culture to set the main thread to"&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"&amp;nbsp; application&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; - path to the application to run"&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"&amp;nbsp; application arguments - arguments for the application"&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.WriteLine();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;}&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;Using this is pretty easy:&lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: black thin inset; PADDING-RIGHT: 1em; BORDER-TOP: black thin inset; PADDING-LEFT: 1em; PADDING-BOTTOM: 1em; MARGIN: 1em 1em 1em 2em; BORDER-LEFT: black thin inset; PADDING-TOP: 1em; BORDER-BOTTOM: black thin inset; FONT-FAMILY: monospace; BACKGROUND-COLOR: lightgrey"&gt;C:\RunLoc&amp;gt;FloridaBreakfastFruit.exe&lt;BR&gt;Mmm ... grapefruit&lt;BR&gt;&lt;BR&gt;C:\RunLoc&amp;gt;RunLoc /v fr-fr FloridaBreakfastFruit.exe&lt;BR&gt;RunLoc running on .NET version 2.0.50727.42 (64 bit)&lt;BR&gt;&amp;nbsp;&amp;nbsp;Current culture:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;English (United States) [replacing with French (France)]&lt;BR&gt;&amp;nbsp;&amp;nbsp;Current UI culture:&amp;nbsp;English (United States) [replacing with French (France)]&lt;BR&gt;&lt;BR&gt;Mmm ... pamplemousse&lt;BR&gt;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=850047" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Other/default.aspx">Other</category></item><item><title>[WeddingPermission(SecurityAction.Demand, Unrestricted=true)]</title><link>http://blogs.msdn.com/shawnfa/archive/2006/08/04/689156.aspx</link><pubDate>Sat, 05 Aug 2006 06:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:689156</guid><dc:creator>shawnfa</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/shawnfa/comments/689156.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shawnfa/commentrss.aspx?PostID=689156</wfw:commentRss><description>&lt;P&gt;Having just checked in my last few bug fixes and the Orcas &lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;feature &lt;/SPAN&gt;I've been working on, it's time to take off on a vacation.&lt;/P&gt;
&lt;P&gt;But not just any vacation ...&amp;nbsp;Tomorrow I head back to New York for my wedding on August 12th.&amp;nbsp; (Here's hoping&amp;nbsp;that it&amp;nbsp;cools down before I get there.&amp;nbsp; Big church -&amp;nbsp;air conditioning&amp;nbsp;+ 100 degree heat + me in a tux&amp;nbsp;!=&amp;nbsp;good times)&lt;/P&gt;
&lt;P&gt;After&amp;nbsp;a quick night&amp;nbsp;Seattle on the 13th to swap wedding luggage&amp;nbsp;for honeymoon luggage,&amp;nbsp;we head off for a two weeks of sitting on the sand&amp;nbsp;drinking tropical drinks, learning to surf, and eating lots of pineapple.&amp;nbsp;(And I do mean lots of pineapple).&amp;nbsp; We'll spend 4 days in Kauai, 4 days on Oahu, and 6 on Maui catching&amp;nbsp;a couple of&amp;nbsp;luaus along the way.&amp;nbsp;&amp;nbsp; Did I mention that our hotel on Maui has a &lt;A href="http://maui.hyatt.com/hyatt/hotels/activities/pool/index.jsp"&gt;150 foot long water slide&lt;/A&gt;?&lt;/P&gt;
&lt;P&gt;That means that this blog is going quiet until early September; but once I get back we'll continue with our regularly scheduled managed security content ... just in a more tan and less single fashion.&lt;/P&gt;
&lt;P&gt;Aloha!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=689156" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Other/default.aspx">Other</category></item><item><title>$20 on Double Zero, $20 on LUA please</title><link>http://blogs.msdn.com/shawnfa/archive/2006/07/17/668632.aspx</link><pubDate>Mon, 17 Jul 2006 21:35:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:668632</guid><dc:creator>shawnfa</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/shawnfa/comments/668632.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shawnfa/commentrss.aspx?PostID=668632</wfw:commentRss><description>&lt;p&gt;I spent last weekend in &lt;a href="http://www.thecoderoom.com/vegas/" target="_blank"&gt;Vegas,&lt;/a&gt;&amp;nbsp;and on&amp;nbsp;Saturday night&amp;nbsp;/ Sunday morning decided to recreate those college bar crawls with a bit of a casino crawl.&amp;nbsp; Starting a Caesar's we bounced up the strip hitting every casino on the way with one rule: start with $40 ... double it or lose it, and move on to the next one.&lt;/p&gt;  &lt;p&gt;At Aladdin, the last person in our group was still going at the roulette tables, and as I was waiting for him I took a look at the electronic board listing off the previous results.&amp;nbsp; This one&amp;nbsp;listed&amp;nbsp;the name of the person running the table in addition to the results:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;"Your dealer is: Administrator"&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt; Now, maybe its just me, but I don't think you need admin privileges to note that the last number to come up was 21 :-)&amp;nbsp; &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=668632" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Other/default.aspx">Other</category></item><item><title>Test Signing in Action: IronPython Beta 7</title><link>http://blogs.msdn.com/shawnfa/archive/2006/05/24/606108.aspx</link><pubDate>Wed, 24 May 2006 22:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:606108</guid><dc:creator>shawnfa</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/shawnfa/comments/606108.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shawnfa/commentrss.aspx?PostID=606108</wfw:commentRss><description>&lt;P&gt;The IronPython team just &lt;A href="http://www.gotdotnet.com/workspaces/news/newsitem.aspx?id=ad7acff7-ab1e-4bcb-99c0-57ac5a3a9742&amp;amp;newsId=ca47f9b8-8d46-42d9-a0ce-40572101c0d6"&gt;announced their v1.0 beta 7 release&lt;/A&gt;, which is especially interesting to me because they’ve enabled IronPython to be signed with a test key signature. &lt;/P&gt;
&lt;P&gt;Beta 7 has four configurations, the standard Release and Debug along with Signed versions of both. If you choose a Signed version, the build will look for an IronPythonKey.snk in the solution directory which it uses to delay sign the generated assemblies. After the build, it looks for a TestKey.snk file in the solution directory to test key sign with, generating it if necessary. Finally, it runs SN to extract the public key from the test key file, and register the output assemblies as test key signed (using both the 32 and 64 bit SN tools if present). &lt;/P&gt;
&lt;P&gt;What’s interesting to notice here is they automatically generate the test key pair if they don’t find it, which is a completely reasonable way to setup developer machines. In fact, we can see one of the big benefits of test key signing in this scenario. Since each developer will have a different test key pair, everybody will have a different skip verification entry for the IronPython assemblies. Even within a single company, where you might have a standard IronPythonKey.snk that everybody is using (and perhaps trusting in policy), an attacker would be unable to craft an assembly which impersonated that key, since each development machine would require the assembly be test signed with a different key.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=606108" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Other/default.aspx">Other</category><category domain="http://blogs.msdn.com/shawnfa/archive/tags/StrongName/default.aspx">StrongName</category></item><item><title>Adding a UAC Manifest to Managed Code</title><link>http://blogs.msdn.com/shawnfa/archive/2006/04/06/568563.aspx</link><pubDate>Thu, 06 Apr 2006 17:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:568563</guid><dc:creator>shawnfa</dc:creator><slash:comments>12</slash:comments><comments>http://blogs.msdn.com/shawnfa/comments/568563.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shawnfa/commentrss.aspx?PostID=568563</wfw:commentRss><description>&lt;P&gt;The &lt;A HREF="/uac"&gt;UAC&lt;/A&gt; feature of Vista is one of my favorite new features -- it really makes running as a non-admin much less painful than it has been in the past.&amp;nbsp; One of the requirements that UAC puts on developers is that we must mark our applications with manifests which declare if the application would like to run elevated or not.&amp;nbsp; Documentation for this manifest format can be found on &lt;A href="http://msdn.microsoft.com/windowsvista/default.aspx?pull=/library/en-us/dnlong/html/AccProtVista.asp#accprotvista_topic8"&gt;MSDN&lt;/A&gt;, where you can find the schema and information about what the various settings mean.&lt;/P&gt;
&lt;P&gt;If you'd like to add one of these manifests to your managed application, the steps are relatively straight forward:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create a manifest resource&lt;/LI&gt;
&lt;LI&gt;Compile the resource&lt;/LI&gt;
&lt;LI&gt;Embed it in your application&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;FONT size=4&gt;1. Create a manifest resource&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;The first step is to create a resource file containing your manifest.&amp;nbsp; The manifest should be of type RT_MANIFEST, and have id 1 for an exe (id 2 for a dll).&amp;nbsp; For instance, the resource script for an exe that does not need to elevate might be saved in UacManifest.rc and look like this:&lt;/P&gt;
&lt;P&gt;
&lt;DIV style="BORDER-RIGHT: black thin inset; PADDING-RIGHT: 1em; BORDER-TOP: black thin inset; PADDING-LEFT: 2em; FONT-SIZE: x-small; PADDING-BOTTOM: 1em; MARGIN: 1em 1em 1em 2em; BORDER-LEFT: black thin inset; PADDING-TOP: 1em; BORDER-BOTTOM: black thin inset; FONT-FAMILY: monospace; BACKGROUND-COLOR: lightgrey; WORD-WRAP: break-word"&gt;&lt;SPAN style="COLOR: blue"&gt;#include&lt;/SPAN&gt; &amp;lt;winuser.h&amp;gt;&lt;BR&gt;&lt;SPAN style="COLOR: blue"&gt;#define&lt;/SPAN&gt; IDR_MANIFEST 1 &lt;SPAN style="COLOR: green"&gt;// 2 for a DLL&lt;/SPAN&gt;&lt;BR&gt;&lt;BR&gt;IDR_MANIFEST RT_MANIFEST MOVEABLE PURE&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;lt;assembly xmlns=""urn:schemas-microsoft-com:asm.v1"" manifestVersion=""1.0""&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asmv3:trustInfo xmlns:asmv3=""urn:schemas-microsoft-com:asm.v3""&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asmv3:security&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asmv3:requestedPrivileges&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asmv3:requestedExecutionLevel&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; level=""asInvoker""&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uiAccess=""false"" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asmv3:requestedPrivileges&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asmv3:security&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asmv3:trustInfo&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/assembly&amp;gt;"&lt;BR&gt;}&lt;BR&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;FONT size=4&gt;2. Compile the resource&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=4&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;You'll need to install the &lt;A href="http://msdn.microsoft.com/platformsdk"&gt;Platform SDK&lt;/A&gt; for this step so that you have access to the rc tool and the winuser.h header.&amp;nbsp; Once you've gotten the SDK setup, you can then compile your resource script into a .res file:&lt;/P&gt;
&lt;P&gt;
&lt;DIV style="BORDER-RIGHT: black thin inset; PADDING-RIGHT: 1em; BORDER-TOP: black thin inset; PADDING-LEFT: 2em; FONT-SIZE: x-small; PADDING-BOTTOM: 1em; MARGIN: 1em 1em 1em 2em; BORDER-LEFT: black thin inset; PADDING-TOP: 1em; BORDER-BOTTOM: black thin inset; FONT-FAMILY: monospace; BACKGROUND-COLOR: lightgrey; WORD-WRAP: break-word"&gt;C:\src\App&amp;gt;rc.exe UacManifest.rc&lt;/DIV&gt;
&lt;P&gt;Which will create a UacManifest.res for you.&lt;/P&gt;
&lt;P&gt;&lt;FONT size=4&gt;3. Embed it in your application&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Now that you've compiled your .res file, you can pass it to your managed compiler when building your application&amp;nbsp;to embed in your exe.&amp;nbsp;&amp;nbsp;The exact switch will vary depending on your compiler:&lt;/P&gt;
&lt;P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;STRONG&gt;Compiler&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;STRONG&gt;Switch&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;C#&lt;/TD&gt;
&lt;TD&gt;/win32res&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;VB&lt;/TD&gt;
&lt;TD&gt;/win32resource&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;ILAsm&lt;/TD&gt;
&lt;TD&gt;/resource&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;AL&lt;/TD&gt;
&lt;TD&gt;/win32res&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/P&gt;
&lt;P&gt;You can also select&amp;nbsp;the resource file in the project properties in Visual Studio.&lt;/P&gt;
&lt;DIV&gt;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=568563" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Other/default.aspx">Other</category><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Windows/default.aspx">Windows</category></item><item><title>FxCop Transparency Rules</title><link>http://blogs.msdn.com/shawnfa/archive/2006/04/04/567753.aspx</link><pubDate>Tue, 04 Apr 2006 17:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:567753</guid><dc:creator>shawnfa</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/shawnfa/comments/567753.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shawnfa/commentrss.aspx?PostID=567753</wfw:commentRss><description>&lt;P&gt;The &lt;A href="http://www.gotdotnet.com/team/fxcop/"&gt;FxCop team&lt;/A&gt; has just announced the availability of &lt;A HREF="/fxcop/archive/2006/04/04/567743.aspx"&gt;RC 1 of FxCop 1.35&lt;/A&gt;.&amp;nbsp; Notable in this release is the introduction of the first three rules around &lt;A HREF="/shawnfa/archive/2005/09/09/462975.aspx#567744"&gt;security transparency&lt;/A&gt;.&amp;nbsp; Namely, you'll see:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;EM&gt;SecurityTransparentAssembliesShouldNotContainSecurityCriticalCode&lt;/EM&gt; - fires when an assembly which is marked transparent contains any code which is marked critical.&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;SecurityTransparentCodeShouldNotAssert&lt;/EM&gt; - fires when a block of transparent code attempts to execute a CAS Assert.&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;SecurityTransparentCodeShouldNotReferenceNonpublicSecurityCriticalCode&lt;/EM&gt; - fires when transparent code attempts to use critical code which is not public or TreatAsSafe.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=567753" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shawnfa/archive/tags/CAS/default.aspx">CAS</category><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Other/default.aspx">Other</category><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Debugging/default.aspx">Debugging</category></item><item><title>Return of the Mailbag</title><link>http://blogs.msdn.com/shawnfa/archive/2006/03/21/556987.aspx</link><pubDate>Tue, 21 Mar 2006 23:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:556987</guid><dc:creator>shawnfa</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/shawnfa/comments/556987.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shawnfa/commentrss.aspx?PostID=556987</wfw:commentRss><description>&lt;P&gt;Over the last week or so I've seen a few questions pop up multiple times.&amp;nbsp; In no particular order:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Q:&lt;/STRONG&gt; Is calling a virtual method with a non-virtual call verifiable?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A:&lt;/STRONG&gt; It depends :-)&amp;nbsp; In v1.x of the CLR this was verifiable.&amp;nbsp; We made a change in v2.0 which disallows a non-virtual call to a virtual method.&amp;nbsp; Joe Duffy has &lt;A href="http://www.bluebytesoftware.com/blog/PermaLink.aspx?guid=c33b0dbc-a696-4b3d-a136-4bee2d86be2a"&gt;a good writeup about this change&lt;/A&gt; and why we made it on his blog.&amp;nbsp; Note that going the other way is verifiable -- using a callvirt to call a non-virtual function works just fine.&amp;nbsp; In fact ildasm shows that the C# compiler always emits a callvirt regardless of the target being virtual or not.&lt;/P&gt;
&lt;HR&gt;

&lt;P&gt; &lt;STRONG&gt;Q:&lt;/STRONG&gt; I want to create a signature using RSA and SHA-256, is that possible with the managed classes?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A:&lt;/STRONG&gt; Not as of v2.0.&amp;nbsp; The&amp;nbsp;fundamental problem is that our only RSA implementation, RSACryptoServiceProvider, uses CAPI to do its work.&amp;nbsp; However our only SHA-256 implementation, SHA256Managed is unknown to CAPI.&amp;nbsp; This is on our radar for the next CLR release though.&lt;/P&gt;
&lt;HR&gt;

&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;Q:&lt;/STRONG&gt; Is there any way to use &lt;A HREF="/shawnfa/archive/2005/10/06/478009.aspx"&gt;ADMHost&lt;/A&gt; with a WinForms app so that the console window doesn't show up?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A:&lt;/STRONG&gt; Sure.&amp;nbsp; The underlying issue here is that in Windows, a&amp;nbsp;PE image&amp;nbsp;has its subsystem burned into&amp;nbsp;its&amp;nbsp;IMAGE_OPTIONAL_HEADER.&amp;nbsp; Generally this is one of IMAGE_SUBSYSTEM_CUI or IMAGE_SUBSYSTEM_GUI ... although there are other options (they're listed under the comment "subsystem values" in winnt.h of the platform SDK if you're interested).&amp;nbsp; Applications with a CUI subsystem always run with a console, weather or not they use it.&amp;nbsp; (Windows has no way of knowing ahead of time if you do plan on using it or not).&amp;nbsp; The opposite is true of GUI apps, which by default will not have a console window.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ADMHost.exe by default is compiled as a console application, using the CUI subsystem. Switch it to a Windows application and the console will go away.&amp;nbsp; You can do this in the ADMHost.exe properties -- change the subsystem type to Windows.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=556987" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Cryptography/default.aspx">Cryptography</category><category domain="http://blogs.msdn.com/shawnfa/archive/tags/CAS/default.aspx">CAS</category><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Other/default.aspx">Other</category><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Windows/default.aspx">Windows</category></item><item><title>The best part about today ...</title><link>http://blogs.msdn.com/shawnfa/archive/2006/02/14/532077.aspx</link><pubDate>Wed, 15 Feb 2006 00:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:532077</guid><dc:creator>shawnfa</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/shawnfa/comments/532077.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shawnfa/commentrss.aspx?PostID=532077</wfw:commentRss><description>&lt;P&gt;... the availability of &lt;A href="http://www.hersheys.com/valentines/products/view-product.asp?id=111"&gt;peanut butter cups 6 2/3 times bigger than normal&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.hersheys.com/valentines/lib/inc/showProduct.asp?id=111&amp;amp;size=l"&gt;&lt;/P&gt;
&lt;P&gt;The best part about tomorrow?&amp;nbsp; They'll probably be available for less than a dollar at Safeway.&amp;nbsp; I can feel the waistline growing already :-)&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=532077" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Other/default.aspx">Other</category></item><item><title>Happy Holidays</title><link>http://blogs.msdn.com/shawnfa/archive/2005/12/19/505506.aspx</link><pubDate>Mon, 19 Dec 2005 19:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:505506</guid><dc:creator>shawnfa</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/shawnfa/comments/505506.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shawnfa/commentrss.aspx?PostID=505506</wfw:commentRss><description>&lt;P&gt;It's that time of year again when most of the offices around Microsoft start going dark, and I'll be adding 42/2221 to that list for the next couple of weeks as I head off to New York for Christmas.&amp;nbsp; My traditional weather.com check shows that I should be expecting a 19 degree drop in temperature -- something that I'm not looking forward to :-)&amp;nbsp; Once I thaw back out in January, we'll get back to our regularly scheduled security programming.&amp;nbsp; Until then, &lt;a href="http://blogs.msdn.com/shawnfa/archive/2005/12/15/503836.aspx"&gt;keep those suggestions coming&lt;/A&gt; ... and Happy Holidays!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=505506" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Other/default.aspx">Other</category></item><item><title>What Do You Want to See in Crypto / ClickOnce?</title><link>http://blogs.msdn.com/shawnfa/archive/2005/12/15/503836.aspx</link><pubDate>Thu, 15 Dec 2005 18:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:503836</guid><dc:creator>shawnfa</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.msdn.com/shawnfa/comments/503836.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shawnfa/commentrss.aspx?PostID=503836</wfw:commentRss><description>Now that Whidbey's out the door, it's time to look at what we want to do in future releases. If you've run into any issues with the crypto classes or with ClickOnce let me know! You can leave comments here or file requests in the MSDN Product Feedback...(&lt;a href="http://blogs.msdn.com/shawnfa/archive/2005/12/15/503836.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=503836" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Other/default.aspx">Other</category></item><item><title>A Look at the Xbox 360 CPU Design</title><link>http://blogs.msdn.com/shawnfa/archive/2005/12/12/502778.aspx</link><pubDate>Mon, 12 Dec 2005 20:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:502778</guid><dc:creator>shawnfa</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/shawnfa/comments/502778.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shawnfa/commentrss.aspx?PostID=502778</wfw:commentRss><description>&lt;P&gt;Jeffery Brown has posted his paper on the &lt;A href="http://www-128.ibm.com/developerworks/power/library/pa-fpfxbox/?ca=dgr-lnxw07XBoxDesign"&gt;Xbox 360 CPU&amp;nbsp;Design&lt;/A&gt; from the Fall Processor Forum over on&amp;nbsp;IBM's DeveloperWorks.&amp;nbsp;&amp;nbsp;Since I have &lt;A href="http://www.ecs.umass.edu/ece/"&gt;my degree in hardware design&lt;/A&gt;, I always find these types of things interesting.&amp;nbsp; While this paper is at a relatively high level, I still found several of the details fun to read about.&lt;/P&gt;
&lt;P&gt;Especially interesting was the section on testing, debugging, and design validation.&amp;nbsp; I clearly remember the day in ECE 323 (Hardware Design and Organization) when we discovered the benefits of adding test pins to our circuit design -- the final project for that class was to design a processor which executed some simple set of instructions and circuitry to host it.&amp;nbsp; In order to grade the project, we gave our professor the byes for each opcode, and he ran a program on the board.&amp;nbsp; If our design executed the program correctly we passed -- I believe that he had several different programs to step down to if you wouldn't work on the first one.&lt;/P&gt;
&lt;P&gt;Needless to say, debugging a microcode programmed CPU design was no easy task -- and since we hadn't designed testing into the chip from the start, we were basically left hooking the oscilloscope up to various wires on the circuit board (wait -- which ones are the address&amp;nbsp;bus again?), and executing repetitive code until we could narrow down the problems.&amp;nbsp; Obviously this was not the most productive use of our time, and the semester was quickly drawing to a close.&lt;/P&gt;
&lt;P&gt;After a late night of debugging the circuit, I finally hooked up some test pins.&amp;nbsp; Basically there were two sets of debug pins --&amp;nbsp;input and output.&amp;nbsp; The output&amp;nbsp;pins went to a set of multiplexers, which switched over the various interesting parts of the circuit, while the input pins controlled the multiplexers.&amp;nbsp; Finally there were&amp;nbsp;one pair of input pins&amp;nbsp;in particular which greatly aided debugging.&amp;nbsp; The first enabled single step mode -- basically set a flip flop, which caused the processor to only execute an instruction if the step flip flop was also enabled.&amp;nbsp; The second pin just set that step flip flop.&amp;nbsp; So the logic looked like:&lt;/P&gt;
&lt;P&gt;ip&amp;nbsp;=&amp;nbsp;ip + ( (singleStep &amp;amp; doStep) | (!singleStep) )&lt;/P&gt;
&lt;P&gt;This worked well since our opcode design was that each opcode fit into a single byte, so we only ever had to increment by one.&amp;nbsp; Once that was done, all that was left was to create a second debug circuit, which contained:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;a seven segment display, with a decoder hooked up to the output debug pins 
&lt;LI&gt;a set of toggles to select what the display was showing 
&lt;LI&gt;a toggle switch to set debug mode 
&lt;LI&gt;and a button to take one more step&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Adding that basic debug support took a few hours that night, but the hours of time it saved us made it easily worth it.&amp;nbsp; And from that point on, the leson was learned.&amp;nbsp; Circuit design always included test and debug support from day one.&lt;/P&gt;
&lt;P&gt;My other memory from that evening was getting back to the dorm after missing dinner due to getting this up and running.&amp;nbsp; I was starving, and was looking forward to microwaving up some Ramen (since most of the pizza places were also closed by that point).&amp;nbsp; My dorm room was right at the corner of the hallway, and as I rounded the corner my girlfriend at the time was coming around the other corner holding a bag with a Big Mac and super sized fries from the 24 hour McDonald's drive through in town.&amp;nbsp; Not that there's anything wrong with a Ramen dinner, but was that ever a sight for sore eyes! :-)&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Updated 10:31 AM - fixed xbox link&lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=502778" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shawnfa/archive/tags/Other/default.aspx">Other</category></item></channel></rss>