<?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>Logan Buesching</title>
	<atom:link href="http://agoln.net/feed" rel="self" type="application/rss+xml" />
	<link>http://agoln.net</link>
	<description>Development and personal site</description>
	<lastBuildDate>Thu, 09 Sep 2010 21:01:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Arthroscopic Knee Surgery&#8211;Torn Meniscus</title>
		<link>http://agoln.net/archives/239</link>
		<comments>http://agoln.net/archives/239#comments</comments>
		<pubDate>Thu, 09 Sep 2010 21:01:37 +0000</pubDate>
		<dc:creator>Logan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://agoln.net/archives/239</guid>
		<description><![CDATA[A few months ago during a charity dodgeball event I ended up tearing my meniscus.&#160; At the time, I didn’t know what happened – I went to the ER and the ER doc gave me some crutches and let me go on my merry way.&#160; Fast forward a couple of months later and the knee [...]]]></description>
			<content:encoded><![CDATA[<p>A few months ago during a charity dodgeball event I ended up tearing my meniscus.&#160; At the time, I didn’t know what happened – I went to the ER and the ER doc gave me some crutches and let me go on my merry way.&#160; Fast forward a couple of months later and the knee still hurt, so I went and saw Dr. Cannon, an orthopedic in the Seattle area.</p>
<p>Dr. Cannon and I decided to get an MRI, and after looking at the MRI, he had determined that I tore my meniscus, and I needed surgery.</p>
<h2>Surgery</h2>
<p>I had the surgery done at the PolyClinic, and it was very straightforward.&#160; Everyone there was extremely pleasant and great to work with.&#160; Every employee there was helpful.&#160; When I awoke, I was informed that they were not able to repair the meniscus, and they had to take out quite a large chunk (2/3rd’s).&#160; After the surgery, I was pretty able to walk around that same day, although I did use a crutch to help keep weight off of it.&#160; Even today, two days after the surgery, the knee is a little stiff, but overall it doesn’t hurt to walk around on it.&#160; I’m supposed to keep bandages on the leg until tomorrow, maybe I’ll have some good pictures of it then.</p>
<h2>Follow Up</h2>
<p>I have a follow up appointment on Wednesday, so we’ll see what the Doc has to say.&#160; Hopefully it will all be good news, and I can do snowboarding this year!</p>
]]></content:encoded>
			<wfw:commentRss>http://agoln.net/archives/239/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Personal Updates</title>
		<link>http://agoln.net/archives/235</link>
		<comments>http://agoln.net/archives/235#comments</comments>
		<pubDate>Tue, 24 Aug 2010 03:45:38 +0000</pubDate>
		<dc:creator>Logan</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://agoln.net/?p=235</guid>
		<description><![CDATA[Quite a bit has changed in the 10 months since I’ve updated my blog.&#160; I thought I’d update it with the latest and greatest happenings. Windows Live Wave 4 Windows Live Wave 4 has been a major release with a lot of effort put in from a lot of teams.&#160; My main feature has been [...]]]></description>
			<content:encoded><![CDATA[<p>Quite a bit has changed in the 10 months since I’ve updated my blog.&#160; I thought I’d update it with the latest and greatest happenings.</p>
<h2>Windows Live Wave 4</h2>
<p>Windows Live Wave 4 has been a major release with a lot of effort put in from a lot of teams.&#160; My main feature has been working on the “Startup Experience” (SE).&#160; The SE onboards new and existing users to some of the new features of Wave 4.&#160; Two of the main scenarios are the ability to take a photo, and add a service.</p>
<h4>Take a photo</h4>
<h4><a href="http://agoln.net/wp-content/uploads/2010/08/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://agoln.net/wp-content/uploads/2010/08/image_thumb.png" width="244" height="202" /></a></h4>
<p>You can take a photo and update your profile.</p>
<h4>Add a service</h4>
<p><a href="http://agoln.net/wp-content/uploads/2010/08/image1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://agoln.net/wp-content/uploads/2010/08/image_thumb1.png" width="244" height="203" /></a>    <br />Add MySpace to your profile.</p>
<h3></h3>
<h2></h2>
<h2>Promotion</h2>
<p>During this review period, I was also given a promotion, and a new title – “Software Development Engineer II”.&#160; All of the hard work and dedication over the past year has paid off.&#160; Along with the promotion, it means that bigger and better opportunities are available.&#160; I’m excited for many of the ideas for Wave 5 and look forward to what comes next!</p>
<h2>Moving</h2>
<p>Recently I moved out of Belltown to Wallingford.&#160; The old apartment was a 2BR, 1BA while the new apartment is 4BR, 3BA (moved in with two others).&#160; So far the new house is very spacious, clean, and our neighbors are fantastic!</p>
<h2>Knee Injury</h2>
<p>I injured my knee playing dodgeball around May, and just recently found out that I tore my meniscus.&#160; Because of this tear, my doctor recommended I get surgery, which is scheduled for 9/7/10.&#160; I’ll keep the blog updated in how that goes.</p>
]]></content:encoded>
			<wfw:commentRss>http://agoln.net/archives/235/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zune Error C00d2767, DRM &amp; Debuggers</title>
		<link>http://agoln.net/archives/225</link>
		<comments>http://agoln.net/archives/225#comments</comments>
		<pubDate>Tue, 27 Oct 2009 20:00:10 +0000</pubDate>
		<dc:creator>Logan</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://agoln.net/archives/225</guid>
		<description><![CDATA[After installing an unsigned kernel driver, I noticed that I got an error with playing DRM content on my Zune.&#160; After some digging, I found: http://blogs.technet.com/askperf/archive/2009/02/24/windows-7-zune-and-the-case-of-the-mysterious-debugger.aspx It took awhile as when I was searching for Zune C00d2767, nothing came up, but hopefully somebody somewhere will find this useful.]]></description>
			<content:encoded><![CDATA[<p>After installing an unsigned kernel driver, I noticed that I got an error with playing DRM content on my Zune.&#160; After some digging, I found:</p>
<p><a title="http://blogs.technet.com/askperf/archive/2009/02/24/windows-7-zune-and-the-case-of-the-mysterious-debugger.aspx" href="http://blogs.technet.com/askperf/archive/2009/02/24/windows-7-zune-and-the-case-of-the-mysterious-debugger.aspx">http://blogs.technet.com/askperf/archive/2009/02/24/windows-7-zune-and-the-case-of-the-mysterious-debugger.aspx</a></p>
<p>It took awhile as when I was searching for Zune C00d2767, nothing came up, but hopefully somebody somewhere will find this useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://agoln.net/archives/225/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resource Hacker Can&#8217;t Export Binary Resources</title>
		<link>http://agoln.net/archives/223</link>
		<comments>http://agoln.net/archives/223#comments</comments>
		<pubDate>Fri, 28 Aug 2009 01:06:00 +0000</pubDate>
		<dc:creator>Logan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://agoln.net/archives/223</guid>
		<description><![CDATA[So I came across a rather interesting problem today.&#160; Basically, I need to embed a Microsoft Cabinet file into an executable.&#160; This is done in an automated type of way, so in order to verify that it got embedded correctly, I used Resource Hacker to open the EXE, and export the resource.&#160; Looking at what [...]]]></description>
			<content:encoded><![CDATA[<p>So I came across a rather interesting problem today.&#160; Basically, I need to embed a <a href="http://en.wikipedia.org/wiki/Cabinet_(file_format)">Microsoft Cabinet</a> file into an executable.&#160; This is done in an automated type of way, so in order to verify that it got embedded correctly, I used <a href="http://angusj.com/resourcehacker/">Resource Hacker</a> to open the EXE, and export the resource.&#160; Looking at what Resource Hacker spit out seems like it got embedded OK. </p>
<p><a href="http://agoln.net/wp-content/uploads/2009/08/reshacker1.png"><img style="border-bottom: 0px; border-left: 0px; margin: 0px; display: inline; border-top: 0px; border-right: 0px" title="ResHacker-1" border="0" alt="ResHacker-1" src="http://agoln.net/wp-content/uploads/2009/08/reshacker1-thumb.png" width="471" height="57" /></a>&#160;&#160; </p>
<p>I then exported the resource to disk to ensure that the cabinet archive contained the file I embedded into it.&#160; When I went to open the .cab file, it didn&#8217;t seem to have any entries in it, and WinRar gave an error when trying to open the file.&#160; Weird, I thought.&#160; So, for fun, I opened the file in Notepad to only notice that it <em>literally</em> saved the text as it was shown in the hex editor.&#160; </p>
<p>&#160;<a href="http://agoln.net/wp-content/uploads/2009/08/reshacker2.png"><img style="border-bottom: 0px; border-left: 0px; margin: 0px; display: inline; border-top: 0px; border-right: 0px" title="ResHacker-2" border="0" alt="ResHacker-2" src="http://agoln.net/wp-content/uploads/2009/08/reshacker2-thumb.png" width="458" height="118" /></a></p>
<p>What a weird bug!</p>
<p>I ended up opening the exe in VS2008, exporting the resource from there and verifying it.&#160; Here is what opening it in notepad looks like.</p>
<p><a href="http://agoln.net/wp-content/uploads/2009/08/reshacker3.png"><img style="border-bottom: 0px; border-left: 0px; margin: 0px; display: inline; border-top: 0px; border-right: 0px" title="ResHacker-3" border="0" alt="ResHacker-3" src="http://agoln.net/wp-content/uploads/2009/08/reshacker3-thumb.png" width="454" height="160" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://agoln.net/archives/223/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable Hyper-V in HP xw4600</title>
		<link>http://agoln.net/archives/212</link>
		<comments>http://agoln.net/archives/212#comments</comments>
		<pubDate>Mon, 03 Aug 2009 20:26:55 +0000</pubDate>
		<dc:creator>Logan</dc:creator>
				<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://agoln.net/?p=212</guid>
		<description><![CDATA[When attempting to run a virtual machine using Hyper-V on an HP xw4600, if you get the following message &#8220;Hypervisor is not running&#8221;, then hardware-assisted virtualization is probably not enabled. The way to enable it is to go to: BIOS Menu (f10 on boot) Security->System Security Data Execution Prevention (Enabled) Virtualization Technology (VTx) (Enabled)]]></description>
			<content:encoded><![CDATA[<p>When attempting to run a virtual machine using Hyper-V on an HP xw4600, if you get the following message &#8220;Hypervisor is not running&#8221;, then hardware-assisted virtualization is probably not enabled.  </p>
<p>The way to enable it is to go to:<br />
BIOS Menu (f10 on boot)<br />
Security->System Security<br />
Data Execution Prevention (Enabled)<br />
Virtualization Technology (VTx) (Enabled)</p>
]]></content:encoded>
			<wfw:commentRss>http://agoln.net/archives/212/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing SQL Server 2008 Express Edition</title>
		<link>http://agoln.net/archives/211</link>
		<comments>http://agoln.net/archives/211#comments</comments>
		<pubDate>Tue, 05 May 2009 06:34:00 +0000</pubDate>
		<dc:creator>Logan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://agoln.net/archives/211</guid>
		<description><![CDATA[I have been wanting to get back into developing my big project I did in my college years, which was basically a LAMP application.&#160; This time, I wanted to set it up as a WIMP environment (har har harrrr, wimp).&#160; All went pretty well until I tried to install SQL Server 2008 Express Edition. Prerequisites [...]]]></description>
			<content:encoded><![CDATA[<p>I have been wanting to get back into developing my big project I did in my college years, which was basically a LAMP application.&#160; This time, I wanted to set it up as a WIMP environment (har har harrrr, wimp).&#160; All went pretty well until I tried to install SQL Server 2008 Express Edition.</p>
<h2>Prerequisites</h2>
<p>When I started the installation, I was informed that I needed .net 3.5 SP1.&#160; So I went and got it, rebooted my machine, then re-ran the installation.&#160; Then I was told I needed Windows Installer 4.5.&#160; Once again, I got the installation, rebooted, and started the installation.&#160; A third time, during the installation, I was notified that I needed PowerShell!&#160; Although the UI for showing me I needed PowerShell was much nicer, it was extremely annoying to have to run the installer three times and reboot my machine twice before I finally had all of the prerequisites.</p>
<h2>Installing</h2>
<p>My machine is running out of space on my C:\ drive, so I wanted to install on my D:\ drive.&#160; So I change the drive and find the following errors:</p>
<p>&#160;<a href="http://agoln.net/wp-content/uploads/2009/05/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://agoln.net/wp-content/uploads/2009/05/image-thumb.png" width="423" height="102" /></a> <a href="http://agoln.net/wp-content/uploads/2009/05/image1.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://agoln.net/wp-content/uploads/2009/05/image-thumb1.png" width="425" height="102" /></a></p>
<p>&#160;</p>
<p>What the hell are these errors? I mean, I realize that when I told the installer to create a directory it may not have the attributes the installer wants, but can’t the installer set those attributes?&#160; And INSTANCESHAREDWOWDIR? Wow, that’s an ambiguous error.&#160; So I decide to bite the bullet and install in the default directory.&#160; I cancel out and low and behold!</p>
<p><a href="http://agoln.net/wp-content/uploads/2009/05/image2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://agoln.net/wp-content/uploads/2009/05/image-thumb2.png" width="415" height="315" /></a> </p>
<p>The installation link has become disabled!&#160; So now I have to close the entire installer and reopen it, how fun!&#160; But wait, there’s more!&#160; When I attempt to reopen the installer, I get another friendly error!</p>
</p>
</p>
<p><a href="http://agoln.net/wp-content/uploads/2009/05/image3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://agoln.net/wp-content/uploads/2009/05/image-thumb3.png" width="398" height="163" /></a>&#160;</p>
<p>I assume it has something to do with the eight setup processes that are running, consuming over 250MB of RAM</p>
<p><a href="http://agoln.net/wp-content/uploads/2009/05/image4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://agoln.net/wp-content/uploads/2009/05/image-thumb4.png" width="410" height="102" /></a> </p>
<p>I finally get to run the installer, I give up and let it try to install on the C:\ drive, so finally I am at “Server Configuration” where I am told to enter my service accounts.&#160; Again, I get another error</p>
</p>
<p><a href="http://agoln.net/wp-content/uploads/2009/05/image5.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://agoln.net/wp-content/uploads/2009/05/image-thumb5.png" width="389" height="92" /></a> </p>
<p>For some reason it says I have invalid credentials, but let’s take a look at the install window. (My emphasis highlighted in the below picture)</p>
<p><a href="http://agoln.net/wp-content/uploads/2009/05/image6.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://agoln.net/wp-content/uploads/2009/05/image-thumb6.png" width="412" height="312" /></a> </p>
<p>Very nicely done SQL Server 2008.&#160; Tell me to click help for more information… <strong>WHEN THERE IS NO HELP LINK</strong>.&#160; Apparently I had to set up the account in the upper dialog, and not the lower one.</p>
<p>So now I’m just one step away from “ready to install”.&#160; My nightmare will be over!&#160; And guess what happens? You guessed it, ANOTHER ERROR!</p>
<p><a href="http://agoln.net/wp-content/uploads/2009/05/image7.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://agoln.net/wp-content/uploads/2009/05/image-thumb7.png" width="400" height="181" /></a> </p>
<p>Apparently, there was another prerequisite that I needed to install that it failed to tell me about!</p>
<p>In the end, I just ended up installing <a href="http://mysql.com/">MySQL</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://agoln.net/archives/211/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IHTMLDocument2 hyperlinks open in new window</title>
		<link>http://agoln.net/archives/193</link>
		<comments>http://agoln.net/archives/193#comments</comments>
		<pubDate>Thu, 30 Apr 2009 03:06:04 +0000</pubDate>
		<dc:creator>Logan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://agoln.net/archives/193</guid>
		<description><![CDATA[I spent (most) of the day at work today trying to figure out why my IHTMLDocument2&#8242;s hyperlinks were opening in new windows, instead of the current window it was in. Finally, I stumbled upon this: Resolving Hyperlinks. By the time anyone reads this, MSDN will probably have changed the link structure, so I&#8217;ll also explain [...]]]></description>
			<content:encoded><![CDATA[<p>I spent (most) of the day at work today trying to figure out why my IHTMLDocument2&#8242;s hyperlinks were opening in new windows, instead of the current window it was in.  Finally, I stumbled upon this:<br />
<a href="http://msdn.microsoft.com/en-us/library/bb508516(VS.85).aspx#Resolving_Hyperlinks">Resolving Hyperlinks</a>.</p>
<p>By the time anyone reads this, MSDN will probably have changed the link structure, so I&#8217;ll also explain it here:<br />
<quote>If a user clicks a link within an HTML page viewed in MSHTML, MSHTML calls the HlinkNavigate function (after implementing an IHlink interface). If the host does not implement IHlinkFrame, this function launches a separate application to follow the hyperlink.</quote></p>
<p>Wow, that was frustrating!</p>
]]></content:encoded>
			<wfw:commentRss>http://agoln.net/archives/193/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cannot Remove Groups Background Picture</title>
		<link>http://agoln.net/archives/190</link>
		<comments>http://agoln.net/archives/190#comments</comments>
		<pubDate>Thu, 29 Jan 2009 00:41:40 +0000</pubDate>
		<dc:creator>Logan</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://agoln.net/archives/190</guid>
		<description><![CDATA[A work-around to a bug in Windows Live Messenger 2009 was recently brought to my attention.&#160; If somehow the background picture in your Groups conversation window has changed, and you want it to be removed, here’s how. 1. Open the Background picker in the 1:1 conversation window 2. Click &#34;Show all&#8230;&#34; &#160; 3. Select the [...]]]></description>
			<content:encoded><![CDATA[<p>A work-around to a bug in Windows Live Messenger 2009 was recently brought to my attention.&#160; If somehow the background picture in your Groups conversation window has changed, and you want it to be removed, here’s how.</p>
<p>1. Open the Background picker in the 1:1 conversation window    <br />2. Click &quot;Show all&#8230;&quot;    <br /><a href="http://agoln.net/wp-content/uploads/2009/01/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://agoln.net/wp-content/uploads/2009/01/image-thumb.png" width="369" height="229" /></a>&#160; <br />3. Select the blank background    <br />4. Click the &quot;Set default&quot; button</p>
<p><a href="http://agoln.net/wp-content/uploads/2009/01/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://agoln.net/wp-content/uploads/2009/01/image-thumb1.png" width="378" height="154" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://agoln.net/archives/190/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Be scared of doing arithmetic</title>
		<link>http://agoln.net/archives/183</link>
		<comments>http://agoln.net/archives/183#comments</comments>
		<pubDate>Tue, 13 Jan 2009 00:40:46 +0000</pubDate>
		<dc:creator>Logan</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://agoln.net/archives/183</guid>
		<description><![CDATA[Without a doubt, reading Secure Coding in C and C++ made me quite scared of coding securely.&#160; In particular, all the ways you can mess up integer security.&#160; Ever since I had read that book, it has given me a whole new perspective on things to look out for and security problems that can arise.&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Without a doubt, reading <a title="Secure Coding in C and C++" href="http://www.cert.org/books/secure-coding/moreinfo.html">Secure Coding in C and C++</a> made me quite scared of coding securely.&#160; In particular, all the ways you can mess up <a title="Chapter 5. Integer Security" href="http://www.informit.com/content/images/0321335724/samplechapter/seacord_ch05.pdf">integer security</a>.&#160; Ever since I had read that book, it has given me a whole new perspective on things to look out for and security problems that can arise.&#160; Lets take a look at what’s going to be a future interview question I’m going to ask people.
</p>
<pre>
// Returns true if set, false if not set
bool ToDecimal(char* string, unsigned long* pdw)
{
    char* end = NULL;
    unsigned long dw = <a title="Returns signed long" href="http://msdn.microsoft.com/en-us/library/w4z2wdyc.aspx">strtol</a>(string, &amp;end, 10);
    if ( dw == LONG_MAX || dw == LONG_MIN
     || (dw == 0 &amp;&amp; wzEnd=string) )
    {
        return false;
    }
    *pdw = dw;
    return true;
}</pre>
</p>
<p>Find the bug!</p>
<p>So what’s wrong with this code? Hint: many things are wrong (which is why I like it), but I’m speaking of what’s relevant to my post. Well, <a title="Returns signed long" href="http://msdn.microsoft.com/en-us/library/w4z2wdyc.aspx">strtol</a> happens to return a signed integer, not an unsigned integer.&#160; What happens if –1 is passed in?&#160; Well, strtol will return –1 (and on most machines it’s represented as 0xffffffff).&#160; The compiler will then stick it into the unsigned long and away they go!</p>
</p>
<pre>int main()
{
    //Sploits!
    unsigned long age = 25;
    unsigned long brosAge = 0;
    char* theInput = &quot;-1000&quot; //Nasty input
    if (ToDecimal(theInput, &amp;brosAge))
    {
        printf(&quot;My age + my brothers age = %d&quot;,
		(age+brosAge)); //4294966320
    }
}</pre>
<p>In my theoretical program, it’s hardly a problem, but what happens if I reserved a buffer, was doing pointer arithmetic, or something else that could cause serious damage?&#160; This could have just become an entry point into a security hole.&#160; So please, check your signs!</p>
]]></content:encoded>
			<wfw:commentRss>http://agoln.net/archives/183/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>An Overview of the Windows Live Installer</title>
		<link>http://agoln.net/archives/130</link>
		<comments>http://agoln.net/archives/130#comments</comments>
		<pubDate>Thu, 08 Jan 2009 06:51:07 +0000</pubDate>
		<dc:creator>Logan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://agoln.net/?p=130</guid>
		<description><![CDATA[Over the past six months, I have been working on the Windows Live Installer, and I thought some readers of my blog would like to know some of the technical details that are involved in creating our installer. View Full Album Overview For those that use Linux, our installer is similar to a package manager. [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past six months, I have been working on the Windows Live Installer, and I thought some readers of my blog would like to know some of the technical details that are involved in creating our installer.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:66721397-FF69-4ca6-AEC4-17E6B3208830:dab2c8b5-b1d4-4289-b168-f691bfc68381" class="wlWriterEditableSmartContent"><a style="border:0px" href="http://cid-382c17ab51531387.skydrive.live.com/redir.aspx?page=browse&amp;resid=382C17AB51531387!214&amp;ct=photos"><img style="border:0px" alt="View Installer Photos" src="http://agoln.net/wp-content/uploads/2008/12/inlinerepresentationdb98f87ab22e44ba849df28186af7b05.jpg" /></a>
<div style="width:400px;text-align:right;" ><a href="http://cid-382c17ab51531387.skydrive.live.com/redir.aspx?page=browse&amp;resid=382C17AB51531387!214&amp;ct=photos">View Full Album</a></div>
</div>
<h2>Overview</h2>
<p>For those that use Linux, our installer is similar to a package manager. Each product team creates a package (usually installed via MSI), and a collection of packages is described in the catalog.</p>
<p style="padding-bottom: 0px">Some of the cooler features include the following: </p>
<ul style="margin-top: 0px; padding-top: 0px">
<li>Completely data driven by the catalog and configuration. </li>
<li>Full rule engine to exclude or include packages and products given a condition (os, service pack, specific software version installed, etc…) </li>
<li>Robust downloading of packages. </li>
<li>Transactional installation of packages and dependencies. </li>
<li>Reducing the number of reboot’s necessary. </li>
</ul>
<h2>Catalog, Configuration, and Rule Processing</h2>
<p>What I have worked on the most was the catalog, configuration and rule processing.&#160; When the installer starts up, the first thing that it does is process the catalog and determine which products are applicable for installation or upgrade.&#160; Rules are processed which determine weather or not a product can be installed.</p>
<p>Part of the catalog processing is to load the configuration.&#160; This was the first thing that I worked on when I started.&#160; If you look at the resources inside of the executable, you will notice items such as CONFIG0, CONFIG1, etc… Each of these configurations will be loaded at runtime in the order listed, with newer configuration files overriding the previous settings.&#160; This allows us to easily change some settings for different languages or builds, without having to change anything in the code.&#160; These may include reversing the text for right-to-left languages, choosing which products from the catalog to be displayed, or not having a checkbox checked by default due to privacy laws.</p>
<p>For the beta, users of Windows XP may see long startup times.&#160; This is due to one of the products needing to find out if a certain hotfix is installed.&#160; In order to check and see if these hotfixes are installed, we must make a <a href="http://msdn.microsoft.com/en-us/library/aa394582.aspx"><acronym title="Windows Management Instrumentation">WMI</acronym></a> query, which for some reason or another is very, very slow on certain machines.&#160; For the final release, the product was able to check for this information itself and we were able to remove the queries.</p>
<p>Part of our installer was to introduce a robust downloader that can download packages in the background and be resistant to network connectivity issues.&#160; We also wanted to make sure that if we have partially downloaded a product, we can resume from where we left off.&#160; Although the number of 56k users has dwindled in the US, there are still many people with slow connections, or pay per-kilobyte that we need to create a good user experience.</p>
<h2>Transactional Installation</h2>
<p>Part of the installation of the products includes a feature that allows us to install packages using transactions.&#160; In the past (and in early internal releases of the installer), if a user had cancelled the installation, then we could only rollback the current package that is being installed.&#160; So for Windows Live Messenger, if it installed a dependency and then started to install messenger, then the user cancelled it, we would only rollback the installation of messenger and leave the dependency.&#160; With our transactional installer, we are able to have the rollback chain go as many packages back as we need to for the transaction.&#160; This ensures that the user does not have incompatible dependencies after installation.</p>
<h2>Reboot Reduction</h2>
<p>Everybody hates to reboot their computer after installing a product.&#160; Unfortunately in a lot of cases and the current state of Windows, we must live with the fact that reboots are necessary.&#160; One of the items we worked on in this release was to reduce the number of people who needed to reboot their computer.&#160; Through closing certain applications while installing the Windows Live products, we are able to prevent reboot’s.</p>
<p>One major change to this feature between the beta and the final release was the UI associated with it.&#160; For the beta, the installer would check for files in use when the user selected the applications to install.&#160; This may have lead to a long pause where the user would believe that the applications was frozen.</p>
<p><a href="http://agoln.net/wp-content/uploads/2008/12/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Select Programs BETA" border="0" alt="Select Programs BETA" src="http://agoln.net/wp-content/uploads/2008/12/image-thumb.png" width="244" height="208" /></a>&#160;</p>
<p>After checking for files in use, the installer did not give the option for users to leave their applications open, it only showed a list of applications it was going to close.</p>
<p><a href="http://agoln.net/wp-content/uploads/2008/12/image1.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Files In Use BETA" border="0" alt="Files In Use BETA" src="http://agoln.net/wp-content/uploads/2008/12/image-thumb1.png" width="244" height="209" /></a>&#160;</p>
<p>For the final release, we implemented a progress bar while checking for files in use (with the option to skip the check), and allowed the user to manually close the applications which have files in use.</p>
</p>
</p>
</p>
<p><a href="http://agoln.net/wp-content/uploads/2008/12/image2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Files In Use RELEASE" border="0" alt="Files In Use RELEASE" src="http://agoln.net/wp-content/uploads/2008/12/image-thumb2.png" width="209" height="177" /></a> <a href="http://agoln.net/wp-content/uploads/2008/12/image3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Files In Use RELEASE" border="0" alt="Files In Use RELEASE" src="http://agoln.net/wp-content/uploads/2008/12/image-thumb3.png" width="208" height="177" /></a> </p>
<h2></h2>
</p>
<h2>Questions?</h2>
<p>That’s about all that I can think of to cover.&#160; What do you want to know about the installer? Any features you want to see implemented?</p>
]]></content:encoded>
			<wfw:commentRss>http://agoln.net/archives/130/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

