<?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>DevBlog &#187; Windows</title>
	<atom:link href="http://simonowen.com/blog/category/windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://simonowen.com/blog</link>
	<description>stuff and nonsense</description>
	<lastBuildDate>Thu, 19 Jan 2012 17:59:26 +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>FdInstall false-positive, again</title>
		<link>http://simonowen.com/blog/2008/12/23/fdinstall-false-positive-again/</link>
		<comments>http://simonowen.com/blog/2008/12/23/fdinstall-false-positive-again/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 00:39:47 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[fdrawcmd.sys]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://simonowen.com/blog/?p=74</guid>
		<description><![CDATA[Avira Antivir strikes again, with another false-positive in the fdrawcmd.sys installer. The current virus definitions report the FdInstall.dll installer plugin as infected with TR/Dropper.Gen (a &#8220;generic trojan detection routine&#8221;). As before, avoiding UPX compression on the module is a magic fix. It&#8217;s particularly frustrating because the compression isn&#8217;t hiding anything, since the original module can [...]]]></description>
			<content:encoded><![CDATA[<p>Avira Antivir strikes again, with another false-positive in the <em>fdrawcmd.sys</em> installer.  The current virus definitions report the FdInstall.dll installer plugin as infected with <em>TR/Dropper.Gen</em> (a &#8220;generic trojan detection routine&#8221;).</p>
<p>As before, avoiding <a href="http://upx.sourceforge.net/">UPX</a> compression on the module is a magic fix.  It&#8217;s particularly frustrating because the compression isn&#8217;t hiding anything, since the original module can be extracted using freely available code that they&#8217;re already using!  Why should using a reversible executable packer be an instant black mark?  Shouldn&#8217;t they be more worried about unknown or non-reversible packers?  Grrr.</p>
<p>I&#8217;ve updated the <a href="http://simonowen.com/fdrawcmd/#download">driver installer</a> with a UPX-less version.  Hopefully the complete removal will mean an end to these virus scanner hassles.</p>
<p>Avira have since confirmed the issue as a false-positive, and will be fixing it in a future virus definition update.  Thanks to zogzog for taking the time to report the original problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://simonowen.com/blog/2008/12/23/fdinstall-false-positive-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fdrawcmd.sys license update</title>
		<link>http://simonowen.com/blog/2007/02/11/fdrawcmdsys-license-update/</link>
		<comments>http://simonowen.com/blog/2007/02/11/fdrawcmdsys-license-update/#comments</comments>
		<pubDate>Sun, 11 Feb 2007 21:55:46 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[fdrawcmd.sys]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.simonowen.com/2007/02/11/fdrawcmdsys-license-update/</guid>
		<description><![CDATA[I&#8217;ve decided to remove the non-commercial use restriction from my driver license. The original reason for having it was to prevent 3rd parties profiting from what I&#8217;m releasing for free, though in reality it&#8217;s unlikely to add great value to anything. The change also frees it up for use by small chargeable projects, which I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve decided to remove the <i>non-commercial use</i> restriction from my driver license.  The original reason for having it was to prevent 3rd parties profiting from what I&#8217;m releasing for free, though in reality it&#8217;s unlikely to add great value to anything.  The change also frees it up for use by small chargeable projects, which I had no problem with anyway.</p>
<p>It&#8217;s also a stepping stone to possibly releasing the driver as open source in the future, which is something I&#8217;ve been asked to consider.  Though at least one of the requests was just so the driver could be used by GNU GPL programs, which I didn&#8217;t think was a problem anyway.  I&#8217;m unclear on whether the driver is seen as a library dependency or part of the OS, and whether it&#8217;s only a problem if the calling program is useless without the driver.</p>
<p>Another reason for postponing an open source release is the confusion about Vista x64 driver signing.  A binary release for would need to be signed, effectively making the digital certificate another project dependency.  Nobody would be willing to distribute their own certificate to allow an equivalent binary to be built, which seems to violate the GNU GPL.  Or am I missing something?</p>
]]></content:encoded>
			<wfw:commentRss>http://simonowen.com/blog/2007/02/11/fdrawcmdsys-license-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiler upgrade</title>
		<link>http://simonowen.com/blog/2007/01/10/compiler-upgrade/</link>
		<comments>http://simonowen.com/blog/2007/01/10/compiler-upgrade/#comments</comments>
		<pubDate>Wed, 10 Jan 2007 23:34:56 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.simonowen.com/2007/01/10/compiler-upgrade/</guid>
		<description><![CDATA[Until now, pretty much everything I&#8217;ve built for Windows was compiled using Visual Studio 6, despite Microsoft having since released three newer versions. I thought it was about time I took a serious look at moving to Visual Studio 2005, as it makes building matching 32-bit and 64-bit versions far easier. The code it produces [...]]]></description>
			<content:encoded><![CDATA[<p>Until now, pretty much everything I&#8217;ve built for Windows was compiled using Visual Studio 6, despite Microsoft having since released three newer versions.  I thought it was about time I took a serious look at moving to Visual Studio 2005, as it makes building matching 32-bit and 64-bit versions far easier.  The code it produces is measurably more efficient too, so what is there to lose?</p>
<p>Unfortunately, it&#8217;s not a simple matter of upgrading the project files and building new versions.  The old C run-time DLL (MSVCRT.DLL) is available on Win95 (with IE4 installed) and later, but the new version (MSVCR80.DLL) is shipped only with Vista.  It can be installed on older Win32 platforms, but only by using official vcredist_*.exe installers, which total almost 6MB for both x86 and x64 version.  Ouch.</p>
<p>Fortunately, the run-time library can still be linked statically to remove the DLL requirement.  Though that becomes less practical when done for many different modules in the same project.  Another option is to leave out the run-time library altogether, though that&#8217;s really only suitable for small programs, or those specifically written to avoid it.  Most of the missing functionality is available through compiler intrinsics and directly through the Win32 API (including string functions such as lstrlen, lstrcpy, etc.).</p>
<p>Unless we completely omit the CRT there&#8217;s yet <em>another</em> problem.  VS2005 compiled binaries don&#8217;t work on Win95 or NT4, as the CRT startup code uses API functions (including <em><a href="http://msdn2.microsoft.com/en-us/library/ms680345.aspx">IsDebuggerPresent</a>)</em> that don&#8217;t exist on those older versions of Windows.  Attempting to launch the program gives a Windows loader error about the missing export, and the process is terminated.</p>
<p>There is a <a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=242895&#038;SiteID=1#242895">work-around</a> for this, but it&#8217;s not particularly nice.  It involves including two CRT source modules in the project, and using an alternative implementation of the missing function.  The linker will then use these versions instead of the ones found in the static CRT library, so our module is 95/NT4 compatible once more.</p>
<p>I do now plan to use VS2005 where possible, with the approach depending on the size of project.  SimCoupe has no option but to use the CRT, so I&#8217;ll link in the static version and use the Win95/NT4 work-around for backwards compatibility.  SamDisk targets only Windows 2000 and later, but is designed to report a helpful message if run on older Windows versions.  It doesn&#8217;t (currently) use the CRT at all, so using the new compiler is not an issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://simonowen.com/blog/2007/01/10/compiler-upgrade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FdInstall false-positive</title>
		<link>http://simonowen.com/blog/2007/01/05/fdinstall-false-positive/</link>
		<comments>http://simonowen.com/blog/2007/01/05/fdinstall-false-positive/#comments</comments>
		<pubDate>Fri, 05 Jan 2007 12:35:34 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[fdrawcmd.sys]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.simonowen.com/2007/01/05/fdinstall-false-positive/</guid>
		<description><![CDATA[I had a report that the AntiVir virus scanner was detecting a DR/Zlob.Gen virus in my new FdInstall.exe installer. I was pretty certain this was a false-positive, and three alternative scanners I had access to all agreed with me. Googling for other online scanners I came across a handy site to check it more thoroughly. [...]]]></description>
			<content:encoded><![CDATA[<p>I had a report that the AntiVir virus scanner was detecting a <em>DR/Zlob.Gen</em> virus in my new FdInstall.exe installer.  I was pretty certain this was a false-positive, and three alternative scanners I had access to all agreed with me.</p>
<p>Googling for other online scanners I came across a <a href="http://www.virustotal.com/">handy site</a> to check it more thoroughly.  Simply upload your file and have it checked by around 30 commercial scanning engines, with near-live results (if there aren&#8217;t too many queued jobs).</p>
<p>I submitted the latest FdInstall.exe, and as expected AntiVir was the only engine to consider it infected, so I fired off an e-mail to report the false-positive.  However&#8230; eSafe, Fortinet and Panda considered the file to be &#8216;suspicious&#8217;.  The Additional Information section at the bottom reported the UPX packer, and that the file had a binary resource.</p>
<p>Just to compare, I submitted the old FdInstall.exe for scanning.  No virus detected, but both eSafe and Fortinet <em>still</em> considered it suspicious due to the use of UPX.</p>
<p>I rebuilt FdInstall.exe without compressing the header, and resubmitted it for scanning.  Result: completely clean!  One of the scanners still reported the presence of UPX and binary resources, but it wasn&#8217;t enough to show as suspicious.</p>
<p>It seems that many scanning engines consider compressed executables to be a worry, as though they&#8217;re trying to hide something.  I&#8217;m surprised this is still the case when using well-known packers like UPX, which can be unpacked using freely available programs and code.</p>
<p>I&#8217;ve now updated the FdInstall.exe on my site with an uncompressed version.  It adds a whopping 11% (11K) to the installer size, but it&#8217;s well worth it to avoids further false-positives.</p>
<p>Hats off to Fortinet for their comprehensive response to my query in less than an hour.  The file is white-listed in their latest definitions.  Avira have also confirmed the file is clean, and plan to fix the issue in a future definition update.</p>
]]></content:encoded>
			<wfw:commentRss>http://simonowen.com/blog/2007/01/05/fdinstall-false-positive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vista tweaks</title>
		<link>http://simonowen.com/blog/2006/12/16/vista-tweaks/</link>
		<comments>http://simonowen.com/blog/2006/12/16/vista-tweaks/#comments</comments>
		<pubDate>Sat, 16 Dec 2006 00:12:53 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[SimCoupe]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.simonowen.com/2006/12/16/vista-tweaks/</guid>
		<description><![CDATA[I&#8217;ve had my eye on Vista since the beta versions were released earlier this year. So far only the SimCoupe 1.0 release in July has included Vista-specific changes. These were: Avoiding touching the primary display surface SimCoupe uses a video overlay surface for the SAM display by default, which gives the best performance on old [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had my eye on Vista since the beta versions were released earlier this year.  So far only the SimCoupe 1.0 release in July has included Vista-specific changes.  These were:</p>
<ol>
<li><strong>Avoiding touching the primary display surface</strong>
<p>SimCoupe uses a video overlay surface for the SAM display by default, which gives the best performance on old video cards.  For this I must determine a colour-key value where overlay pixels should show through to the display, like green-screen special effects used on TV.  This meant locking the primary surface to peek a pixel value, and that&#8217;s something Vista wasn&#8217;t happy with me doing.</p>
<p>In previous versions of Windows the primary display surface was what you saw on your screen, and where most objects were drawn directly.  Vista&#8217;s Aero interface uses off-screen compositing for its fancy scaling and transparency effects.  The visible display is managed by the compositing engine and is off-limits to direct manipulation.  Any attempts to do so disables the Desktop Window Manager (DWM), returning the display to a compatibility mode.  As part of this it also rather unhelpfully reports: &#8220;<em>This program is not compatible with Windows</em>&#8220;!</p>
<p>Video card overlays don&#8217;t really fit into the new composite world anyway.  They <em>can</em> be scaled, but they can&#8217;t be rotated or skewed, and don&#8217;t support transparency.  The DWM can&#8217;t make any use of them, so there&#8217;s little point in us trying to use them &#8211; problem solved!</p>
<p>SimCoupe no longer attempts to create a video overlay on Vista, and to avoid any confusion I also grey the setting in the options used to toggle it on and off.</li>
<li><strong>Avoid querying the capabilities of the primary display surface</strong>
<p>This is related to the first issue, but shouldn&#8217;t have been a problem at all.  I found that simply querying the capabilities of the primary surface (using <em>GetSurfaceDesc()</em>) was enough to disable the DWM.</p>
<p>This was confirmed to be a Windows bug in beta 1, scheduled to be fixed in beta 2.  In the meantime I changed my code to work around it, using the required capabilities from the back surface instead.</li>
<li><strong>Double-checking the main window is the correct size</strong>
<p>The partial scanlines on the boot screen were showing a banding effect, which happens if the main window is resized to non-multiple of the natural display size.  Further investigation showed the main window size (as set using <em>AdjustWindowRect()</em>) was slightly too small.</p>
<p>This was yet another Windows bug, and not one I found documented anywhere!  The size calculations didn&#8217;t seem to be including all the extra window decoration and the larger Vista borders were throwing it out.  This just required a second size adjustment in SimCoupe if the first one was found to be wrong.  This problem affected other programs that required an exact display size, which was mainly other emulators.</li>
</ol>
<p>These changes were the bare minimum needed to run the program correctly under Vista.  True Vista support will require additional changes, almost all related to the tightened security model.  More about those in a future update.</p>
]]></content:encoded>
			<wfw:commentRss>http://simonowen.com/blog/2006/12/16/vista-tweaks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: simonowen.com @ 2012-02-04 03:12:13 -->
