<?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>therning.org/ magnus &#187; windows</title>
	<atom:link href="http://therning.org/magnus/archives/tag/windows/feed" rel="self" type="application/rss+xml" />
	<link>http://therning.org/magnus</link>
	<description>Incoherent mumblings</description>
	<lastBuildDate>Mon, 09 Apr 2012 20:24:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Manual setup of Qt+Eclipse on Windows</title>
		<link>http://therning.org/magnus/archives/1023</link>
		<comments>http://therning.org/magnus/archives/1023#comments</comments>
		<pubDate>Mon, 09 Apr 2012 20:24:09 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=1023</guid>
		<description><![CDATA[Before the weekend I started looking at using Qt on Windows. More specifically I wanted to know whether this combination could be an option for a sub-project at work. We need to develop a program for the Windows desktop, and due to the overall context it would make sense to write it in C++ (that&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Before the weekend I started looking at using <a href="http://qt-project.org/">Qt</a> on Windows.  More specifically I wanted to know whether this combination could be an option for a sub-project at work.  We need to develop a program for the Windows desktop, and due to the overall context it would make sense to write it in C++ (that&#8217;s what we use for another part of the project).  We already use both Eclipse and Visual Studio in the project, but I strongly prefer Eclipse, so I was hoping to be able to use it.  However, it seems that the Qt developers strongly favour their own tool <a href="http://qt-project.org/wiki/Category:Tools::QtCreator">Qt Creator</a>, though there are (outdated?) integrators for both Eclipse and Visual Studio.  I&#8217;d rather avoid introducing a third IDE into a project&#8212;two is already one too many in my opinion.  Anyway, I think I managed to find an acceptable configuration of Eclipse <em>without</em> using that old <a href="http://qt.nokia.com/products/eclipse-integration/">Qt integration plugin</a> together with the MSVC (I was using the gratis version of MSVC for this).</p>

<h3>Qt setup</h3>

<p>I decided to install Qt into <code>C:\QtSDK</code>, and then I made the following permanent changes to the environment:</p>


<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;"><span style="color: #33cc33;">&gt;</span> <span style="color: #b1b100; font-weight: bold;">set</span> QTDIR=C:\QtSDK\Desktop\Qt\4.8.0\msvc2010
<span style="color: #33cc33;">&gt;</span> <span style="color: #b1b100; font-weight: bold;">set</span> QMAKESPEC=<span style="color: #33cc33;">%</span><span style="color: #448888;">QTDIR</span><span style="color: #33cc33;">%</span>\mkspecs\win32-msvc2010
<span style="color: #33cc33;">&gt;</span> <span style="color: #b1b100; font-weight: bold;">set</span> PATH=<span style="color: #33cc33;">%</span><span style="color: #448888;">PATH</span><span style="color: #33cc33;">%</span>;<span style="color: #33cc33;">%</span><span style="color: #448888;">QTDIR</span><span style="color: #33cc33;">%</span>\bin;C:\QtSDK\QtCreator\bin</pre></div></div>


<h3>Starting Eclipse so that it finds the compiler</h3>

<p>It&#8217;s slightly disappointing that Eclipse happily lets one create MSVC project that isn&#8217;t buildable because it doesn&#8217;t know where the compiler is located.  One easy way to remedy that seems to create a BAT file to create the proper environment for Eclipse:</p>


<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;"><span style="color: #66cc66;">@</span>echo <span style="color: #0080FF; font-weight: bold;">off</span>
setlocal
<span style="color: #800080;">call</span> <span style="color: #ff0000;">&quot;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat&quot;</span>
start C<span style="color: #FF1010; font-weight: bold;">:\Eclipse\Indigo\eclipse.exe</span>
endlocal</pre></div></div>


<h3>Creating the project</h3>

<p>Creating a &#8220;makefile&#8221; project in Eclipse is fairly straight forward; one needs a <em>C/C++ project</em>, of the <em>makefile</em> type, and make it empty too so that there isn&#8217;t any cruft in the way.  Then add a single source file, e.g. <code>main.cxx</code>:</p>


<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #339900;">#include &lt;iostream&gt;</span>
<span style="color: #339900;">#include &lt;Qt/QtGui&gt;</span>
&nbsp;
<span style="color: #0000ff;">int</span> main<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> argc, <span style="color: #0000ff;">char</span> <span style="color: #000040;">**</span>argv<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    std<span style="color: #008080;">::</span><span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> __FUNCTION__ <span style="color: #000080;">&lt;&lt;</span> std<span style="color: #008080;">::</span><span style="color: #007788;">endl</span><span style="color: #008080;">;</span>
    QApplication app<span style="color: #008000;">&#40;</span>argc, argv<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    <span style="color: #0000ff;">return</span><span style="color: #008000;">&#40;</span>app.<span style="color: #007788;">exec</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>


<p>And then a project file, e.g. <code>Test.pro</code>:</p>


<div class="wp_syntax"><div class="code"><pre class="make" style="font-family:monospace;">TEMPLATE <span style="color: #004400;">=</span> app
TARGET <span style="color: #004400;">=</span> 
DEPENDPATH <span style="color: #004400;">+=</span> <span style="color: #004400;">.</span>
INCLUDEPATH <span style="color: #004400;">+=</span> <span style="color: #004400;">.</span>
&nbsp;
CONFIG <span style="color: #004400;">+=</span> qt
&nbsp;
HEADERS <span style="color: #004400;">+=</span>
SOURCES <span style="color: #004400;">+=</span> main<span style="color: #004400;">.</span>cxx</pre></div></div>


<p>After this use <code>qmake</code> to create the required makefile.  I decided to use a subdirectory (<code>_build</code>) in the project, which <code>qmake</code> seems to have full support for:</p>


<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;"><span style="color: #33cc33;">&gt;</span> qmake ..\Test.pro</pre></div></div>


<h3>Setting up building from Eclipse</h3>

<p>In the project properties modify the <em>C/C++ Build</em> settings for the <em>Debug</em> target.  Instead of the default build command (which is <code>make</code>) one can use <code>nmake</code>, or even better <code>jom</code>:</p>

<ul>
<li>Build command: <code>C:/QtSDK/QTCreator/bin/jom -f Makefile.Debug</code></li>
<li>Build directory: <code>${workspace_loc:/Test}/_build</code></li>
</ul>

<p>Then one can create a <em>Release</em> target, which differs only in that it builds using <code>Makefile.Release</code>.</p>

<h3>Running <code>qmake</code> from inside Eclipse</h3>

<p>It&#8217;s very convenient to be able to run <code>qmake</code> and re-generate the makefiles from inside Eclipse.  One can set that up by adding an external tool:</p>

<ul>
<li>Location: <code>C:\QtSDK\Desktop\Qt\4.8.0\msvc2010\bin\qmake.exe</code></li>
<li>Working directory: <code>${workspace_loc:/Test}/_build</code></li>
<li>Arguments: <code>../Test.pro</code></li>
</ul>

<h3>In closing</h3>

<p>I plan to also have a look at the <a href="http://qt.nokia.com/products/developer-tools">Qt Visual Studio Add-in</a>, though I suspect we might be using the latest version of VS, which might cause trouble.</p>

<p>Suggestions for further integration with Eclipse would be most welcome, e.g. for forms and translations.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F1023&amp;title=Manual%20setup%20of%20Qt%2BEclipse%20on%20Windows" id="wpa2a_2">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/1023/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dealing with life in Haskell</title>
		<link>http://therning.org/magnus/archives/349</link>
		<comments>http://therning.org/magnus/archives/349#comments</comments>
		<pubDate>Thu, 01 May 2008 21:31:11 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[perforce]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=349</guid>
		<description><![CDATA[I bet you have at least one silly little thing at work that, whenever it happens, you let out a sigh, maybe roll your eyes and whish that everyone would use a proper operating system. A few days I finally decided to do something about one of my things like that. At work, Windows users [...]]]></description>
			<content:encoded><![CDATA[<p>I bet you have at least one silly little thing at work that, whenever it happens, you let out a sigh, maybe roll your eyes and whish that everyone would use a proper operating system.  A few days I finally decided to do something about one of my things like that.  At work, Windows users will at times for some strange reason, manually create directories inside their work area, even though the directories actually are under version control.  Invariably they get the case wrong and due to an onfortunate combination of case insensitive filesystem on the client (Windows) and a version control system the cares about case (Perforce).  This results in files ending up all over the place even though they belong in the same directory.  The Windows users are none the wiser, they simply don&#8217;t see the problem.  Since I use a sane system (Linux) I do notice, and when I see it I sigh and roll my eyes.</p>

<p>Here&#8217;s my take on solving the problem:</p>

<pre><code>module Main where

import Control.Monad
import Data.Char
import System.Directory
import System.Environment
import System.FilePath
import System.IO.HVFS.Utils
import System.Posix.Files

data IFile = IFile
    { iFileIPath :: FilePath
    , iFileIName :: FilePath
    , iFileFull :: FilePath
    } deriving (Show)

toIFile :: FilePath -&gt; IFile
toIFile fp =  IFile path file fp
    where
        path = map toLower $ takeDirectory fp
        file = map toLower $ takeFileName fp

listFilesR :: FilePath -&gt; IO [IFile]
listFilesR path =
    recurseDir SystemFS path &gt;&gt;=
    filterM doesFileExist &gt;&gt;=
    mapM (return . toIFile)

linkFile :: FilePath -&gt; IFile -&gt; IO ()
linkFile dest ifile = do
        createDirectoryIfMissing True newDir
        createLink (iFileFull ifile) newFile
    where
        newDir = normalise $ dest &lt;/&gt; (iFileIPath ifile)
        newFile = newDir &lt;/&gt; (iFileIName ifile)

main :: IO ()
main = do
    args &lt;- getArgs
    listFilesR (args !! 0) &gt;&gt;= mapM_ (linkFile $ args !! 1)
</code></pre>

<p>Yes, this is the <a href="http://therning.org/magnus/archives/348">code</a> I wrote in Literate Haskell, but I think I&#8217;d better not disclose my rant against clueless Windows users publically <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F349&amp;title=Dealing%20with%20life%20in%20Haskell" id="wpa2a_4">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/349/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Saddle, two SDDL related tools</title>
		<link>http://therning.org/magnus/archives/340</link>
		<comments>http://therning.org/magnus/archives/340#comments</comments>
		<pubDate>Fri, 28 Mar 2008 00:09:02 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/340</guid>
		<description><![CDATA[I&#8217;ve just uploaded two small tools that makes it a little easier to deal with SDDL (Security Descriptor Description Language, this is a good resource for SDDL): saddle-ex &#8211; “extract” the security descriptor for a number of different kinds of objects saddle-pp &#8211; a pretty printer for an SDDL string Full build instructions are included. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just uploaded two small tools that makes it a little easier to deal with SDDL (Security Descriptor Description Language, this is a good <a href="http://msdn2.microsoft.com/en-us/library/aa379567.aspx">resource for SDDL</a>):</p>

<ol>
<li>saddle-ex &#8211; “extract” the security descriptor for a number of different kinds of objects</li>
<li>saddle-pp &#8211; a pretty printer for an SDDL string</li>
</ol>

<p>Full build instructions are included.  Download the archive <a href="http://therning.org/magnus_files/saddle/saddle-0.1.tar.gz">here</a>.</p>

<p>The tools are written (mostly) in Haskell and I&#8217;ll probably upload it all to <a href="http://hackage.haskell.org/packages/hackage.html">hackage</a> at some point in the future.  I&#8217;m holding out for a fix to <a href="http://hackage.haskell.org/trac/ghc/ticket/2097">ticket 2097</a> since a fix for it will allow me to add a third tool which I feel belong in the package.</p>

<p>Suggestions for improvements are always welcome, patches even more so <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F340&amp;title=Saddle%2C%20two%20SDDL%20related%20tools" id="wpa2a_6">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/340/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Haskell on Windows</title>
		<link>http://therning.org/magnus/archives/338</link>
		<comments>http://therning.org/magnus/archives/338#comments</comments>
		<pubDate>Sun, 17 Feb 2008 00:24:05 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[cmake]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[visual studio express]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/338</guid>
		<description><![CDATA[Recently I&#8217;ve had reason to write a few tools for Windows. Nothing complicated, and since there was nothing “mission critical” (there hardly ever is for me ) I decided to try to write them in Haskell rather than Python or C/C++. This post contains some sort of recollection of my experience so far. First off [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve had reason to write a few tools for Windows.  Nothing complicated, and since there was nothing “mission critical” (there hardly ever is for me <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ) I decided to try to write them in Haskell rather than Python or C/C++.  This post contains some sort of recollection of my experience so far.</p>

<p>First off I should probably disclose that I don&#8217;t particularly like Windows.  Besides feeling more at home on a Unix (Linux) system I find that Windows also upsets me on a very basic level.  If I spend a whole day at work in Windows I tend to go home more stressed and irritated than after a day in Linux.  Part of this is probably due to my familiarity with Linux.  My hope was that the combination of the immense joy of programming Haskell and my loath of the Windows platform I would end up with something that at least was bearable.  It turns out I did.</p>

<h3>My setup</h3>

<p>Besides installing the <a href="http://www.haskell.org/ghc/download.html">pre-built GHC</a> I also installed <a href="http://www.microsoft.com/express/">Visual Studio Express</a> more later to explain the need for it.  I don&#8217;t like the Visual Studio environment so I installed <a href="http://www.cmake.org/">CMake</a> and <a href="http://www.jedit.org/">jEdit</a><sup><a href="http://therning.org/magnus/archives/338#footnote_0_338" id="identifier_0_338" class="footnote-link footnote-identifier-link" title="ordinarily I would install Vim but I thought I&amp;#8217;d try out another editor.  Vim on Windows is somewhat &ldquo;leaky&rdquo;, i.e. it sometimes shows behaviour that betrays its Unix roots.">i</a></sup>.  Last but not least I installed <a href="http://sourceforge.net/projects/console">Console</a>, it addresses the fact that Windows&#8217; “DOS-box” is an amazing piece of crap.</p>

<h3>FFI on Windows</h3>

<p>First, GHC comes with a number of Windows-specific modules and they cover an impressive number of the Win32 API functions.  The Win32 API is simply huge and one will sooner or later come find the need to add to what those modules offer.  Second, GHC is able to compile C code by delegation to <a href="http://www.mingw.org/">MinGW</a>, however MinGW doesn&#8217;t completely cover the Win32 API either and if one is unlucky MinGW isn&#8217;t enough for the task at hand.  Of course that&#8217;s exactly what happened to me.  So, I installed Visual Studio Express, but since I don&#8217;t like VS that much and I didn&#8217;t want VS solutions in my darcs repository I decided to use CMake to build a library that I then instruct GHC, through a Cabal file, to link with my Haskell code.  The end result is that building requires a few extra steps before the familiar <code>configure</code>/<code>build</code> sequence.  It works remarkably well really, and I&#8217;ll definately use that strategy again if I need to.</p>

<p>There is a benign warning thrown when linking the final executable though:</p>

<pre><code>Warning: .drectve `/manifestdependency:"type='win32' name='Microsoft.VC90.CRT'
version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'"
/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" '
unrecognized
</code></pre>

<p>It seems that it might be possible to skip the extra steps in the future if <a href="http://hackage.haskell.org/trac/hackage/ticket/229">Cabal ticket #229</a> is addressed.</p>

<h3>Windows System modules</h3>

<p>Admittedly I haven&#8217;t been using much of the functionality in these modules, but it happens that the only function I needed had a bug that results in a segmentation fault, sometimes.  See <a href="http://hackage.haskell.org/trac/ghc/ticket/2097">GHC ticket #2097</a> for some details.  I guess this confirms my impression of most Haskell hackers being Linux/BSD/Unix users.</p>

<h3>Conclusions</h3>

<p>I won&#8217;t drop Haskell on Linux anytime soon, but I&#8217;ve found Haskell on Windows to be possible.  As I suspected when I started out, Haskell does make Windows somewhat easier to bear.</p>
<ol class="footnotes"><li id="footnote_0_338" class="footnote">ordinarily I would install <a href="http://www.vim.org/">Vim</a> but I thought I&#8217;d try out another editor.  Vim on Windows is somewhat “leaky”, i.e. it sometimes shows behaviour that betrays its Unix roots.</li></ol><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F338&amp;title=Haskell%20on%20Windows" id="wpa2a_8">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/338/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PaiMei on Python 2.5</title>
		<link>http://therning.org/magnus/archives/278</link>
		<comments>http://therning.org/magnus/archives/278#comments</comments>
		<pubDate>Mon, 23 Apr 2007 14:04:31 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[paimei]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/278</guid>
		<description><![CDATA[The PaiMei page says that you need Python 2.4, which turns out to be true due to it shipping with a compiled for Python 2.4 version of pydasm. Of course it&#8217;s possible to compile pydasm yourself, it&#8217;s even fairly easy just as long as you have the correct version of Visual Studio installed. You could [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.openrce.org/downloads/details/208/PaiMei">PaiMei</a> page says that you need Python 2.4, which turns out to be true due to it shipping with a compiled for Python 2.4 version of <code>pydasm</code>.  Of course it&#8217;s possible to compile <code>pydasm</code> yourself, it&#8217;s even fairly easy just as long as you have the correct version of Visual Studio installed. You could also use the utterly unofficial build I&#8217;ve made available <a href="http://therning.org/magnus_files/pydasm-1.2.win32-py2.5.exe">here</a>. Not even I know if I&#8217;m to be trusted though <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . Use at own risk, and all that.</p>

<p>So, the steps are:</p>

<ol>
<li>Install Python 2.5 off <a href="http://www.python.org">python.org</a></li>
<li>Install <code>pydasm</code></li>
<li>Install PaiMei</li>
<li>Remove PaiMei&#8217;s version of pydasm (<code>c:\python25\site-packages\paimei\pydasm.pyd</code>) to be sure the correct one is used.</li>
</ol>

<p>Oh, I probably should say that I&#8217;ve only been using the core functionality of PaiMei (<code>pydbg</code> and <code>pydbg_core</code>). There may be other dependencies on Python 2.4 in PaiMei that I haven&#8217;t stumbled upon!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F278&amp;title=PaiMei%20on%20Python%202.5" id="wpa2a_10">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/278/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using dbghelp</title>
		<link>http://therning.org/magnus/archives/277</link>
		<comments>http://therning.org/magnus/archives/277#comments</comments>
		<pubDate>Mon, 16 Apr 2007 23:07:24 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/277</guid>
		<description><![CDATA[I was disappointed to find the Debugging Tools for Windows contains precious few code examples that helps in understanding how to use the API. Especially if one is interested in using a symbol server to get symbols. Here are my findings: Make sure to use the correct version of dbhelp.{dll,h}. The ones that ship with [...]]]></description>
			<content:encoded><![CDATA[<p>I was disappointed to find the <a href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx">Debugging Tools for Windows</a> contains precious few code examples that helps in understanding how to use the API. Especially if one is interested in using a symbol server to get symbols. Here are my findings:</p>

<ol>
<li><p>Make sure to use the correct version of <code>dbhelp.{dll,h}</code>. The ones that ship with Visual Studio or the Platform SDK aren&#8217;t the same as the one in the Debugging Tools (they lack quite a few functions).</p></li>
<li><p><a href="http://msdn2.microsoft.com/en-us/library/ms681368.aspx">SymSetSearchPath</a> doesn&#8217;t seem to accept the same syntax as <code>_NT_SYMBOL_PATH</code>. I gave up on using the former and resigned to having to set the latter in the environment.</p></li>
<li><p>You want to use <a href="http://msdn2.microsoft.com/en-us/library/ms681370.aspx">SymSrvGetFileIndexes</a> to find <code>id</code>, <code>two</code> and <code>three</code> that you pass to <a href="http://msdn2.microsoft.com/en-us/library/ms680726.aspx">SymFindFileInPath</a>.</p></li>
<li><p>Microsoft&#8217;s public symbol server only offers <em>public symbols</em>, what this means is that your <a href="http://msdn2.microsoft.com/en-us/library/ms680720.aspx">SymEnumSymbolsProc</a> will recieve <code>SYMBOL_INFO</code> structs with <code>Tag</code> set to <code>SymTagPublicSymbol</code> and <code>Flags</code> set to 0. Not very helpful if you want to find all functions in a DLL. <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p></li>
</ol>

<p><em>Added 2007-04-17 / 09:13</em></p>

<p>You also want to use the following little snippet to include <code>dbghelp.h</code>:</p>

<pre><code>#define __out_xcount(x)
#define _NO_CVCONST_H
#include &lt;dbghelp.h&gt; 
</code></pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F277&amp;title=Using%20dbghelp" id="wpa2a_12">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/277/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On Windows programming</title>
		<link>http://therning.org/magnus/archives/276</link>
		<comments>http://therning.org/magnus/archives/276#comments</comments>
		<pubDate>Mon, 16 Apr 2007 22:46:49 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[frustration]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/276</guid>
		<description><![CDATA[I always find myself going through the same motions when trying to programming on Windows: excitement, bewilderedness, frustration, relief. It&#8217;s exciting to find new libraries and frameworks that seem to deliver exactly the functionality I require. I feel bewildered because I don&#8217;t think I&#8217;ve ever come across a Windows C/C++ API that immediately makes sense [...]]]></description>
			<content:encoded><![CDATA[<p>I always find myself going through the same motions when trying to programming on Windows: excitement, bewilderedness, frustration, relief. It&#8217;s exciting to find new libraries and frameworks that seem to deliver exactly the functionality I require. I feel bewildered because I don&#8217;t think I&#8217;ve ever come across a Windows C/C++ API that immediately makes sense to me. Then follows a time of frustration, often a rather long period too, when I try to use the library/framework to solve the problem I have. At some point I hit that stage where my little project is debugged into behaving properly<sup><a href="http://therning.org/magnus/archives/276#footnote_0_276" id="identifier_0_276" class="footnote-link footnote-identifier-link" title="Through experience I&amp;#8217;ve come to the conclusion that it isn&amp;#8217;t worth the time and effort to try to fit Microsoft solutions into some logical framework. I&amp;#8217;d argue that&amp;#8217;s true for most closed-source solutions.">i</a></sup> and a sense of relief comes over me.</p>

<p>One thing that never ceases to amaze me is how many small surprising things there are lurking just under the hood in Windows:</p>

<ol>
<li><p>Want to print an error message? <a href="http://msdn2.microsoft.com/en-us/library/ms679360.aspx">GetLastError</a> gives you an error value and <a href="http://msdn2.microsoft.com/en-us/library/ms679351.aspx">FormatMessage</a> whips it into a nice printable string. Take a good long look at <code>FormatMessage</code>. Where is the convenience function a lÃ¡ <code>strerror</code>?</p></li>
<li><p>Another thing is the surprising <a href="http://msdn2.microsoft.com/en-us/library/ms682586.aspx">order of paths that is searched for DLLs</a>. By putting <code>PATH</code> so far down the list and completely leaving out an equivalent of <code>LD_LIBRARY_PATH</code> they actively encourage developers to copy DLLs into the home dirs of executables. I suspect this is inevitable given the DLL-hell phenomenon on Windows. It&#8217;s nonetheless extremely irritating when developing against a non-standard DLL (i.e. one that isn&#8217;t installed in <code>\windows\system32</code>).</p></li>
<li><p>The utter confusion I experience when trying to figure out just where to find the correct framework to use. There is considerable overlap between Visual Studio and the Windows Platform SDK. To add more confusion there are sometimes other frameworks that overlap the both of them, e.g. Debugging Tools for Windows provides <code>dbghelp.{dll,h}</code>, both of which are provided in slightly different versions in the other places<sup><a href="http://therning.org/magnus/archives/276#footnote_1_276" id="identifier_1_276" class="footnote-link footnote-identifier-link" title="A tip, make sure to use the ones that comes from Debugging Tools for Windows!">ii</a></sup>.</p></li>
<li><p>The lack of fixes for known issues, e.g. the version of <code>dbghelp.h</code> included in Debugging Tools for Windows can&#8217;t be included as is because it lacks the definition of a macro. The webpage announcing version 6.6.7.5 was updated 18 July, 2006. One would think that gives Microsoft ample time to address the issue, but no such luck.</p></li>
</ol>

<p>Well, that&#8217;s enough of ranting for one night&#8230;</p>
<ol class="footnotes"><li id="footnote_0_276" class="footnote">Through experience I&#8217;ve come to the conclusion that it isn&#8217;t worth the time and effort to try to fit Microsoft solutions into some logical framework. I&#8217;d argue that&#8217;s true for most closed-source solutions.</li><li id="footnote_1_276" class="footnote">A tip, make sure to use the ones that comes from Debugging Tools for Windows!</li></ol><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F276&amp;title=On%20Windows%20programming" id="wpa2a_14">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/276/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some of my thoughts on DRM&#8230;</title>
		<link>http://therning.org/magnus/archives/248</link>
		<comments>http://therning.org/magnus/archives/248#comments</comments>
		<pubDate>Mon, 15 Jan 2007 23:27:53 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[drm]]></category>
		<category><![CDATA[gutman]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[vista]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/248</guid>
		<description><![CDATA[An excellent paper on the cost of DRM in Windows Vista has been making its rounds on the internet for a few weeks now. The topic&#8217;s been picked up by Security Now (episode 73 and episode 74). The former gives a nice background to the technical side and the latter has Peter Gutman, the author [...]]]></description>
			<content:encoded><![CDATA[<p>An excellent paper on <a href="http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt">the cost of DRM in Windows Vista</a> has been making its rounds on the internet for a few weeks now. The topic&#8217;s been picked up by Security Now (<a href="http://www.grc.com/SecurityNow.htm#73">episode 73</a> and <a href="http://www.grc.com/SecurityNow.htm#74">episode 74</a>). The former gives a nice background to the technical side and the latter has Peter Gutman, the author of the paper, as a guest.</p>

<p>This has triggered my writing something about my thoughts on the topic of DRM. Now, I don&#8217;t consider myself an expert on this topic. I&#8217;ve formed most of my opinions on DRM by reading things like Cory Doctorow&#8217;s excellent <a href="http://www.craphound.com/msftdrm.txt">talk at Microsoft Research</a> and the <a href="http://boingboing.net/2002/11/20/msfts_darknet_paper_.html">Darknet paper</a> from Microsoft. I&#8217;ve also worked for a large consumer electronics company for almost 5 years, of which the last 18 months to 2 years on security-related issues in consumer devices.</p>

<h3>Why do the consumer electronics companies do DRM?</h3>

<p>For the last 50 years consumers have bought new devices for the simple reason that the newer devices had more features, were faster, had better resolution, better audio&#8230; in short this year&#8217;s models were better than last year&#8217;s models. So, why on earth would these companies be interested in bringing out models that are fundamentally flawed through DRM? The easy answer is Hollywood&#8230; but as a professor of mine used to say, &#8220;Every difficult problem has an easy answer&#8230; which is wrong&#8221;. Hollywood isn&#8217;t the answer in my opinion. Hollywood is only a convenient scape goat. The real answer is format control.</p>

<p>A company that controls a format makes money even when a competitor sells a device. Just think of the patent Philips and Sony had on CDs. That patent pulled in money on <em>every CD sold, worldwide</em>. Talk about a gravy train. Nowadays content formats involve a lot of companies and I guess it&#8217;s less lucrative because license money will have to be shared between more companies (just think of the MPEG group). DRM is still a fairly new area of standardisation and there&#8217;s a good chance of cashing in even more than on the format itself, especially if DRM is written into law<sup><a href="http://therning.org/magnus/archives/248#footnote_0_248" id="identifier_0_248" class="footnote-link footnote-identifier-link" title="This brings me to a  rather paranoid theory of mine, involving the &amp;#8220;unholy trinity&amp;#8221; of software patents, DMCA-like laws and DRM that can be used to explain some companies&amp;#8217; behaviour. That would probably have to be the topic of another post though.">i</a></sup>.</p>

<h3>Consumer electronics companies and the broadcast flag</h3>

<p>A while back the broadcast flag was beaten in the US. A court found that the FCC didn&#8217;t have the authority to introduce such a flag and the US was saved. At least for now. What wasn&#8217;t reported so widely on was the fact that when the broadcast flag was put on the table there was an outcry among the consumer electronics companies (a few other companies joined in as well). No, don&#8217;t be fooled, they weren&#8217;t considering the consumer, they weren&#8217;t interested in keeping TV the way it was. No, they were outraged because the suggested broadcast flag allowed only <em>one</em> DRM system. A system controlled by 5C (if I remember correctly). Companies not in the core group were facing extortionate licenses (basically giving up all IP to the core companies). No wonder they were outraged. Intense lobbying of the FCC followed and the outcome was that a set of DRM technologies would be &#8220;legal&#8221; in the US. That&#8217;s where the consumer electronics industry spent their time and money. They were fighting the possibility of 5C gaining a strangling grip in the market rather then stand up and try to do the right thing which would have been to work to make it possible to bring to market the best possible devices.</p>

<h3>Consumer electronics companies and security</h3>

<p>When working on security at the research branch of a consumer electronics company I quickly found myself &#8220;attached&#8221; to DRM-related projects. That was the only place where they were interested in security at all. Of course they weren&#8217;t interested in keeping consumers safe in a future where tellys have internet connections. No, the interest was solely in keeping customers out of the telly, preventing them to do interesting things with the boxes they bought. So, who paid for this sort of research project? The IP/standardisation department, that&#8217;s who. They practically poured money into DRM projects while the parts of the company that actually made devices showed little interest. (On a personaly note I have to admit that this aspect of security was one of the reasons why I left the company.)</p>

<h3>End note</h3>

<p>Well, I hope I&#8217;ve made some sense and that I&#8217;ve added something to the discussion about DRM that currently is taking place. Peter Gutman has done a great job in making people aware of it and I&#8217;m looking forward to see what happens once Vista really hits the homes. I&#8217;m of course hoping that there is broad disapproval and that Vista does appallingly based solely on its DRM.</p>
<ol class="footnotes"><li id="footnote_0_248" class="footnote">This brings me to a  rather paranoid theory of mine, involving the &#8220;unholy trinity&#8221; of software patents, DMCA-like laws and DRM that can be used to explain some companies&#8217; behaviour. That would probably have to be the topic of another post though.</li></ol><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F248&amp;title=Some%20of%20my%20thoughts%20on%20DRM%E2%80%A6" id="wpa2a_16">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/248/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>From the list of idiotic function signatures&#8230;</title>
		<link>http://therning.org/magnus/archives/157</link>
		<comments>http://therning.org/magnus/archives/157#comments</comments>
		<pubDate>Fri, 14 Jul 2006 22:53:34 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/157</guid>
		<description><![CDATA[I stumbled on the function QueryWorkingSet today. It seems to be usable for solving a problem I have&#8230; What&#8217;s really amazing about this function is its totally braindead signature: BOOL QueryWorkingSet( HANDLE hProcess, PVOID pv, DWORD cb ); Please look beyond the weird Microsoft-isms with type names and the idiotic Hungarian notation. What does it [...]]]></description>
			<content:encoded><![CDATA[<p>I stumbled on the function <code>QueryWorkingSet</code> today. It seems to be usable for solving a problem I have&#8230; What&#8217;s really amazing about this function is its totally braindead signature:</p>

<pre><code>BOOL QueryWorkingSet(
  HANDLE hProcess,
  PVOID pv,
  DWORD cb
);
</code></pre>

<p>Please look beyond the weird Microsoft-isms with type names and the idiotic Hungarian notation. What does it do? Basically it takes a buffer (<code>pv</code>) of a certain length (<code>cb</code>) and tries to stuff some information in it. So, how big do we have to make the buffer? Who knows?</p>

<p>Microsoft seems to have a desire to force programmers to make 2 calls to each function that returns data in a buffer. Functions don&#8217;t take an <code>int</code> as the bufffer&#8217;s length, instead they take <code>int *</code>. The first call would pass in 0 as length (or rather a pointer to a variable that&#8217;s set to 0). The call would fail, but the value of the variable would be set to the required size of the buffer for a successful call.</p>

<p>So, back to <code>QueryWorkingSet</code>. How does one find out the required size of the buffer <code>pv</code>? The only way seems to be repeated calls with progressively larger buffers. Brilliant API Microsoft!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F157&amp;title=From%20the%20list%20of%20idiotic%20function%20signatures%E2%80%A6" id="wpa2a_18">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/157/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Stuff worth reading (21/06/2006)</title>
		<link>http://therning.org/magnus/archives/149</link>
		<comments>http://therning.org/magnus/archives/149#comments</comments>
		<pubDate>Wed, 21 Jun 2006 21:47:27 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[mpaa]]></category>
		<category><![CDATA[network neutrality]]></category>
		<category><![CDATA[riaa]]></category>
		<category><![CDATA[stuff worth reading]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/149</guid>
		<description><![CDATA[Some interesting articles on Net Neutrality by David Ernst and Andy Kessler. I&#8217;m slowly starting to lean towards letting the market sort this out without government intervention. The idea of labelling is especially appealing. That something&#8217;s wrong in Microsoft is rather obvious given the amazing delay in releasing Vista/Longhorn (whatever it&#8217;s called this week). After [...]]]></description>
			<content:encoded><![CDATA[<p>Some interesting articles on Net Neutrality by <a href="http://cgi.hoosier.net/~drernst/wordpress/2006/05/21/net-neutrality-is-a-deep-issue">David Ernst</a> and <a href="http://www.weeklystandard.com/Utilities/printer_preview.asp?idArticle=12348&amp;R=ECCDED9B">Andy Kessler</a>. I&#8217;m slowly starting to lean towards letting the market sort this out without government intervention. The idea of labelling is especially appealing.</p>

<p>That something&#8217;s wrong in Microsoft is rather obvious given the amazing delay in releasing Vista/Longhorn (whatever it&#8217;s called this week). After listening to the <a href="http://radio.linuxquestions.org/2006/06/linuxquestionsorg-podcast-061706.html">LQ podcast</a> I tracked down the MSDN blog entry mentioned in it, <a href="http://blogs.msdn.com/philipsu/archive/2006/06/14/631438.aspx">Broken Windows Theory</a>. It&#8217;s an interesting look behind the curtain.</p>

<p>Look here to have a good <a href="http://www.eff.org/deeplinks/archives/004753.php">laugh at RIAA and MPAA</a>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F149&amp;title=Stuff%20worth%20reading%20%2821%2F06%2F2006%29" id="wpa2a_20">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/149/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VMWare server to the rescue</title>
		<link>http://therning.org/magnus/archives/121</link>
		<comments>http://therning.org/magnus/archives/121#comments</comments>
		<pubDate>Tue, 18 Apr 2006 19:07:36 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[vmware server]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/121</guid>
		<description><![CDATA[I complained earlier about VMWare Player not allowing me to replace my Windows boxen at work. It seems VMWare took my complaints seriously (yeah right), by releasing VMWare Server they&#8217;ve made my dream possible. I have to admit that their releasing VMWare Server is surprising, and since it allows creation of new images it makes [...]]]></description>
			<content:encoded><![CDATA[<p>I complained <a href="http://therning.org/magnus/archives/74/">earlier</a> about VMWare Player not allowing me to replace my Windows boxen at work. It seems VMWare took my complaints seriously (yeah right), by releasing VMWare Server they&#8217;ve made my dream possible.</p>

<p>I have to admit that their releasing VMWare Server is surprising, and since it allows creation of new images it makes the limitation of VMWare Player rather strange. Well, I&#8217;m not complaining. I&#8217;ve finally been able to purge Windows from my desk. From today on all my Windows boxen will be VMWare images accessed from my Linux machine. Brilliant. Thank you VMWare!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F121&amp;title=VMWare%20server%20to%20the%20rescue" id="wpa2a_22">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/121/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keeping windows up-to-date</title>
		<link>http://therning.org/magnus/archives/103</link>
		<comments>http://therning.org/magnus/archives/103#comments</comments>
		<pubDate>Wed, 01 Feb 2006 16:19:02 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[frustration]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/103</guid>
		<description><![CDATA[Eric is grumbling about installing software on Windows. Well, he didn&#8217;t hit the real point of pain with Windows yet: upgrading applications. As I&#8217;ve mentioned before Window&#8217;s package management is broken. Yes, it&#8217;s that simple, and the worst thing is that there seems to be no solution in sight. At least not unless every Windows [...]]]></description>
			<content:encoded><![CDATA[<p>Eric is grumbling about <a href="http://www.ericsgrumbles.net/archives/154943.php">installing software on Windows</a>. Well, he didn&#8217;t hit the real point of pain with Windows yet: upgrading applications. As I&#8217;ve mentioned before <a href="http://therning.org/magnus/archives/79">Window&#8217;s package management is broken</a>. Yes, it&#8217;s that simple, and the worst thing is that there seems to be no solution in sight. At least not unless every Windows software provider agrees to chip in and create a central repository for upgrades&#8230; I don&#8217;t see that happening any time soon though.</p>

<p>A few weeks ago I bit the bullet and spent an afternoon to hunt down upgrades for the software I&#8217;ve got on my Windows machine at work&#8230; What a pain! It only becomes more painful when one knows that <code>apt-get update; apt-get upgrade</code> works so well.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F103&amp;title=Keeping%20windows%20up-to-date" id="wpa2a_24">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/103/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Another reason not to run Windows&#8230;</title>
		<link>http://therning.org/magnus/archives/80</link>
		<comments>http://therning.org/magnus/archives/80#comments</comments>
		<pubDate>Fri, 25 Nov 2005 11:07:53 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[microsoft update]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=80</guid>
		<description><![CDATA[As if I needed any more reasons Triggered by the email I wrote about yesterday (One of the main reasons I&#8217;m not running Windows) I went to Micro$oft&#8217;s update site to see if there were any non-essential updates for my windows system. Given the name of the service&#8212;&#8221;Microsoft Update&#8221;&#8212;I assumed what I&#8217;d be presented with [...]]]></description>
			<content:encoded><![CDATA[<p>As if I needed any more reasons <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>

<p>Triggered by the email I wrote about yesterday (<a href="http://therning.org/magnus/archives/79">One of the main reasons I&#8217;m not running Windows</a>) I went to Micro$oft&#8217;s update site to see if there were any non-essential updates for my windows system. Given the name of the service&#8212;&#8221;Microsoft Update&#8221;&#8212;I assumed what I&#8217;d be presented with would be updates of components I already had installed. I didn&#8217;t bother reading all the text, I just chose all the available updates. What a giant mistake!</p>

<p>Had I read all the I would have avoided spending 30 minutes trying to recover my Windows box. I performed the update through TS (Terminal Services), as I have done many a time before. I clicked OK when I was told the system needed to reboot to perform the last steps of the update. I waited a few minutes before connecting to the machine again, the login screen came up, I entered my credentials, then nothing. Nothing! Until the TS session died. Another attempt, the same outcome. (Computing is an exception to the rule that repeating the same action and expecting different outcomes is a sign of insanity.) I dived under my desk and started re-connecting monitors and mouse so that I would stand a better chance of fixing the system. Wow, did my Windows look ugly. 640&#215;400 resolution and hardly any colours at all! Try to log in, so far so good. A dialogue pops up telling me that the resolution is VERY low, do I want to auto-configure the display? Yes, please! Blue screen of death! Hmm, somewhat puzzled I booted into failsafe mode. That worked just fine. Reboot! Blue screen again. Reboot. We continued the dancing for a while. No improvement.</p>

<p>The culprit, you ask? The driver for the graphics card (of course). &#8220;Microsoft Update&#8221; had urged me to upgrade the graphics card. Not reading the text I didn&#8217;t realise that this &#8220;upgrade&#8221; was to an earlier version than what I already had! Rolling back to the later version seemed to work at first. Another Blue screen later I simply uninstalled the driver alltogether. I haven&#8217;t had any problems since.</p>

<p>Need I say that what confidence remained now is gone? I have absolutely no trust in Microsoft anymore!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F80&amp;title=Another%20reason%20not%20to%20run%20Windows%E2%80%A6" id="wpa2a_26">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/80/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One of the main reasons I&#8217;m not running Windows</title>
		<link>http://therning.org/magnus/archives/79</link>
		<comments>http://therning.org/magnus/archives/79#comments</comments>
		<pubDate>Thu, 24 Nov 2005 11:43:44 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[security updates]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=79</guid>
		<description><![CDATA[At work I received an email similar to this: Subject: Client patching time Apple Quicktime: (link) Macromedia Flash: (link) RealNetworks Real Player: (link) As well as these, the Microsoft Internet Explorer vulnerability has not been fixed, and there is exploit code out there: http://www.theregister.co.uk/2005/11/22/ie_exploit/ Let&#8217;s be careful out there, now&#8230; This is a wonderful example [...]]]></description>
			<content:encoded><![CDATA[<p>At work I received an email similar to this:</p>

<blockquote>
  <p>Subject: Client patching time</p>
  
  <p>Apple Quicktime: (link)</p>
  
  <p>Macromedia Flash: (link)</p>
  
  <p>RealNetworks Real Player: (link)</p>
  
  <p>As well as these, the Microsoft Internet Explorer vulnerability has <em>not</em> been fixed, and there is exploit code out there:</p>
  
  <p>http://www.theregister.co.uk/2005/11/22/ie_exploit/</p>
  
  <p>Let&#8217;s be careful out there, now&#8230;</p>
</blockquote>

<p>This is a wonderful example of just how broken the Windows platform is when it comes to security updates. Am I, as a regular user, really supposed to monitor the site of every application I&#8217;ve installed for security updates? I simply don&#8217;t have the time! I&#8217;ve decided to say &#8220;thanks, but no thanks&#8221;, instead I avoid proprietary applications and run <code>apt-get update; apt-get upgrade</code> to keep up-to-date on security.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F79&amp;title=One%20of%20the%20main%20reasons%20I%E2%80%99m%20not%20running%20Windows" id="wpa2a_28">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/79/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Xen and Windows</title>
		<link>http://therning.org/magnus/archives/42</link>
		<comments>http://therning.org/magnus/archives/42#comments</comments>
		<pubDate>Thu, 16 Jun 2005 08:18:15 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=42</guid>
		<description><![CDATA[According to an article on ElReg there will be support for Windows in Xen later this year. I am already dreaming of migrating my work desktop to Xen, running Windows in one &#8216;machine&#8217; and a real OS in another. The few things I need Windows for can all be done through RDP&#8230; Ahh, I can&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>According to <a href="http://www.theregister.co.uk/2005/06/15/xen_goes_three/">an article</a> on ElReg there will be support for Windows in Xen later this year. I am already dreaming of migrating my work desktop to Xen, running Windows in one &#8216;machine&#8217; and a real OS in another. The few things I <em>need</em> Windows for can all be done through RDP&#8230; Ahh, I can&#8217;t wait!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F42&amp;title=Xen%20and%20Windows" id="wpa2a_30">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/42/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows CA&#8212;why you shouldn&#8217;t!</title>
		<link>http://therning.org/magnus/archives/33</link>
		<comments>http://therning.org/magnus/archives/33#comments</comments>
		<pubDate>Tue, 07 Jun 2005 18:56:47 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[certification authority]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/33</guid>
		<description><![CDATA[Today I ran into another case where Windows just isn&#8217;t very friendly. I&#8217;ve been using a Windows box as a CA for a while now. Mostly because it was so easy to set up, I was off in just minutes granting certificates to my hearts content. Great! Or so I thought. Today I wanted to [...]]]></description>
			<content:encoded><![CDATA[<p>Today I ran into another case where Windows just isn&#8217;t very friendly. I&#8217;ve
been using a Windows box as a CA for a while now. Mostly because it was so
easy to set up, I was off in just minutes granting certificates to my hearts
content. Great! Or so I thought.</p>

<p>Today I wanted to look at the traffic comming from a server I have installed.
I&#8217;m using an SSL cert signed with my own CA. The problem is that I need to get
the secret key out of Windows&#8217; tight grip. I&#8217;m admitting, this is not
something that should be easy, but the question is where to put the hurdles.
using the <em>Certificates Snap-in</em> in MMC I can&#8217;t export the secret key. My next
step was of course to check if I couldn&#8217;t get my CA to create a new cert,
where the key was exportable. Oh, no! That shouldn&#8217;t be allowed when the cert
is for a server! The tick box is taunting me with its disabled presence!
Bloody hell!</p>

<p>Well, I&#8217;ve always thought it might be a good idea to explore the dark
side&#8211;OpenSSL. Here&#8217;s my chance. I get to use Linux while doing it as well,
that&#8217;s always a plus. Just pray that I can get the results back onto my
Windows server in the end!</p>

<p>I guess it&#8217;s true, Windows my be user friendly, but it shure as hell isn&#8217;t
admin/developer freindly!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F33&amp;title=Windows%20CA%E2%80%94why%20you%20shouldn%E2%80%99t%21" id="wpa2a_32">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/33/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

