<?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/"
	>

<channel>
	<title>Throw a Chair!</title>
	<atom:link href="http://throwachair.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://throwachair.com</link>
	<description>what you do when you're angry</description>
	<lastBuildDate>Mon, 04 Jul 2011 22:50:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>ModSecurity: Multipart parsing error: Multipart: Final boundary missing. (Wiki bot running on Dreamhost)</title>
		<link>http://throwachair.com/2011/07/04/modsecurity-multipart-parsing-error-multipart-final-boundary-missing-wiki-bot-running-on-dreamhost/</link>
		<comments>http://throwachair.com/2011/07/04/modsecurity-multipart-parsing-error-multipart-final-boundary-missing-wiki-bot-running-on-dreamhost/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 22:50:09 +0000</pubDate>
		<dc:creator>xtravar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://throwachair.com/?p=89</guid>
		<description><![CDATA[I was running a Wiki Bot on a Dreamhost hosted website.  This was the error I received: ModSecurity: Multipart parsing error: Multipart: Final boundary missing. &#160; Turning off &#8220;added security&#8221; in the Dreamhost Panel helped a little bit, but I&#8217;m still occasional errors.]]></description>
			<content:encoded><![CDATA[<p>I was running a Wiki Bot on a Dreamhost hosted website.  This was the error I received:</p>
<blockquote><p>ModSecurity: Multipart parsing error: Multipart: Final boundary missing.</p></blockquote>
<p>&nbsp;</p>
<p>Turning off &#8220;added security&#8221; in the Dreamhost Panel helped a little bit, but I&#8217;m still occasional errors.</p>
]]></content:encoded>
			<wfw:commentRss>http://throwachair.com/2011/07/04/modsecurity-multipart-parsing-error-multipart-final-boundary-missing-wiki-bot-running-on-dreamhost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to move installed files and have them still work (Steam games, etc)</title>
		<link>http://throwachair.com/2011/06/13/how-to-move-installed-files-and-have-them-still-work-steam-games-etc/</link>
		<comments>http://throwachair.com/2011/06/13/how-to-move-installed-files-and-have-them-still-work-steam-games-etc/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 00:48:36 +0000</pubDate>
		<dc:creator>xtravar</dc:creator>
				<category><![CDATA[gaming]]></category>
		<category><![CDATA[nerding it up]]></category>
		<category><![CDATA[steam]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://throwachair.com/?p=84</guid>
		<description><![CDATA[BACKGROUND With SSD drives, this is going to become more and more of a problem until their capacity gets ramped up. We must manually select what we want on the drive to be fast, and put the other stuff on a cheap, large-capacity, mechanical drive. However, Windows and Windows applications make this very difficult. For [...]]]></description>
			<content:encoded><![CDATA[<p><strong>BACKGROUND</strong></p>
<p>With SSD drives, this is going to become more and more of a problem until their capacity gets ramped up.  We must manually select what we want on the drive to be fast, and put the other stuff on a cheap, large-capacity, mechanical drive.  However, Windows and Windows applications make this very difficult.</p>
<p>For the purposes of this example, I will use Steam.  Steam places games in &#8220;C:\Program Files (x86)\Steam\steamapps\common\&#8221;.  Games can be pretty large.  So when you get to the limit, you have to delete one of the installed games.  For me, this is around 4 or 5 modern games, so it&#8217;s not very convenient.  There&#8217;s a longstanding request on the Steam forums to address this functionality, because you can only install games to the drive Steam is on&#8230; or can you?</p>
<p>Windows Vista introduced symbolic links.  They&#8217;re a feature that other operating systems have had for years.  Prior versions of Windows could make &#8220;junction points&#8221;, and you can find that application if you&#8217;re using XP or lower, but for the purposes of this post we will talk about this new feature since junctions can cause unforeseen issues &#8211; particularly with system files.</p>
<p><strong>LONG EXPLANATION</strong></p>
<p>A symbolic link allows you to map a directory or file in one place to another without any applications understanding that it isn&#8217;t in the place they think it is.</p>
<p>So let&#8217;s say I want to put Borderlands &#8211; a 12 GB game &#8211; on another drive because I won&#8217;t be needing fast loading times since I already beat it.  I would move &#8220;C:\Program Files (x86)\Steam\steamapps\common\borderlands&#8221; to &#8220;D:\steam\borderlands&#8221;.  Now, Steam cannot find it.</p>
<p>The next step is to open an Administrator command prompt (type cmd into the Start Menu search, right click on command prompt, and go to &#8220;Run as Administrator&#8221;).</p>
<blockquote><p><code>mklink /D "C:\Program Files\ (x86)\Steam\steamapps\common\borderlands" "D:\steam\borderlands"</code></p></blockquote>
<p>Now Steam will be able to find it!  If new DLC comes out and you&#8217;ll be playing more often, delete the symbolic link (the folder in steamapps) and move the folder back where it came from.</p>
<p>At some point I might make an app to automate this.  Enjoy!</p>
<p><strong>TL;DR</strong></p>
<ol>
<li>Move the folder elsewhere.</li>
<li>mklink /D [FOLDER] [ACTUAL FOLDER]</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://throwachair.com/2011/06/13/how-to-move-installed-files-and-have-them-still-work-steam-games-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Radeon HD6870 VF3000A Installation (photos)</title>
		<link>http://throwachair.com/2011/05/09/radeon-hd6870-vf3000a-installation-photos/</link>
		<comments>http://throwachair.com/2011/05/09/radeon-hd6870-vf3000a-installation-photos/#comments</comments>
		<pubDate>Tue, 10 May 2011 03:17:28 +0000</pubDate>
		<dc:creator>xtravar</dc:creator>
				<category><![CDATA[computers]]></category>
		<category><![CDATA[nerding it up]]></category>
		<category><![CDATA[amd]]></category>
		<category><![CDATA[hd6870]]></category>
		<category><![CDATA[radeon]]></category>
		<category><![CDATA[vf3000a]]></category>
		<category><![CDATA[zalman]]></category>

		<guid isPermaLink="false">http://throwachair.com/?p=78</guid>
		<description><![CDATA[I&#8217;m putting this up mostly because I was looking for pics and they didn&#8217;t exist. So in case you&#8217;re wondering what kind of heatsink to buy for your Radeon HD6870, here are installation and finish photos. I had to mod my case because the heatsink takes up too much space. Link to gallery.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m putting this up mostly because I was looking for pics and they didn&#8217;t exist.  So in case you&#8217;re wondering what kind of heatsink to buy for your Radeon HD6870, here are installation and finish photos.  I had to mod my case because the heatsink takes up too much space.</p>
<p><a href="http://throwachair.com/radeon-hd6870-vf3000a-installation/">Link to gallery.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://throwachair.com/2011/05/09/radeon-hd6870-vf3000a-installation-photos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ApplicationsMenu (Cairo-Dock applet)</title>
		<link>http://throwachair.com/2010/09/15/applicationsmenu-cairo-dock-applet/</link>
		<comments>http://throwachair.com/2010/09/15/applicationsmenu-cairo-dock-applet/#comments</comments>
		<pubDate>Thu, 16 Sep 2010 03:10:11 +0000</pubDate>
		<dc:creator>xtravar</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://throwachair.com/?p=62</guid>
		<description><![CDATA[ApplicationsMenu is my first Cairo-Dock applet.  It is written in C# and requires Mono, NDesk.DBus, and libgnome-menus. Its goal is to emulate the Mac OSX applications menu as much as possible with the API provided. You can download it here: ApplicationsMenu Cairo-Dock Applet v0.0.1 The source contains multiple useful components: 1. A (beautiful) C# wrapper [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-59" href="http://throwachair.com/2010/09/15/applicationsmenu-cairo-dock-applet/applicationsmenu/"><img class="aligncenter size-full wp-image-59" title="Applications Menu" src="http://throwachair.com/uploads/2010/09/applicationsmenu.png" alt="Applications Menu" width="554" height="549" /></a></p>
<p>ApplicationsMenu is my first Cairo-Dock applet.  It is written in C# and requires Mono, NDesk.DBus, and libgnome-menus.</p>
<p>Its goal is to emulate the Mac OSX applications menu as much as possible with the API provided.</p>
<p>You can download it here: <a href="http://throwachair.com/uploads/2010/09/applicationsmenu-_001tar.gz">ApplicationsMenu Cairo-Dock Applet v0.0.1</a><a rel="attachment wp-att-60" href="http://throwachair.com/2010/09/15/applicationsmenu-cairo-dock-applet/applicationsmenu-_001tar/"><br />
</a></p>
<p>The source contains multiple useful components:<br />
1. A (beautiful) C# wrapper for the Cairo-Dock DBus API.<br />
2. A wrapper for libgnome-menus<br />
3. Modification of some C# Diff code I found online.</p>
<p>You can download the source here: <a href="http://throwachair.com/uploads/2010/09/applicationsmenu-source_001tar.gz">ApplicationsMenu Source v0.0.1</a><a rel="attachment wp-att-61" href="http://throwachair.com/2010/09/15/applicationsmenu-cairo-dock-applet/applicationsmenu-source_001tar/"></a></p>
<p>Hopefully this is useful to someone else, as either an applet or example code.</p>
]]></content:encoded>
			<wfw:commentRss>http://throwachair.com/2010/09/15/applicationsmenu-cairo-dock-applet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to watch Hulu in the Playstation 3 browser</title>
		<link>http://throwachair.com/2009/09/21/how-to-watch-hulu-in-the-playstation-3-browser/</link>
		<comments>http://throwachair.com/2009/09/21/how-to-watch-hulu-in-the-playstation-3-browser/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 03:51:14 +0000</pubDate>
		<dc:creator>xtravar</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[ps3]]></category>

		<guid isPermaLink="false">http://throwachair.com/?p=50</guid>
		<description><![CDATA[Even though the PS3 Hulu experience kind of sucked, I kept hoping it would get better after each System Update. Until&#8230; Hulu banned the Playstation 3 browser. The message they give is &#8220;This video is not available on your platform&#8221;. I could go on a tirade about this, but instead I will just arm you [...]]]></description>
			<content:encoded><![CDATA[<p>Even though the PS3 Hulu experience kind of sucked, I kept hoping it would get better after each System Update.  Until&#8230; Hulu <a href="http://www.engadget.com/2009/06/27/ps3-owners-get-boxeed-hulu-this-video-is-not-available-on-yo/">banned the Playstation 3 browser</a>.  The message they give is &#8220;This video is not available on your platform&#8221;.</p>
<p>I could go on a tirade about this, but instead I will just arm you with the knowledge you need to solve this problem and do what they don&#8217;t want you to.  The basic steps are:</p>
<ol>
<li>Set up a HTTP proxy that rewrites the <a href="http://en.wikipedia.org/wiki/User_agent">User-Agent</a> string</li>
<li>Configure Playstation 3 network settings to use this proxy</li>
<li>Watch Hulu on PS3.</li>
</ol>
<p>Naturally, I chose to expand my file server/router machine&#8217;s job by installing Squid 3.0 (proxy software), though you can set up any HTTP proxy on any machine on your network so long as it is capable of rewriting the User-Agent header.</p>
<p>Be warned, though, if you use Squid that there is a lot of conflicting information out there since they changed the configuration directives across versions.  In Squid 3.0, merely add this to your squid.conf:</p>
<blockquote><p>request_header_access User-Agent deny all<br />
header_replace User-Agent Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; YPC 3.0.1; .NET CLR 1.1.4322; .NET CLR)</p></blockquote>
<p>That User-Agent string is for IE7.  You may wish to change that to <a href="http://www.useragentstring.com/pages/useragentstring.php">another common browser</a>, or add a &#8220;Fuck you, dickheads&#8221; to it, but as long as it doesn&#8217;t say &#8220;PLAYSTATION 3&#8243; then you should be fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://throwachair.com/2009/09/21/how-to-watch-hulu-in-the-playstation-3-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to forward all ports to a &#8216;dmz&#8217; with Shorewall</title>
		<link>http://throwachair.com/2009/08/15/how-to-forward-all-ports-to-a-dmz-with-shorewall/</link>
		<comments>http://throwachair.com/2009/08/15/how-to-forward-all-ports-to-a-dmz-with-shorewall/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 05:02:09 +0000</pubDate>
		<dc:creator>xtravar</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://throwachair.com/?p=42</guid>
		<description><![CDATA[Open up /etc/shorewall/rules in your favorite text editor (nano) as root.  Add this line (and replace 192.168.0.2 with your &#8216;DMZ&#8217; computer): DNAT            net             loc:192.168.0.2 all The confusion stems from the fact that most consumer-grade hardware routers consider the DMZ to be &#8220;the place where I forward everything.&#8221;  Drove me nuts trying to figure this out, [...]]]></description>
			<content:encoded><![CDATA[<p>Open up /etc/shorewall/rules in your favorite text editor (nano) as root.  Add this line (and replace 192.168.0.2 with your &#8216;DMZ&#8217; computer):</p>
<blockquote><p><code>DNAT            net             loc:192.168.0.2 all</code></p></blockquote>
<p>The confusion stems from the fact that most consumer-grade hardware routers consider the DMZ to be &#8220;the place where I forward everything.&#8221;  Drove me nuts trying to figure this out, so hopefully this will help you.<br />
Of course, to guarantee that your computer has that IP address when using DHCP, you must add to /etc/dhcp.conf the following:</p>
<blockquote><p><code>host <strong>hostname</strong> {<br />
&nbsp;&nbsp;&nbsp;&nbsp;hardware ethernet <strong>[MAC address] </strong>;<br />
&nbsp;&nbsp;&nbsp;&nbsp;fixed-address <strong>192.168.0.2</strong>;<br />
}</code></p></blockquote>
<p>Disclaimer: All I know about Shorewall and networking are enough to get me by.</p>
<p>My file server/router is almost complete!</p>
]]></content:encoded>
			<wfw:commentRss>http://throwachair.com/2009/08/15/how-to-forward-all-ports-to-a-dmz-with-shorewall/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On gnome-panel, nvidia twinview, spanning, and multiple screens</title>
		<link>http://throwachair.com/2009/05/03/on-gnome-panel-nvidia-twinview-spanning-and-multiple-screens/</link>
		<comments>http://throwachair.com/2009/05/03/on-gnome-panel-nvidia-twinview-spanning-and-multiple-screens/#comments</comments>
		<pubDate>Sun, 03 May 2009 17:31:25 +0000</pubDate>
		<dc:creator>xtravar</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://throwachair.com/?p=39</guid>
		<description><![CDATA[If you found this post with a search for those particular keywords, this post may help you figure out what you&#8217;re trying to achieve, regardless of what I was trying to achieve, so I wouldn&#8217;t automatically dismiss this after I describe my setup. Here is my configuration: Mandriva Linux x86-64 Gnome desktop Two similar nVidia [...]]]></description>
			<content:encoded><![CDATA[<p>If you found this post with a search for those particular keywords, this post may help you figure out what you&#8217;re trying to achieve, <strong>regardless of what I was trying to achieve</strong>, so I wouldn&#8217;t automatically dismiss this after I describe my setup.</p>
<p>Here is my configuration:</p>
<ul>
<li>Mandriva Linux x86-64</li>
<li>Gnome desktop</li>
<li>Two similar nVidia cards with two DVI ports on each: 4 total DVI ports</li>
<li>Two LCD panels of similar dimensions and a LCD TV: 3 total displays</li>
</ul>
<p>Here is what I wanted to achieve:</p>
<ol>
<li>All displays working at same time, but not necessarily as one large display (no Xinerama necessary)</li>
<li>Compiz graphics (no Xinerama)</li>
<li>gnome-panel spanning one display</li>
</ol>
<p>Now, from a clean install of Mandriva, all I need to do is run nvidia-settings, turn on TwinView for my two matching panels, and everything is perfect&#8230; except for the TV.  If I attempt to enable the TV as a separate X screen, point #3 fails.  It doesn&#8217;t make any damn sense, but that&#8217;s what happens.  Applications sometimes still maximize to separate monitors (and sometimes don&#8217;t depending on my configuration &#8211; a lot of this is black magic to me).</p>
<p>It turns out that libgdk determines how things maximize and such.  Each display has a number of screens, and each screen has a number of monitors.  The maximization/panel logic apparently goes off of the monitors.</p>
<p>So what I did is I downloaded the gtk+ source RPM, dug around, and found the init_multihead function.  With a little fooling around, I now have hacked the code to look like this:</p>
<blockquote><p>if(screen_x11-&gt;screen_num == 0)<br />
{<br />
screen_x11-&gt;n_monitors = 2;<br />
int nWidth = WidthOfScreen(screen_x11-&gt;xscreen) / 2;<br />
screen_x11-&gt;monitors = g_new0(GdkX11Monitor, 2);<br />
init_monitor_geometry (&amp;screen_x11-&gt;monitors[0], 0, 0,<br />
nWidth,<br />
HeightOfScreen (screen_x11-&gt;xscreen));<br />
init_monitor_geometry (&amp;screen_x11-&gt;monitors[1], nWidth, 0,<br />
nWidth,<br />
HeightOfScreen (screen_x11-&gt;xscreen));<br />
}<br />
else<br />
{<br />
/* No multihead support of any kind for this screen */<br />
screen_x11-&gt;n_monitors = 1;<br />
screen_x11-&gt;monitors = g_new0 (GdkX11Monitor, 1);</p>
<p>init_monitor_geometry (screen_x11-&gt;monitors, 0, 0,<br />
WidthOfScreen (screen_x11-&gt;xscreen),<br />
HeightOfScreen (screen_x11-&gt;xscreen));<br />
}</p></blockquote>
<p>That&#8217;s pretty much it. Keep in mind that you need a few dependencies to build GTK, so install the corresponding -devel RPMs.  If you&#8217;re not using an RPM-based distro, you probably know how to patch stuff already.  I didn&#8217;t bother building a new RPM, I simply ran <strong>./configure &#8211;prefix=/usr</strong> and then <strong>make</strong>, and replaced the original one after making a backup.</p>
<p>A three-monitor TwinView setup will work fine (for GTK apps, at least).  To run stuff on the other display, use <strong>gnome-terminal &#8211;display=:0.1</strong> or run <strong>export DISPLAY=:0.1</strong> before running your app.  Now I can watch TV without restarting X, hooray!</p>
]]></content:encoded>
			<wfw:commentRss>http://throwachair.com/2009/05/03/on-gnome-panel-nvidia-twinview-spanning-and-multiple-screens/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Of Visual Studio, Device Projects, Resources, and MSBuild</title>
		<link>http://throwachair.com/2008/10/09/of-visual-studio-device-projects-resources-and-msbuild/</link>
		<comments>http://throwachair.com/2008/10/09/of-visual-studio-device-projects-resources-and-msbuild/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 21:14:32 +0000</pubDate>
		<dc:creator>xtravar</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://throwachair.com/?p=30</guid>
		<description><![CDATA[Quite a title, isn&#8217;t it?  This post is going to help a lot of frustrated Pocket PC developers out there!  Note: Everything I document here is probably good for CF 2.0 and 3.5.  I&#8217;m using 3.5 so keep your eyes open. By default, Compact Framework Pocket PC Application Projects (.exe) compile in a hi-resolution resource [...]]]></description>
			<content:encoded><![CDATA[<p>Quite a title, isn&#8217;t it?  This post is going to help a lot of frustrated Pocket PC developers out there!  <strong>Note: Everything I document here is probably good for CF 2.0 and 3.5.  I&#8217;m using 3.5 so keep your eyes open.</strong></p>
<p>By default, Compact Framework Pocket PC Application Projects (.exe) compile in a hi-resolution resource that either enables or disables proper scaling.  I haven&#8217;t figured that piece out, and I don&#8217;t really care because I had to make my application hi-res aware anyway when I was trying to figure this piece out.</p>
<p>Now, this is fine and dandy and transparent until you want to compile in important resources such as, oh, the File Version that you would see on the Version tab in the file&#8217;s properties (Right Click -&gt; Properties).</p>
<p>For most CF applications, this is not a problem.  The AssemblyVersion attribute will still be placed inside the binary and usable once you load the binary.  However, let us not forget that the Compact Framework doesn&#8217;t allow us to unload a binary (<a href="http://throwachair.com/2008/06/27/unloading-assemblies-in-net-hint-you-cant/" target="_self">and the Desktop Framework <em>barely</em> allows that</a>).</p>
<p>So what is a Pocket PC / SmartPhone developer supposed to do?  We want to check the binary&#8217;s version, but we can&#8217;t!</p>
<p><a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1886991&amp;SiteID=1" target="_self">Some have found solutions</a>.  But they either involve 1. compiling in new resources manually or 2. changing your PlatformFamilyName to WindowsCE.  This can be done within the project manually by opening your project and replacing:</p>
<blockquote><p>&lt;PlatformFamilyName&gt;PocketPC&lt;/PlatformName&gt;</p></blockquote>
<p>With:</p>
<blockquote><p>&lt;PlatformFamilyName&gt;WindowsCE&lt;/PlatformName&gt;</p></blockquote>
<p>Which is jolly good until you get these ridiculous warnings:</p>
<blockquote><p>warning VSD102: The type Microsoft.WindowsCE.Forms.HardwareButton is not supported in this platform.<br />
warning VSD102: The type Microsoft.WindowsCE.Forms.Notification is not supported in this platform.</p></blockquote>
<p>Then, as an intelligent developer, you do what comes naturally: you try to suppress those warnings.  Except you can&#8217;t!  /nowarn does not work with VSD102!  It only works with CS-prefixed warnings!</p>
<p>Oh noes!</p>
<p>Well, lucky for you, I&#8217;ve been dicking around with the failure that is MSBuild all day.  I also <a href="http://blogs.msdn.com/vsdteam/" target="_self">found this page that details a lot of retardedness</a> going on at the Visual Studio For Devices team.  It mentions this &#8220;platform verification&#8221; nonsense and says that the way to stop it is to <strong>manually edit</strong> %windir%\Microsoft.NET\Framework\[version]\Microsoft.CompactFramework.Common.Targets.</p>
<p><strong>&#8220;NO!&#8221; I say.  That will not do.  I&#8217;m using a compile server that I don&#8217;t have control of.  And NO I will not reproduce your stupid targets file.</strong></p>
<p>A little digging around in that file, however, finds this little gem that had plagued me for a month when I was looking into hi-resolution stuff:</p>
<blockquote><p>&lt;PropertyGroup&gt;<br />
&lt;ShouldAddHighDPIResource Condition=&#8221;&#8216;$(TargetExt)_and_$(HighDPIResAware)_and_$(Win32Resource)&#8217;==&#8217;.exe_and_true_and_&#8217;&#8221;&gt;true&lt;/ShouldAddHighDPIResource&gt;<br />
&lt;ShouldAddHighDPIResource Condition=&#8221;&#8216;$(TargetExt)_and_$(HighDPIResAware)_and_$(Win32Resource)_and_$(PlatformFamilyName)&#8217;==&#8217;.exe_and__and__and_PocketPC&#8217;&#8221;&gt;true&lt;/ShouldAddHighDPIResource&gt;<br />
&lt;ShouldAddHighDPIResource Condition=&#8221;&#8216;$(TargetFrameworkVersion)&#8217;==&#8217;v1.0&#8242;&#8221;&gt;false&lt;/ShouldAddHighDPIResource&gt;<br />
&lt;/PropertyGroup&gt;</p>
<p>&lt;Target<br />
Name=&#8221;AddHighDPIResource&#8221; Condition=&#8221;&#8216;$(ShouldAddHighDPIResource)&#8217;==&#8217;true&#8217;&#8221;&gt;<br />
&lt;AddHighDPIResource<br />
Win32Resource=&#8221;$(Win32Resource)&#8221;<br />
ApplicationIcon=&#8221;$(ApplicationIcon)&#8221;<br />
OutputDirectory=&#8221;$(IntermediateOutputPath)&#8221;&gt;<br />
&lt;Output TaskParameter=&#8221;Win32Resource&#8221; PropertyName=&#8221;Win32Resource&#8221; /&gt;<br />
&lt;Output TaskParameter=&#8221;ApplicationIcon&#8221; PropertyName=&#8221;ApplicationIcon&#8221; /&gt;<br />
&lt;/AddHighDPIResource&gt;<br />
&lt;/Target&gt;</p></blockquote>
<p>Try googling <a href="http://www.google.com/search?q=HighDPIResAware" target="_self">HighDPIResAware</a>.  You don&#8217;t find anything except a plagiarized build script.  But this is the key to all of our problems.  All you have to do is set this property to <em>something</em>, <em>anything</em> in your project file and you are good to go.  No platform warnings, no changing platforms, no hi-resolution resource crap compiling in without your consent.</p>
<p>tl;dr:</p>
<blockquote><p>&lt;PropertyGroup&gt;<br />
&lt;HighDPIResAware&gt;1&lt;/HighDPIResAware&gt;<br />
&lt;/PropertyGroup&gt;</p></blockquote>
<p>Half of the important terms in this article were not indexed by Google, so I hope to have helped a the few Pocket PC developers still out there who care.  Because problems relating to this issue have probably used more of my time than any other .NET CF issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://throwachair.com/2008/10/09/of-visual-studio-device-projects-resources-and-msbuild/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Unloading Assemblies in .NET (Hint: YOU CAN&#8217;T)</title>
		<link>http://throwachair.com/2008/06/27/unloading-assemblies-in-net-hint-you-cant/</link>
		<comments>http://throwachair.com/2008/06/27/unloading-assemblies-in-net-hint-you-cant/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 06:25:06 +0000</pubDate>
		<dc:creator>xtravar</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://throwachair.com/?p=28</guid>
		<description><![CDATA[C# is a wonderful language.  It is my favorite.  You can do all sorts of cool things in it.  Except unload a motherfucking DLL. Microsoft and all of their shills say that you can.  But you have to do it the &#8220;safe&#8221; way.  You see &#8211; once an Assembly is loaded into your AppDomain, it [...]]]></description>
			<content:encoded><![CDATA[<p>C# is a wonderful language.  It is my favorite.  You can do all sorts of cool things in it.  Except unload a motherfucking DLL.</p>
<p>Microsoft and all of their shills say that you can.  But you have to do it the &#8220;safe&#8221; way.  You see &#8211; once an Assembly is loaded into your AppDomain, it can never be unloaded.  They recommend this solution: <strong>load Assembly into NEW AppDomain and unload THAT AppDomain when you are finished with the Assembly.</strong> Which would be fine if: 1. it worked seamlessly, 2. it performed reasonably, and 3. it were implemented on the Compact Framework.</p>
<p>You see, in order for two AppDomains to communicate, objects are marshalled back and forth using various proxies and byte copying mechanisms.  Some of this works transparently, a lot of it just plain sucks.  You can find a good example of it at this <a href="http://www.codeproject.com/KB/cs/dynamicpluginmanager.aspx">website.</a></p>
<p>The whole idea was concocted by assholes.  &#8220;Sandbox!! You must sandbox teh code and keep it separate and blah di blah blah untrusted blah safe blah blah references blah blah.&#8221;  Nothing like a little piss in the sandbox.  Actually, their real reasoning is <a href="http://blogs.msdn.com/jasonz/archive/2004/05/31/145105.aspx">this:</a></p>
<ol>
<li><em><span style="font-family: Tahoma;">First off, you are running that code in the app domain (duh!).  That means there are potentially call sites and call stacks with addresses in them that are expecting to keep working.  Have you ever gotten an access violation where your EIP points to 0x????????  That is an example where someone freed up a DLL, the pages got unmapped by the memory system, and then you tried to branch to it. [...]</span></em><span style="font-family: Verdana;"><span style="font-family: Tahoma;"> This tracking is handled today around an app domain boundary. <strong> Tracking it at the assembly level becomes quite expensive.</strong></span></span></li>
<li><em><span style="font-family: Tahoma;"> Say you did manage to track all handles and references to already running code by an assembly.  [...]</span></em><span style="font-family: Verdana;"><span style="font-family: Tahoma;">The JIT&#8217;d code is still allocated in the app domain loader heap [...] </span></span><span style="font-family: Verdana;"><span style="font-family: Tahoma;"><strong> So this one is solvable and just falls into the work column</strong> with a small hit on allocation and jitted method locality (probably not enough to measure).</span></span></li>
<li><span style="font-family: Tahoma;"><em> The final issue relates to code which has been loaded shared, otherwise more formally know as &#8220;domain neutral&#8221;  [...] </em></span><span style="font-family: Verdana;"><span style="font-family: Tahoma;">On the other hand, the code must therefore be tracked in all app domains it has ever been loaded into before it can be freed.  <strong>With the current v1.0 and v1.1 product it is not even possible to unload domain neutral code because of these restrictions.</strong></span></span></li>
</ol>
<p>In other words:</p>
<ol>
<li>We&#8217;re too fucking lazy to figure out an efficient way to produce a killer feature.</li>
<li>We&#8217;re too fucking lazy to actually do our job.</li>
<li>We&#8217;re too fucking lazy to enhance our product.</li>
</ol>
<p>Seriously, this has been a problem for 5 years now.  It was easy as shit in C and C++ to write a plugin infrastructure &#8211; but now, because we have to be &#8216;safe&#8217; we can&#8217;t do this?  For fucksake, I&#8217;ll mark my code as unsafe if I could just do this.  This is a step backward!  Modern programming languages have been able to handle plugins forever, but some genius decided to unnecessarily complicate things with AppDomain communication.</p>
<p>Go die and kill yourself, you silly fucks.</p>
]]></content:encoded>
			<wfw:commentRss>http://throwachair.com/2008/06/27/unloading-assemblies-in-net-hint-you-cant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

