<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Mike McCabe's Test Blog</title>
	<atom:link href="http://mikemccabe.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mikemccabe.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Fri, 14 Aug 2009 21:54:50 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='mikemccabe.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/b4901a5801ee09299ee7c641b1ae6a9b?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Mike McCabe's Test Blog</title>
		<link>http://mikemccabe.wordpress.com</link>
	</image>
			<item>
		<title>Adding inter-project file references in Visual Studio 2005</title>
		<link>http://mikemccabe.wordpress.com/2008/12/13/adding-inter-project-file-references-in-visual-studio-2005/</link>
		<comments>http://mikemccabe.wordpress.com/2008/12/13/adding-inter-project-file-references-in-visual-studio-2005/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 21:06:00 +0000</pubDate>
		<dc:creator>mikemccabe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[references]]></category>
		<category><![CDATA[Solution Explorer]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://mikemccabe.wordpress.com/?p=14</guid>
		<description><![CDATA[A hack to add inter-project file references in Visual Studio - while still keeping a single file on the filesystem.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mikemccabe.wordpress.com&blog=859757&post=14&subd=mikemccabe&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Microsoft Visual Studio structures work as &#8216;Solutions&#8217;, each of which can contain multiple &#8216;Projects&#8217;.  I create each project in it&#8217;s own sub-directory.  This leads to a problem&#8230;</p>
<p>I wanted to add a project to my solution that used some C# files from another project in the same solution.  I tried the straightforward way, choosing &#8216;Add files&#8230;&#8217; on the target project and navigating to the files in the source project.  This created a new copy of the file in the target directory &#8211; not what I wanted.  If I later made changes to the file in one project, I&#8217;d have to manually go and make the changes to the same file in the other project, or allow them to diverge.  A maintenance headache.</p>
<p>So I did a hack:</p>
<ul>
<li>Add the files from the source project to the target project as above</li>
<li>Save the target project</li>
<li>Open the target project file (e.g. &#8216;.csproj&#8217;) in a text editor</li>
<li>Find the file refererences &#8211; something like<br />
<code>&lt;Compile Include="FileFromSourceProject.cs" /&gt;</code></li>
<li>Change to<br />
<code>&lt;Compile Include="..\SourceProject\FileFromSourceProject.cs" /&gt;</code></li>
<li>Save the project in the text editor</li>
<li>Delete the unneeded new file copies in the target project directory</li>
<li>Reopen the target project in Visual Studio.  (This happened automatically.)</li>
</ul>
<p>OK!  Now the files show up in the Solution Explorer with a little &#8216;reference&#8217; icon.</p>
<p>Anyone know how to do this without hacking?</p>
<p>Anyway, this works.  Just one file in the file system, logically shared by two projects.</p>
<p>To make this useful in practice, I started using conditional compilation symbols (in project properties -&gt; build) and #if &#8230; #endif sections in my code.  It&#8217;s clumsy and C-ish, but it got the job done.</p>
<p>One more note here:  The file will use the compilation symbols from whatever project you open it from &#8211; so if you&#8217;ve disabled some code for one project, it won&#8217;t show up in intellisense, etc.  This sometimes means you&#8217;ll want to close the file and re-open it by clicking on the right icon or reference in the Solution Explorer to get the right symbols.</p>
<p>It&#8217;s simple, but enough of a hack that I had to think a bit to remember how to do it the second time.  Maybe this post will help.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mikemccabe.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mikemccabe.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mikemccabe.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mikemccabe.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mikemccabe.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mikemccabe.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mikemccabe.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mikemccabe.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mikemccabe.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mikemccabe.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mikemccabe.wordpress.com&blog=859757&post=14&subd=mikemccabe&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mikemccabe.wordpress.com/2008/12/13/adding-inter-project-file-references-in-visual-studio-2005/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/589f2ab9248aee47ee1a90c8279d6e11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mikemccabe</media:title>
		</media:content>
	</item>
		<item>
		<title>Windows boot hang resolved!</title>
		<link>http://mikemccabe.wordpress.com/2008/07/19/windows-boot-hang-resolved/</link>
		<comments>http://mikemccabe.wordpress.com/2008/07/19/windows-boot-hang-resolved/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 02:01:32 +0000</pubDate>
		<dc:creator>mikemccabe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[boot hang]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[mirror]]></category>
		<category><![CDATA[partition]]></category>
		<category><![CDATA[puppy linux]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[windows xp]]></category>

		<guid isPermaLink="false">http://mikemccabe.wordpress.com/?p=10</guid>
		<description><![CDATA[This one took me weeks.  My laptop runs a dual boot mac/windows system, which is nifty and all&#8230; but managing partitions, and especially fixing partition problems, brings in a world where every step can require an hour with dd to fix.  But anyway.
Making a long story short&#8230; I mistakenly booted up my laptop with an [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mikemccabe.wordpress.com&blog=859757&post=10&subd=mikemccabe&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This one took me weeks.  My laptop runs a dual boot mac/windows system, which is nifty and all&#8230; but managing partitions, and especially fixing partition problems, brings in a world where every step can require an hour with dd to fix.  But anyway.</p>
<p>Making a long story short&#8230; I mistakenly booted up my laptop with an eSATA drive attached that contained an old exact mirror of my Windows install.  Something seemed wrong about the files on the desktop, so I shut down and rebooted without the drive&#8230; to discover that the Windows boot now hung at the blue &#8216;Welcome to Windows XP&#8217; screen.  (The MacOS boot was fine.)</p>
<p>During a rescue install, I noticed that Windows now seemed to think that the MacOS partition was the C drive, and the Windows partition was the D drive.</p>
<p>I eventually fixed this by adapting instructions from <a href="http://winhlp.com/node/66">http://winhlp.com/node/66</a> to modify the registry on the Windows partition.  I booted into Puppy Linux to access the windows files, then copied the registry &#8216;hive&#8217; to another windows machine to edit it.  I tried deleting the entries for \DosDevices\C: and \DosDevices\D: as suggested, but what finally worked was to *swap* the values associated with these entries.</p>
<p>The first thing I did on seeing the problem was to use Puppy Linux and dd to make an image of the problem partition.  So I was able to backtrack from the various failed rescue installs I tried, by restoring the image, but each step took hours.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mikemccabe.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mikemccabe.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mikemccabe.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mikemccabe.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mikemccabe.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mikemccabe.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mikemccabe.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mikemccabe.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mikemccabe.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mikemccabe.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mikemccabe.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mikemccabe.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mikemccabe.wordpress.com&blog=859757&post=10&subd=mikemccabe&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mikemccabe.wordpress.com/2008/07/19/windows-boot-hang-resolved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/589f2ab9248aee47ee1a90c8279d6e11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mikemccabe</media:title>
		</media:content>
	</item>
		<item>
		<title>A generic clamp function for C#</title>
		<link>http://mikemccabe.wordpress.com/2008/01/25/a-generic-clamp-function-for-c/</link>
		<comments>http://mikemccabe.wordpress.com/2008/01/25/a-generic-clamp-function-for-c/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 07:17:12 +0000</pubDate>
		<dc:creator>mikemccabe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[clamp]]></category>
		<category><![CDATA[generic]]></category>
		<category><![CDATA[System.IComparable]]></category>

		<guid isPermaLink="false">http://mikemccabe.wordpress.com/?p=9</guid>
		<description><![CDATA[My first C# generic function.
In computer terms, to clamp a value is to make sure that it lies between some maximum and minimum values. If it’s greater than the max value, then it’s replaced by the max, etc. I first learned it in the context of computer graphics, for colors &#8211; it’s used for instance [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mikemccabe.wordpress.com&blog=859757&post=9&subd=mikemccabe&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>My first C# generic function.</p>
<p>In computer terms, to clamp a value is to make sure that it lies between some maximum and minimum values. If it’s greater than the max value, then it’s replaced by the max, etc. I first learned it in the context of computer graphics, for colors &#8211; it’s used for instance to make sure that your raytraced pixel isn’t ‘blacker than black’. So:</p>
<pre>    public static T Clamp&lt;T&gt;(T Value, T Max, T Min)
         where T : System.IComparable&lt;T&gt; {
        if (Value.CompareTo(Max) &gt; 0)
            return Max;
        if (Value.CompareTo(Min) &lt; 0)
            return Min;
        return Value;
    }</pre>
<p>(Comments about multiple return values will be forwarded to the circular file.)</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mikemccabe.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mikemccabe.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mikemccabe.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mikemccabe.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mikemccabe.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mikemccabe.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mikemccabe.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mikemccabe.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mikemccabe.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mikemccabe.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mikemccabe.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mikemccabe.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mikemccabe.wordpress.com&blog=859757&post=9&subd=mikemccabe&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mikemccabe.wordpress.com/2008/01/25/a-generic-clamp-function-for-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/589f2ab9248aee47ee1a90c8279d6e11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mikemccabe</media:title>
		</media:content>
	</item>
		<item>
		<title>Sending email with Squirrelmail, via wget</title>
		<link>http://mikemccabe.wordpress.com/2007/08/07/sending-email-with-squirrelmail-via-wget/</link>
		<comments>http://mikemccabe.wordpress.com/2007/08/07/sending-email-with-squirrelmail-via-wget/#comments</comments>
		<pubDate>Tue, 07 Aug 2007 13:27:50 +0000</pubDate>
		<dc:creator>mikemccabe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mikemccabe.wordpress.com/2007/08/07/sending-email-with-squirrelmail-via-wget/</guid>
		<description><![CDATA[The many varieties of spam protection mean that it&#8217;s hard to send e-mail from the command-line these days.
I thought I&#8217;d see if I couldn&#8217;t do it with wget and my squirrelmail webmail account.  After much trial and error, here&#8217;s what I came up with:

wget --save-cookies cookies.txt --keep-session-cookies --post-data 'login_username=username&#38;secretkey=password' http://webmail.server.com/src/redirect.php
wget --load-cookies cookies.txt --post-data 'body=body [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mikemccabe.wordpress.com&blog=859757&post=8&subd=mikemccabe&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The many varieties of spam protection mean that it&#8217;s hard to send e-mail from the command-line these days.</p>
<p>I thought I&#8217;d see if I couldn&#8217;t do it with wget and my squirrelmail webmail account.  After much trial and error, here&#8217;s what I came up with:<br />
<code><br />
wget --save-cookies cookies.txt --keep-session-cookies --post-data 'login_username=<b>username</b>&amp;secretkey=<b>password</b>' http://<b>webmail.server.com</b>/src/redirect.php</code></p>
<p><code>wget --load-cookies cookies.txt --post-data 'body=<b>body here</b>&amp;send_to=<b>recipient%40wherever.com</b>&amp;subject=<b>subject here</b>&amp;send=1' http://<b>webmail.server.com</b>/src/compose.php</code></p>
<p>Looks like options are:</p>
<ul>
<li> send_to</li>
<li>send_to_cc</li>
<li>send_to_bcc</li>
<li>body</li>
<li>subject</li>
</ul>
<p>and maybe?:</p>
<ul>
<li> replyto</li>
<li>email_address.</li>
</ul>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mikemccabe.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mikemccabe.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mikemccabe.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mikemccabe.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mikemccabe.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mikemccabe.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mikemccabe.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mikemccabe.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mikemccabe.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mikemccabe.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mikemccabe.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mikemccabe.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mikemccabe.wordpress.com&blog=859757&post=8&subd=mikemccabe&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mikemccabe.wordpress.com/2007/08/07/sending-email-with-squirrelmail-via-wget/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/589f2ab9248aee47ee1a90c8279d6e11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mikemccabe</media:title>
		</media:content>
	</item>
		<item>
		<title>Running IE from C# in a separate process</title>
		<link>http://mikemccabe.wordpress.com/2007/04/14/running-ie-from-c-in-a-separate-process/</link>
		<comments>http://mikemccabe.wordpress.com/2007/04/14/running-ie-from-c-in-a-separate-process/#comments</comments>
		<pubDate>Sat, 14 Apr 2007 22:55:02 +0000</pubDate>
		<dc:creator>mikemccabe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mikemccabe.wordpress.com/2007/04/14/running-ie-from-c-in-a-separate-process/</guid>
		<description><![CDATA[This one took me a while.
I have a .Net 2.0 C# application (in Visual Studio 5.0) with an embedded WebBrowser object.  The application automatically loads web pages (for timing tests) &#8211; potentially thousands of them over the course of days.  As it turns out, this exposes a bad memory leak &#8211; every web [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mikemccabe.wordpress.com&blog=859757&post=5&subd=mikemccabe&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This one took me a while.</p>
<p>I have a .Net 2.0 C# application (in Visual Studio 5.0) with an embedded WebBrowser object.  The application automatically loads web pages (for timing tests) &#8211; potentially thousands of them over the course of days.  As it turns out, this exposes a bad memory leak &#8211; every web page the browser visits grows the process by a megabyte or more.  I&#8217;m pretty sure it&#8217;s not my app &#8211; I created a bare wrapper around a WebBrowser object, and saw the same behavior.  Ditto AxWebBrowser.</p>
<p>OK &#8211; how to move it out of process?  Visual Basic and WScript types have been doing this for aeons (with CreateObject(&#8220;InternetExplorer.Application&#8221;)), but it wasn&#8217;t obvious how to do  it in an early-bound way without InvokeMember calls.  I&#8217;m sure it&#8217;s old lore.  But for some reason, it took me a lot of searching!  Maybe I can save someone the pain.</p>
<p>Here&#8217;s what I found: (adapted from <a href="http://www.novicksoftware.com/TipsAndTricks/tip-csharp-open-ie-browser.htm">http://www.novicksoftware.com/TipsAndTricks/tip-csharp-open-ie-browser.htm</a> )</p>
<p>You might need to add SHDocVw.dll as a reference to your project.  Project-&gt;Add Reference-&gt;Browse to C:\WINDOWS\system32.</p>
<pre>using SHDocVw;
public InternetExplorer GetIE() {
    Type oType = Type.GetTypeFromProgID("InternetExplorer.Application");
    InternetExplorer result = null;
    if (oType != null) {
        result = Activator.CreateInstance(oType) as SHDocVw.InternetExplorer;
    }
    return result;
}</pre>
<p>Pretty simple.  (Error checking is left as an exercise for the reader <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
<p>The resulting InternetExplorer object is fully typed, joyful and IntelliSense-happy.  And it runs in an external process, so calling MyIEObj.Quit() frees the system memory.  Leak fixed.  Now it&#8217;s in an external window, but that&#8217;s fine by me.  (The &#8216;InternetExplorer&#8217; type differs from the &#8216;WebBrowser&#8217; type in that it has some extra application-oriented methods, such as Quit().)</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mikemccabe.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mikemccabe.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mikemccabe.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mikemccabe.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mikemccabe.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mikemccabe.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mikemccabe.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mikemccabe.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mikemccabe.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mikemccabe.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mikemccabe.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mikemccabe.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mikemccabe.wordpress.com&blog=859757&post=5&subd=mikemccabe&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mikemccabe.wordpress.com/2007/04/14/running-ie-from-c-in-a-separate-process/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/589f2ab9248aee47ee1a90c8279d6e11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mikemccabe</media:title>
		</media:content>
	</item>
		<item>
		<title>A simple fix I wish I&#8217;d known</title>
		<link>http://mikemccabe.wordpress.com/2007/03/17/a-simple-fix-i-wish-id-known/</link>
		<comments>http://mikemccabe.wordpress.com/2007/03/17/a-simple-fix-i-wish-id-known/#comments</comments>
		<pubDate>Sat, 17 Mar 2007 02:58:45 +0000</pubDate>
		<dc:creator>mikemccabe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mikemccabe.wordpress.com/2007/03/17/a-simple-fix-i-wish-id-known/</guid>
		<description><![CDATA[I&#8217;ve been developing a GUI application in C#, in MS Visual Studio 2005.  Mostly a pleasant experience.  However&#8230;
I recently added a vanilla C++ dll to my C# application, so I could call a few of it&#8217;s functions via p/invoke.  All was good until I tried to deploy the application to another machine, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mikemccabe.wordpress.com&blog=859757&post=3&subd=mikemccabe&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve been developing a GUI application in C#, in MS Visual Studio 2005.  Mostly a pleasant experience.  However&#8230;</p>
<p>I recently added a vanilla C++ dll to my C# application, so I could call a few of it&#8217;s functions via p/invoke.  All was good until I tried to deploy the application to another machine, whereupon I got the usual polite crash notification as soon as I called anything in the application that tried to p/invoke the new dll:</p>
<blockquote><p>Venturi Wireless Timer has encountered a problem and needs to close.  We are sorry for the inconvenience.</p></blockquote>
<p>On debugging I learned the following: (after installing the .net platform SDK on the remote machine&#8230; at 300MB, I&#8217;m looking for alternatives!)</p>
<blockquote><p>An unhandled exception of type &#8216;System.DllNotFoundException&#8217; occurred in MyCSharpGUI.exe</p>
<p>Additional information: Unable to load DLL &#8216;mynewdll.dll&#8217;: This application has failed to start because the application configuration is incorrect.  Reinstalling the application may fix this problem.  (Exception from HRESULT: 0&#215;800736B1)</p></blockquote>
<p>mynewdll.dll was in the application directory, where it should be.  Copy to system32&#8230; no luck.  Rename?  The next time I start the application, there&#8217;s a quick progress bar, and a fresh copy reappears.  So the application install knows about the dll&#8230; but is there some kind of manifest voodoo?</p>
<p><strong>The solution:</strong> In the installer project for the application, within Visual Studio, go to Properties, click Prerequisites, and check &#8216;Visual C++ Runtime Libraries (x86)&#8217;.  Makes sense.  A clearer error message might have helped&#8230;</p>
<p>Now (unlike other prerequisites) the installer installs the C++ runtime libraries every time, without detecting if they&#8217;ve already been installed.  Not perfect, but it&#8217;s progress!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mikemccabe.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mikemccabe.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mikemccabe.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mikemccabe.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mikemccabe.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mikemccabe.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mikemccabe.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mikemccabe.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mikemccabe.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mikemccabe.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mikemccabe.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mikemccabe.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mikemccabe.wordpress.com&blog=859757&post=3&subd=mikemccabe&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mikemccabe.wordpress.com/2007/03/17/a-simple-fix-i-wish-id-known/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/589f2ab9248aee47ee1a90c8279d6e11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mikemccabe</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello world!</title>
		<link>http://mikemccabe.wordpress.com/2007/03/10/hello-world/</link>
		<comments>http://mikemccabe.wordpress.com/2007/03/10/hello-world/#comments</comments>
		<pubDate>Sat, 10 Mar 2007 02:16:31 +0000</pubDate>
		<dc:creator>mikemccabe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[My test blog.  When I find a solution to a software problem, I&#8217;ll post it here.  And maybe other stuff.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mikemccabe.wordpress.com&blog=859757&post=1&subd=mikemccabe&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>My test blog.  When I find a solution to a software problem, I&#8217;ll post it here.  And maybe other stuff.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mikemccabe.wordpress.com/1/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mikemccabe.wordpress.com/1/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mikemccabe.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mikemccabe.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mikemccabe.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mikemccabe.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mikemccabe.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mikemccabe.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mikemccabe.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mikemccabe.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mikemccabe.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mikemccabe.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mikemccabe.wordpress.com&blog=859757&post=1&subd=mikemccabe&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mikemccabe.wordpress.com/2007/03/10/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/589f2ab9248aee47ee1a90c8279d6e11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mikemccabe</media:title>
		</media:content>
	</item>
	</channel>
</rss>