<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Bug me</title><subtitle type="html" /><id>http://blogs.msdn.com/rchiodo/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/rchiodo/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/rchiodo/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2007-03-30T00:46:00Z</updated><entry><title>Hidden feature of VSIP: Sharing a machine</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/rchiodo/archive/2007/05/03/sharing-a-machine-hidden-feature-of-vsip.aspx" /><id>http://blogs.msdn.com/rchiodo/archive/2007/05/03/sharing-a-machine-hidden-feature-of-vsip.aspx</id><published>2007-05-04T02:58:00Z</published><updated>2007-05-04T02:58:00Z</updated><content type="html">&lt;P&gt;Okay so this really isn't a debugger feature, but I thought it was handy anyway.&lt;/P&gt;
&lt;P&gt;Yesterday a colleague and I were both logged onto the same machine, both using Visual Studio as two different users. Since I work at Microsoft, I naturally needed to change Visual Studio. So how to do that without having my co-worker log off (because he had the same dlls loaded I needed to change)?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Registry hives&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;VSIP&amp;nbsp;(well actually Visual Studio) has this &lt;A class="" title=nifty href="http://msdn2.microsoft.com/en-us/library/bb166560(VS.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb166560(VS.80).aspx"&gt;nifty&lt;/A&gt; idea where you can load devenv using a different root key in the registry. The intent here is&amp;nbsp;that when you are developing a Visual Studio &lt;A class="" title=package href="http://msdn2.microsoft.com/en-us/library/bb166424(VS.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb166424(VS.80).aspx"&gt;package&lt;/A&gt;&amp;nbsp;you can build the package in one instance of Visual Studio and run in another. This means the package is not loaded in the same environment you are building in. Very handy when your package causes Visual Studio to crash. How would you debug it if you can't even start Visual Studio?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;So most of the time (at least in my past) people use the Exp hive. If you look in your registry, you'll have a root install of HKLM\Software\Microsoft\VisualStudio\8.0. The Exp hive lives at HKLM\Software\Microsoft\VisualStudio\8.0Exp. If you install your package in just the Exp hive, you can run the Exp version and debug with the normal.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Package redirect&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;So how did I use this exp hive to my advantage? &lt;/P&gt;
&lt;P&gt;Packages are loaded dynamically as devenv needs them (usually when a command or window from the package is called). The location for these packages is stored in the registry underneath the root location for Visual Studio (i.e. HKLM\Software\Microsoft\VisualStudio\8.0\Packages\{package guid}). &lt;/P&gt;
&lt;P&gt;For example, the debugger package (which is what I wanted to change) is loaded from here:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 1184px; HEIGHT: 248px" height=248 src="http://blogs.msdn.com/photos/rchiodo/images/2402290/original.aspx" width=1184 mce_src="http://blogs.msdn.com/photos/rchiodo/images/2402290/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;Since my colleague was using the 9.0 hive, I could just change the package load location for my Exp hive and have my version of devenv load a different dll! &lt;/P&gt;
&lt;P&gt;Something like so:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 1184px; HEIGHT: 248px" height=248 src="http://blogs.msdn.com/photos/rchiodo/images/2402439/original.aspx" width=1184 mce_src="http://blogs.msdn.com/photos/rchiodo/images/2402439/original.aspx"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2402233" width="1" height="1"&gt;</content><author><name>rchiodo</name><uri>http://blogs.msdn.com/members/rchiodo.aspx</uri></author></entry><entry><title>The next level of DLL Hell - SxS.</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/rchiodo/archive/2007/04/09/the-next-level-of-dll-hell-sxs.aspx" /><id>http://blogs.msdn.com/rchiodo/archive/2007/04/09/the-next-level-of-dll-hell-sxs.aspx</id><published>2007-04-09T23:34:00Z</published><updated>2007-04-09T23:34:00Z</updated><content type="html">&lt;P&gt;Everybody seems to be having SxS &lt;A class="" title=problems href="http://search.msdn.microsoft.com/search/default.aspx?__VIEWSTATE=&amp;amp;query=sxs+crt&amp;amp;siteid=0&amp;amp;tab=2" target=_blank mce_href="http://search.msdn.microsoft.com/search/default.aspx?__VIEWSTATE=&amp;amp;query=sxs+crt&amp;amp;siteid=0&amp;amp;tab=2"&gt;problems&lt;/A&gt;. I know I have them all the time.&lt;/P&gt;
&lt;P&gt;SxS (or side by side) was a solution Microsoft developed for people distributing the C runtime with their application. &lt;/P&gt;
&lt;P&gt;I won't comment on whether or not this was the right solution to the problem, but I'll talk about what I do to resolve it. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Is it SxS?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Anytime an application doesn't load a dll or refuses to start for some reason, I suspect SxS. Usually you'll get something like: &lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The application has attempted to load the runtime library incorrectly.&amp;nbsp; Contact support for more information&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This application has failed to start because the application configuration is incorrect&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;At this point, I do one of the following to make sure it is a side by side issue:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Open the event log in (XP/Vista) and look at the Application or System list. There should be a SxS error in there somewhere&lt;/LI&gt;
&lt;LI&gt;Open the offending dll or exe&amp;nbsp;using depends.exe (usually installed with Visual Studio under Common7\Tools\Bin). It will tell you if there is a SxS issue.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Do I have that CRT installed?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;So one reason you might be having sxs problems is you don't even have the appropriate run time dlls installed. Usually this isn't the case, but I say it here first just&amp;nbsp;to make sure you check.&lt;/P&gt;
&lt;P&gt;To check if you do:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Open the event from the event viewer that identifies what dll it is trying to load. Vista shows something like so:&lt;/LI&gt;&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;Component identity found in manifest does not match the identity of the component requested. Reference is Microsoft.VC80.ATL blah blah blah&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;UL&gt;
&lt;LI&gt;Go to your Windows\WinSxS directory and see if you have a directory with a name containing the reference. Vista could have multiple.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;If you find a directory containing the name of the runtime, then some version of that runtime is installed. You probably need to redirect.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Redirecting - Fixing the problem &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Obligatory warning: Mucking with system files can screw stuff up later on. Not that I've had problems after doing any of these fixes, but people say it's unsupported. I wouldn't recommend this as&amp;nbsp;a "fix" but rather a workaround on your development machine. &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Anyway, here's what I do depending upon the platform:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;XP/2003 Server&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Go to the event log. Find the error that names the dll you are having trouble with (there might be 3 or more errors for your one side by side load) &lt;/LI&gt;
&lt;LI&gt;Go to the Windows\WinSxS\Policies\&amp;lt;goofy directory containing your CRT dll name&amp;gt;&lt;/LI&gt;
&lt;LI&gt;Edit the .policy file with the &lt;STRONG&gt;&lt;EM&gt;largest&lt;/EM&gt;&lt;/STRONG&gt; number. &lt;/LI&gt;
&lt;LI&gt;Change the binding redirect to be like so:&lt;/LI&gt;&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;bindingRedirect&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;oldVersion&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;9.0.0.0-9.0.65535.65535&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;newVersion&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;9.0.&lt;STRONG&gt;xxxxxx&lt;/STRONG&gt;.&lt;STRONG&gt;xxxxx&lt;/STRONG&gt;&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;UL&gt;
&lt;LI&gt;The critical part here is that the&amp;nbsp;the &lt;EM&gt;&lt;STRONG&gt;newVersion&lt;/STRONG&gt;&lt;/EM&gt; value matches the policy file's main number. Here's one on my machine:&lt;/LI&gt;&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Lucida Console;}}{\colortbl;??\red255\green0\blue0;\red255\green255\blue255;\red0\green0\blue255;\red0\green0\blue0;}??\fs16 \cf1 name\cf3 =\cf0 "\cf3 policy.9.0.Microsoft.VC90.DebugCRT\cf0 "\cf3  \cf1 version\cf3 =\cf0 "\cf3 9.0.20223.44800\cf0 "}
--&gt;
&lt;DIV style="FONT-SIZE: 8pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Lucida Console"&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: red"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: red"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;policy.9.0.Microsoft.VC90.DebugCRT&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;version&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;9.0.20223.44800&lt;/SPAN&gt;"&lt;/P&gt;&lt;/DIV&gt;&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="MARGIN: 0px"&gt;Make sure the number at the top of the file matches the newVersion you type in.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Vista&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Go to the event log. Find the error that names the dll you are having trouble with (there might be 3 or more errors for your one side by side load) &lt;/LI&gt;
&lt;LI&gt;Go to the Windows\WinSxS\Manifests&lt;/LI&gt;
&lt;LI&gt;Find the &lt;STRONG&gt;&lt;EM&gt;newest&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;manifest file with the name like so &lt;/LI&gt;&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;x86_policy.8.0.microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.762_none_8e053e8c6967ba9d.manifest&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;The important parts being x86_policy and microsoft.vc80.atl - this name matches the runtime you are trying to redirect. The rest of the name doesn't really matter, although it should be the newest file and probably the&amp;nbsp;highest version&amp;nbsp;x86_policy file in that directory for your runtime.&lt;/P&gt;
&lt;P&gt;My friend John discusses another alternative (at least on Vista) to find the appropriate file:&amp;nbsp;&lt;A class="" title=sxstrace href="http://lyon-smith.org/blogs/code-o-rama/archive/2007/03/28/side-by-side-problems.aspx" mce_href="http://lyon-smith.org/blogs/code-o-rama/archive/2007/03/28/side-by-side-problems.aspx"&gt;sxstrace&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;UL&gt;
&lt;LI&gt;Edit this file and change the binding redirect to be like so:&lt;/LI&gt;&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;bindingRedirect&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;oldVersion&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;8.0.0.0-8.0.65535.65535&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;newVersion&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"8&lt;SPAN style="COLOR: blue"&gt;.0.&lt;STRONG&gt;xxxxxx&lt;/STRONG&gt;.&lt;STRONG&gt;xxxxx&lt;/STRONG&gt;&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;UL&gt;
&lt;LI&gt;The critical part here is that the&amp;nbsp;the &lt;EM&gt;&lt;STRONG&gt;newVersion&lt;/STRONG&gt;&lt;/EM&gt; value matches the policy file's main number. Here's one on my machine:&lt;/LI&gt;&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Lucida Console;}}{\colortbl;??\red255\green0\blue0;\red255\green255\blue255;\red0\green0\blue255;\red0\green0\blue0;}??\fs16 \cf1 name\cf3 =\cf0 "\cf3 policy.9.0.Microsoft.VC90.DebugCRT\cf0 "\cf3  \cf1 version\cf3 =\cf0 "\cf3 9.0.20223.44800\cf0 "}
--&gt;
&lt;DIV style="FONT-SIZE: 8pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Lucida Console"&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: red"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: red"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;policy.8.0.Microsoft.VC80.ATL"&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;version&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;8.0.50727.44800&lt;/SPAN&gt;"&lt;/P&gt;&lt;/DIV&gt;&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="MARGIN: 0px"&gt;Make sure the number at the top of the file matches the newVersion you type in.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;UL&gt;
&lt;LI&gt;Here's another caveat for vista = saving the file.&amp;nbsp;You probably aren't the owner of this file. You need to remove whoever is the owner, and make yourself owner of this file before you can save it. I'll leave that step up to the user for brevity's sake. &lt;/LI&gt;&lt;/UL&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;After changing the appropriate policy file, your app should start to work. If it doesn't, hey you might have a dependency on another part of the CRT. Check the event log again :)&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;&lt;SPAN style="COLOR: red"&gt;Update: How to tell when this isn't going to work&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;So I finally ran into a case when this workaround failed. When the CRT is actually different and your application is using the wrong CRT! Duh. &lt;/P&gt;
&lt;P mce_keep="true"&gt;You'll get something like:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;&lt;EM&gt;---------------------------&lt;BR&gt;devenv.exe - Entry Point Not Found&lt;BR&gt;---------------------------&lt;BR&gt;The procedure entry point &lt;/EM&gt;&lt;A href="mailto:?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0ABV12@@Z"&gt;&lt;EM&gt;?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0ABV12@@Z&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt; could not be located in the dynamic link library MSVCP80.dll. &lt;BR&gt;---------------------------&lt;BR&gt;OK&amp;nbsp;&amp;nbsp; &lt;BR&gt;---------------------------&lt;BR&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;In this case you actually need to go through the correct channels - like trying to find this version of the CRT and installing it. Should be installed under:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; COLOR: black; FONT-FAMILY: Verdana"&gt;Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; COLOR: black; FONT-FAMILY: Verdana" mce_keep="true"&gt;You might also try a &lt;A class="" title=manifest href="http://msdn2.microsoft.com/en-us/library/ms229072(vs.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms229072(vs.80).aspx"&gt;manifest&lt;/A&gt; for the appropriate dlls. Here's a blog entry about&lt;A class="" title=it href="http://otb.manusoft.com/2007/01/my-manusoft-manifest-manifesto.htm" mce_href="http://otb.manusoft.com/2007/01/my-manusoft-manifest-manifesto.htm"&gt; it&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2064284" width="1" height="1"&gt;</content><author><name>rchiodo</name><uri>http://blogs.msdn.com/members/rchiodo.aspx</uri></author></entry><entry><title>PCs still suck</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/rchiodo/archive/2007/04/09/pcs-still-suck.aspx" /><id>http://blogs.msdn.com/rchiodo/archive/2007/04/09/pcs-still-suck.aspx</id><published>2007-04-09T21:29:00Z</published><updated>2007-04-09T21:29:00Z</updated><content type="html">&lt;P&gt;Okay so I probably shouldn't be writing that as a title considering who I work for, but I had a rather frustrating weekend IT session. Since I work at Microsoft, all of my family and friends expect me to answer any obscure computer problem they might have.&amp;nbsp; I wonder if doctors have this same problem?&lt;/P&gt;
&lt;P&gt;I had 3 separate "support" calls this weekend:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;My wife informed me that Win32 was not working on our laptop. &lt;/LI&gt;
&lt;LI&gt;My in-laws told me that they couldn't see themselves when talking to us through video conferencing (and hence we couldn't see them either)&lt;/LI&gt;
&lt;LI&gt;Our laptop was consistently blue-screening (separate issue from the first) during video conferencing.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;All 3 of these problems would not be&amp;nbsp;diagnosable by say my wife. In fact one of them was only fixable because of the specific knowledge I have from working here. &lt;/P&gt;
&lt;P&gt;PC's still aren't ready or usable by home consumers. At least not without a lot of hand holding and support. How come we haven't fixed this yet? Why do PCs have to be so techie? Okay I know why, but the reasons/excuses seem shortsighted to me.&lt;/P&gt;
&lt;P&gt;What if we had an OS where all drivers were controlled/written by the vendor. What if the whole OS allowed but a single app to run at a time? And what if you had to control it with say, a game controller, instead of a keyboard and a mouse? &lt;/P&gt;
&lt;P&gt;I think for Christmas next year I'm buying everybody an X-box with live and a camera. &lt;/P&gt;
&lt;P&gt;Now if only X-box live would come&amp;nbsp;with a browser.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2063045" width="1" height="1"&gt;</content><author><name>rchiodo</name><uri>http://blogs.msdn.com/members/rchiodo.aspx</uri></author></entry><entry><title>Hidden Breakpoint Feature: Stepping in just one thread</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/rchiodo/archive/2007/03/30/hidden-breakpoint-feature-stepping-in-threads.aspx" /><id>http://blogs.msdn.com/rchiodo/archive/2007/03/30/hidden-breakpoint-feature-stepping-in-threads.aspx</id><published>2007-03-30T11:00:00Z</published><updated>2007-03-30T11:00:00Z</updated><content type="html">&lt;P&gt;So I was giving this demo the other day of some of our new concurrency features in&amp;nbsp;the &lt;A class="" title="Orcas CTP" href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx" mce_href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx"&gt;Orcas CTP&lt;/A&gt;&amp;nbsp;and&amp;nbsp; I found this "new" feature for breakpoints. At least it was new for me. Sorry I'm a noob :)&lt;/P&gt;
&lt;P&gt;The code was something like so:&lt;/P&gt;
&lt;DIV style="FONT-SIZE: 8pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Lucida Console"&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;DIV style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;451&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; ComputePrimes_ThreadProc(&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; obj)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;452&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;453&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #2b91af"&gt;ThreadParams&lt;/SPAN&gt; threadParams = (&lt;SPAN style="COLOR: #2b91af"&gt;ThreadParams&lt;/SPAN&gt;)obj;&lt;SPAN style="COLOR: #ff0000"&gt; &amp;lt;- Breakpoint here&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;454&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;455&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// Go through our range, determining if a number is a prime&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;456&lt;/SPAN&gt;&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;for&lt;/SPAN&gt; (&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; number = threadParams.lower; number &amp;lt;= threadParams.upper; number++)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;457&lt;/SPAN&gt;&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;&lt;SPAN style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;458&lt;/SPAN&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; &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (IsAPrime(number))&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;459&lt;/SPAN&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; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;460&lt;/SPAN&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; &lt;SPAN style="COLOR: green"&gt;// Then add to our list&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;461&lt;/SPAN&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; _primes.Add(number); &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;462&lt;/SPAN&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; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;463&lt;/SPAN&gt;&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;&lt;SPAN style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;464&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;&amp;nbsp;&amp;nbsp;465&lt;/SPAN&gt;&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" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;!--EndFragment--&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;The problem I was trying to demonstrate, while stepping through some code, was a race condition&amp;nbsp;occurring&amp;nbsp;on a collection&amp;nbsp;(one of our new features is supposed to help point this out). However, whenever I stepped, the other threads kept hitting the breakpoint, moving my ip indicator back to the breakpoint, and generally screwing stuff up.&lt;/P&gt;
&lt;P&gt;Here's a screenshot of it in action (notice our new other thread indicators)&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG src="http://blogs.msdn.com/photos/rchiodo/images/1994726/original.aspx" mce_src="http://blogs.msdn.com/photos/rchiodo/images/1994726/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;Yeah this is a pain. I want to just step in this first thread. I guess I could wait until the right thread gets to the breakpoint, then freeze everybody else. This doesn't seem to work though (mostly because of the internal state of the other threads)&lt;/P&gt;
&lt;P&gt;But wait, there is a way to step in just this thread!&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's how:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Right click on the breakpoint and select "Filter" from the list of options&lt;/LI&gt;
&lt;LI&gt;When the filter dialog appears, type in a filter condition. I used ThreadName=&amp;lt;my thread name&amp;gt;&lt;/LI&gt;
&lt;LI&gt;Click OK&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Now when the breakpoint gets hit, only this thread will be in stepping mode. (Something else I learned, threads are in one of 3 states - stepping, running, or suspended)&lt;/P&gt;
&lt;P&gt;So as you step, the IP indicator won't jump around. &lt;/P&gt;
&lt;P&gt;Of course this then made me want more, but I'll leave that for another post. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1991654" width="1" height="1"&gt;</content><author><name>rchiodo</name><uri>http://blogs.msdn.com/members/rchiodo.aspx</uri></author><category term="Hidden features" scheme="http://blogs.msdn.com/rchiodo/archive/tags/Hidden+features/default.aspx" /></entry><entry><title>Hello World</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/rchiodo/archive/2007/03/30/hello-world.aspx" /><id>http://blogs.msdn.com/rchiodo/archive/2007/03/30/hello-world.aspx</id><published>2007-03-30T02:46:00Z</published><updated>2007-03-30T02:46:00Z</updated><content type="html">&lt;P&gt;Hi, my name is Rich Chiodo, and I work at Microsoft. &lt;/P&gt;
&lt;P&gt;That sounds like an admission of guilt.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suppose in some ways I do feel guilty working here. I work for the&amp;nbsp;&lt;EM&gt;man&lt;/EM&gt; now. No longer am I&amp;nbsp;one of the free spirited plebes of the&amp;nbsp;software world. I am&amp;nbsp;now the property of Mr. Bill. &lt;/P&gt;
&lt;P&gt;I've been here for 8 months as part of the Visual Studio Diagnostics team - specifically working in the Visual Studio debugger. I'm hoping that this blog will let me discuss some of the interesting things I've found (or am trying to do) with the debugger. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1991608" width="1" height="1"&gt;</content><author><name>rchiodo</name><uri>http://blogs.msdn.com/members/rchiodo.aspx</uri></author></entry></feed>