<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6142486</id><updated>2012-02-01T11:02:10.675Z</updated><title type='text'>Mike Dimmick's Bleurgh</title><subtitle type='html'>Random regurgitations of technical material, with added bile</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default?start-index=101&amp;max-results=100'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>268</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6142486.post-6599518223199766266</id><published>2010-03-05T16:32:00.003Z</published><updated>2010-03-05T16:53:49.576Z</updated><title type='text'>MFC message handling</title><content type='html'>&lt;p&gt;Goran, a commenter at &lt;a href="http://blogs.msdn.com/oldnewthing/"&gt;Raymond's blog&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/oldnewthing/archive/2010/02/22/9967161.aspx#9967828"&gt;asks&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;As one of those people who only have a hammer :-( ... It looks like MFC just told us off with this?
WM_GETDLGCODE has meaningfull wParam and lParam, but CWnd::OnGetDlgCode has none of that.
Anyone used OnGetDlgCode? Help?&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;The specific context is handling the return key - Windows tells you what key caused WM_GETDLGCODE to be fired in the wParam parameter, but MFC doesn't pass that information on to the OnGetDlgCode handler.&lt;/p&gt;&lt;p&gt;Something that often catches people out with MFC is the thought that you have to use the specific handler that MFC declares for a certain message. In fact, it's simply a shortcut - ON_WM_GETDLGCODE in the message map causes the message map handling to go down a certain branch that happens to call the handler function with no parameters.&lt;/p&gt;&lt;p&gt;Instead, you can simply use ON_MESSAGE in the message map, using WM_GETDLGCODE and declaring the function as taking WPARAM, LPARAM and returning LRESULT. Do make sure you don't also include ON_WM_GETDLGCODE.&lt;/p&gt;&lt;p&gt;The message map macros themselves simply produce a table of message number ranges and handler function pointers. The MFC WindowProc scans the table to find a handler for a given message number, then - based on an enumeration value set by the message map macro which indicates the argument types - decodes wParam and lParam, then calls the handler with the appropriate arguments.&lt;/p&gt;&lt;p&gt;Many of the predefined helper message map macros, which usually don't take any arguments, define the function name that you're expected to implement. ON_MESSAGE allows you to specify the function name (as you'd expect, as a generic macro).&lt;/p&gt;&lt;p&gt;The Visual Studio Wizards have always simplified the full power of message maps, not supporting custom message numbers (which you have to use ON_MESSAGE for) and not supporting ranges of command IDs (ON_COMMAND_RANGE, ON_NOTIFY_RANGE, etc). Few people even seem to realise that you can use the same handler function for more than one message map macro, for example if you have discontinuous ranges of control IDs.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-6599518223199766266?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/6599518223199766266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=6599518223199766266' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/6599518223199766266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/6599518223199766266'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2010/03/mfc-message-handling.html' title='MFC message handling'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-556821748965770798</id><published>2009-10-13T22:45:00.001+01:00</published><updated>2009-10-13T22:45:10.334+01:00</updated><title type='text'>Four-and-a-half months</title><content type='html'>&lt;p&gt;&amp;hellip;that&amp;rsquo;s how long I was running Windows 7 RC1 without switching back to my hard disk with Windows Vista. The System event log shows I last booted it on 31 May 2009.&lt;/p&gt;
&lt;p&gt;This is practically the last action I&amp;rsquo;m going to take before wiping this disk &amp;ndash; the &lt;em&gt;Vista &lt;/em&gt;disk &amp;ndash; and installing Windows 7 RTM. Just a little check here and there to find anything that I might not have backed up when transferring over to 7 RC1, then it&amp;rsquo;s formatting time.&lt;/p&gt;
&lt;p&gt;The only thing I&amp;rsquo;ve missed? The extra 200GB of disk space!&lt;/p&gt;
&lt;p&gt;In retrospect Windows Vista has not been a &lt;em&gt;bad&lt;/em&gt; operating system, but it had some pretty rough edges, particularly at the start with poor hardware support. It was a rush 18&amp;ndash;month project, after the initial three-year disaster of Longhorn, and in some areas it&amp;nbsp;shows. Windows 7 has had a further two-and-a-half&amp;nbsp;years to bake, and a further two-and-a-half&amp;nbsp;years of device driver and hardware development; it&amp;rsquo;s not fundamentally different but feels more complete.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-556821748965770798?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/556821748965770798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=556821748965770798' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/556821748965770798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/556821748965770798'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2009/10/four-and-half-months.html' title='Four-and-a-half months'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-4388061429273558608</id><published>2009-07-11T12:47:00.001+01:00</published><updated>2009-07-11T12:47:58.253+01:00</updated><title type='text'>Technical details on Humax problem</title><content type='html'>&lt;p&gt;I thought I&amp;rsquo;d break this into another post so that &lt;a href="http://mikedimmick.blogspot.com/2009/07/downloading-from-your-humax-pvr9200t-on.html"&gt;the fix&lt;/a&gt; is easier to understand for non-technical people.&lt;/p&gt;
&lt;p&gt;Comparing the old and new driver source shows that the definition of the &lt;em&gt;libusb_request&lt;/em&gt; structure had changed. Visual inspection suggested that this was probably the source of the compatibility issue, when using the old DLL with the new driver.&lt;/p&gt;
&lt;p&gt;When using the &lt;em&gt;new&lt;/em&gt; DLL, the following error occurs: &amp;ldquo;The ordinal 76 could not be located in the dynamic link library libusb0.dll.&amp;rdquo; Inspecting the program and DLL shows that while the DLL&amp;rsquo;s entry points are exported by name, the program links to the DLL &lt;em&gt;by ordinal&lt;/em&gt;. This is peculiar; while it&amp;rsquo;s a little faster than string-matching, and it saves a little space, care has to be taken to keep the ordinals the same between versions of a DLL. Reading the .def file shows that the ordinals weren&amp;rsquo;t specified, and that numerous functions were added and removed between the two versions.&lt;/p&gt;
&lt;p&gt;My fix is to add specific ordinal declarations to the .def file for functions that humax.exe is using, so that the correct functions are used. I did this, and recompiled the DLL with the Windows Vista WDK (Windows Driver Kit). Success! Or, at least, as much success as I&amp;rsquo;ve had with Windows XP 32&amp;ndash;bit; the box still has a tendency to hang during file transfer.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.dimmick.demon.co.uk/blog/libusb0.def"&gt;File Attachment: libusb0.def (1 KB)&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-4388061429273558608?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/4388061429273558608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=4388061429273558608' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/4388061429273558608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/4388061429273558608'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2009/07/technical-details-on-humax-problem.html' title='Technical details on Humax problem'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-8253463895724495521</id><published>2009-07-11T12:24:00.001+01:00</published><updated>2009-07-11T12:24:35.286+01:00</updated><title type='text'>Downloading from your Humax PVR9200T on Windows x64</title><content type='html'>&lt;p&gt;The Humax PVR9200T is a pretty good Freeview/digital terrestrial personal video recorder.&amp;nbsp;I&amp;rsquo;ve had mine for a few years now. Over time, the disk fills up with some programmes you want to keep. It&amp;rsquo;s possible to copy recorded programmes from the box to your computer, over USB.&lt;/p&gt;
&lt;p&gt;Unfortunately the supplied eLinker software is not highly-regarded. As a result some replacements have been written, such as &lt;a href="http://www.enigma.eclipse.co.uk/humax/HumaxMediaController.htm"&gt;Humax Media Controller&lt;/a&gt;. However, the driver supplied&amp;nbsp;only works on 32&amp;ndash;bit Windows.&lt;/p&gt;
&lt;p&gt;The USB library and driver used are a &lt;a href="http://libusb-win32.sourceforge.net/"&gt;Win32 port&lt;/a&gt; of &lt;a href="http://libusb.wiki.sourceforge.net/"&gt;libusb&lt;/a&gt;, a driver which makes it possible to write your USB transfers fully in user-mode. &lt;a href="http://sourceforge.net/projects/libusb-win32/files/"&gt;A later version&lt;/a&gt;&amp;nbsp;(0.1.12.2) has both 32&amp;ndash; and 64&amp;ndash;bit versions of the driver. However, the updated driver doesn&amp;rsquo;t work with the libusb0.dll supplied with Media Controller 1.05, and the program won&amp;rsquo;t run if you overwrite it with the new DLL.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve rebuilt the new DLL so it will work with the program. The attached ZIP file contains the new version and the new drivers. To use, extract the contents of the folder. Copy the libusb0.dll in the top-level folder to the Humax Media Controller folder, overwriting the current version. Then, use Update Driver in Device Manager to install the driver from the Driver folder.&lt;/p&gt;
&lt;p&gt;Windows Vista introduced a driver signing requirement for x64, and this driver isn&amp;rsquo;t signed. To get it to load on Windows Vista and Windows 7, reboot, and press F8 until the boot menu appears. From this menu, select Disable Driver Signature Enforcement, then continue to boot normally.&lt;/p&gt;
&lt;p&gt;Hopefully this will help other people with the x64 versions of Windows!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;a href="http://www.dimmick.demon.co.uk/blog/HumaxPVR.zip"&gt;File Attachment: HumaxPVR.zip (78 KB)&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-8253463895724495521?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/8253463895724495521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=8253463895724495521' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/8253463895724495521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/8253463895724495521'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2009/07/downloading-from-your-humax-pvr9200t-on.html' title='Downloading from your Humax PVR9200T on Windows x64'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-7740858848877761509</id><published>2008-07-30T22:29:00.001+01:00</published><updated>2008-07-30T22:29:52.619+01:00</updated><title type='text'>ADSL Router suggestions?</title><content type='html'>&lt;p&gt;OK, I think &lt;a href="http://www.d-link.co.uk/?go=gNTyP9CnptFMIC4AStFCF834mptYIe5XTNvhLPG3yV3oVo5+hKltbNlwaaRp7ywuECrvyi5E+o0L"&gt;my router&lt;/a&gt; has become too hackable. The reliability has hit the toilet, and I&amp;rsquo;ve had two messages from &lt;a href="http://www.demon.net/"&gt;my ISP&lt;/a&gt; warning me that there has been odd traffic. The first time I got a warning message I think I was using BitTorrent at the time, but the second was yesterday at around lunchtime &amp;ndash; when my computers were all off and I was at work.&lt;/p&gt;
&lt;p&gt;So, list of &lt;strike&gt;demands&lt;/strike&gt; requirements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Wired router with a few Ethernet ports&lt;/li&gt;
&lt;li&gt;802.11g WiFi with at least WPA encryption (can&amp;rsquo;t do WPA2 on the handheld)&lt;/li&gt;
&lt;li&gt;Xbox Live compatible&lt;/li&gt;
&lt;li&gt;DHCP implementation that works&lt;/li&gt;
&lt;li&gt;DNS server address passthrough from DHCP server (i.e. I want to use my ISP&amp;rsquo;s DNS servers, not have the box do DNS for me)&lt;/li&gt;
&lt;li&gt;ADSL2+ compatible, for whenever that gets rolled out by Demon&lt;/li&gt;
&lt;li&gt;PPPoA since this is of course a UK requirement&lt;/li&gt;
&lt;li&gt;A firewall that can be completely switched off &lt;em&gt;or&lt;/em&gt; is actually configurable intelligibly&lt;/li&gt;
&lt;li&gt;Not excessively burdened with blinkenlights&lt;/li&gt;
&lt;li&gt;Will be updated &lt;em&gt;regularly&lt;/em&gt; with patches for whatever its OS is&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;That last point is critical. There are way too many routers out there that run Linux and aren&amp;rsquo;t patched. D-Link haven&amp;rsquo;t produced an update since last November and even that&amp;rsquo;s not officially official, you have to find it on the FTP site. The last official update is September 2006.&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t need 802.11n as a) it&amp;rsquo;s still a draft, b) none of my other equipment needs it, and c) 54Mbps is already sufficiently fast to access the Internet. I don&amp;rsquo;t do much copying between devices and I wouldn&amp;rsquo;t do it when they were running on battery anyway.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m half tempted to try building a Windows CE kernel for it myself.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-7740858848877761509?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/7740858848877761509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=7740858848877761509' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/7740858848877761509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/7740858848877761509'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2008/07/adsl-router-suggestions.html' title='ADSL Router suggestions?'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-3367969508722700376</id><published>2008-03-10T01:49:00.001Z</published><updated>2008-03-10T01:49:57.837Z</updated><title type='text'>How do I see what the JIT compiled, anyway?</title><content type='html'>&lt;p&gt;You use the SOS debugger extension&amp;rsquo;s !U command.&lt;/p&gt;
&lt;p&gt;Yeah, that&amp;rsquo;s not very helpful. Here&amp;rsquo;s how to get from that terse description to something useful.&lt;/p&gt;
&lt;p&gt;As an example, let&amp;rsquo;s use the following trivial program:&lt;/p&gt;
&lt;pre&gt;&lt;span class="TPkeyword1"&gt;using &lt;/span&gt;System;

&lt;span class="TPkeyword1"&gt;public class &lt;/span&gt;Simple
&lt;span class="TPbracket"&gt;{&lt;/span&gt;
   &lt;span class="TPkeyword1"&gt;public static int &lt;/span&gt;Main&lt;span class="TPbracket"&gt;()&lt;/span&gt;
   &lt;span class="TPbracket"&gt;{&lt;/span&gt;
       Console&lt;span class="TPoperator"&gt;.&lt;/span&gt;WriteLine&lt;span class="TPbracket"&gt;( &lt;/span&gt;&lt;span class="TPstring"&gt;"Hello World!" &lt;/span&gt;&lt;span class="TPbracket"&gt;)&lt;/span&gt;;
       Console&lt;span class="TPoperator"&gt;.&lt;/span&gt;ReadLine&lt;span class="TPbracket"&gt;()&lt;/span&gt;;
       
       &lt;span class="TPkeyword1"&gt;return &lt;/span&gt;&lt;span class="TPnumber"&gt;0&lt;/span&gt;;
   &lt;span class="TPbracket"&gt;}&lt;/span&gt;
&lt;span class="TPbracket"&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;Dump this snippet into Notepad, save as simple.cs file and compile it. We want to see what it&amp;rsquo;ll be like when the user runs it, so we&amp;rsquo;ll do a release build. From the VS2005 Command Prompt, run &lt;code&gt;csc /debug:pdbonly /o+ simple.cs&lt;/code&gt;. (I find it&amp;rsquo;s quicker to do command-line compiles for&amp;nbsp;simple test programs than firing up Visual Studio. It&amp;rsquo;s not as if we&amp;rsquo;re designing a Form.) If you&amp;rsquo;re doing this on a 64&amp;ndash;bit computer, like me, add &lt;code&gt;/platform:x86&lt;/code&gt; so we get consistent output across platforms. (Marking as x86 means that the executable headers are set to indicate a 32&amp;ndash;bit program. The IL is the same whatever you set here, but if you leave it as &lt;code&gt;anycpu&lt;/code&gt;, the default, the .NET Framework will create a 64&amp;ndash;bit process which obviously gives different output.)&lt;/p&gt;
&lt;p&gt;Why call Console.ReadLine? Well, the JIT compiler is helpful (or at least it thinks it is). If you start a program under the debugger, it will generate less optimized code because it thinks you want to debug it, but that changes the code from what the user will see. So I want to add a stop point in the program so I can attach the debugger after the process has started.&lt;/p&gt;
&lt;p&gt;The next thing you&amp;rsquo;ll need is the &lt;a href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx"&gt;Debugging Tools for Windows kit&lt;/a&gt;. Grab the 32&amp;ndash;bit kit &amp;ndash; the 64&amp;ndash;bit kit can debug&amp;nbsp;32&amp;ndash;bit processes, but SOS (the debugger extension DLL which implements the commands we&amp;rsquo;re going to use) doesn&amp;rsquo;t appear to work. We&amp;rsquo;re going to use WinDBG, which is slightly friendlier than the other debuggers although not a lot!&lt;/p&gt;
&lt;p&gt;Open WinDBG. Run simple.exe and, when it&amp;rsquo;s waiting for input, go to &lt;em&gt;File/Attach to a Process&lt;/em&gt; in WinDBG. You&amp;rsquo;ll see a list of other processes (and if running Windows Vista with UAC enabled, or on XP as a standard user, a load of access denied errors). Select simple.exe from the list and hit OK. WinDBG automatically stops once you&amp;rsquo;ve attached to a process so you can start manipulating the program straight away. This is the output I got:&lt;/p&gt;&lt;pre&gt;Microsoft (R) Windows Debugger Version 6.8.0004.0 X86
Copyright (c) Microsoft Corporation. All rights reserved.

*** wait with pending attach
Symbol search path is: C:\Windows;C:\Windows\System32;C:\Windows\SysWOW64;SRV*C:\WebSymbols*http://msdl.microsoft.com/download/symbols
Executable search path is: 
ModLoad: 008c0000 008c8000   C:\Users\Mike\Documents\Programming\simple.exe
ModLoad: 776a0000 77800000   C:\Windows\SysWOW64\ntdll.dll
ModLoad: 79000000 79046000   C:\Windows\system32\mscoree.dll
ModLoad: 75b70000 75c80000   C:\Windows\syswow64\KERNEL32.dll
ModLoad: 76ce0000 76da6000   C:\Windows\syswow64\ADVAPI32.dll
ModLoad: 76e10000 76f00000   C:\Windows\syswow64\RPCRT4.dll
ModLoad: 75850000 758b0000   C:\Windows\syswow64\Secur32.dll
ModLoad: 75a80000 75ad8000   C:\Windows\syswow64\SHLWAPI.dll
ModLoad: 77110000 771a0000   C:\Windows\syswow64\GDI32.dll
ModLoad: 77040000 77110000   C:\Windows\syswow64\USER32.dll
ModLoad: 76c30000 76cda000   C:\Windows\syswow64\msvcrt.dll
ModLoad: 75d00000 75d60000   C:\Windows\system32\IMM32.DLL
ModLoad: 76940000 76a08000   C:\Windows\syswow64\MSCTF.dll
ModLoad: 75a70000 75a79000   C:\Windows\syswow64\LPK.DLL
ModLoad: 759c0000 75a3d000   C:\Windows\syswow64\USP10.dll
ModLoad: 746c0000 7485e000   C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6001.18000_none_5cdbaa5a083979cc\comctl32.dll
ModLoad: 79e70000 7a3ff000   C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
ModLoad: 75390000 7542b000   C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.1434_none_d08b6002442c891f\MSVCR80.dll
ModLoad: 75e30000 7693f000   C:\Windows\syswow64\shell32.dll
ModLoad: 771b0000 772f4000   C:\Windows\syswow64\ole32.dll
ModLoad: 790c0000 79bf6000   C:\Windows\assembly\NativeImages_v2.0.50727_32\mscorlib\5b3e3b0551bcaa722c27dbb089c431e4\mscorlib.ni.dll
ModLoad: 79060000 790b6000   C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll
(1dc.12b4): Break instruction exception - code 80000003 (first chance)
eax=7efaf000 ebx=00000000 ecx=00000000 edx=7770d2d4 esi=00000000 edi=00000000
eip=776b0004 esp=04c6fa00 ebp=04c6fa2c iopl=0         nv up ei pl zr na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246
ntdll!DbgBreakPoint:
776b0004 cc              int     3
&lt;/pre&gt;
&lt;p&gt;You enter your debugging commands in the edit box at the bottom, next to the prompt 0:003&amp;gt;. This means we&amp;rsquo;re&amp;nbsp;debugging the 0th process we&amp;rsquo;re attached to,&amp;nbsp;and our commands by default apply to thread number 3. Four threads? Well, thread 0 is our main thread, thread 1 was created by the&amp;nbsp;CLR&amp;rsquo;s debugging support in case we attached a debugger, thread 2 is the finalizer thread, and thread 3 was just created by WinDBG so it could stop the process safely. (You can see this by running ~* k, although you&amp;rsquo;ll need to be set up to get debugging symbols from the symbol server to get good stack traces.) The Debugging Tools debuggers automatically stop the process when you attach, so that you can start manipulating the process straight away.&lt;/p&gt;
&lt;p&gt;The first thing we need to do is ask WinDBG to load the SOS extension.&amp;nbsp;This is installed with the CLR, so we ask it to load from the same folder that mscorwks.dll (the DLL which implements the virtual machine, effectively the guts of the CLR) lives in:&lt;/p&gt;&lt;pre&gt;0:003&amp;gt; .loadby sos.dll mscorwks&lt;/pre&gt;
&lt;p&gt;Now we can see what state of the managed threads are in by running !threads. Any command beginning ! comes from a debugger extension DLL, and they can be disambiguated if necessary, but they&amp;rsquo;re searched in reverse order loaded (last loaded = first searched) so anything we want will be found in SOS anyway.&lt;/p&gt;
&lt;p&gt;Right. To see what we can do, run !help.&lt;/p&gt;&lt;pre&gt;0:003&amp;gt; !help
-------------------------------------------------------------------------------
SOS is a debugger extension DLL designed to aid in the debugging of managed
programs. Functions are listed by category, then roughly in order of
importance. Shortcut names for popular functions are listed in parenthesis.
Type "!help &lt;FUNCTIONNAME&gt;" for detailed info on that function. 

Object Inspection                  Examining code and stacks
-----------------------------      -----------------------------
DumpObj (do)                       Threads
DumpArray (da)                     CLRStack
DumpStackObjects (dso)             IP2MD
DumpHeap                           U
DumpVC                             DumpStack
GCRoot                             EEStack
ObjSize                            GCInfo
FinalizeQueue                      EHInfo
PrintException (pe)                COMState
TraverseHeap                       BPMD 

Examining CLR data structures      Diagnostic Utilities
-----------------------------      -----------------------------
DumpDomain                         VerifyHeap
EEHeap                             DumpLog
Name2EE                            FindAppDomain
SyncBlk                            SaveModule
DumpMT                             GCHandles
DumpClass                          GCHandleLeaks
DumpMD                             VMMap
Token2EE                           VMStat
EEVersion                          ProcInfo 
DumpModule                         StopOnException (soe)
ThreadPool                         MinidumpMode 
DumpAssembly                       
DumpMethodSig                      Other
DumpRuntimeTypes                   -----------------------------
DumpSig                            FAQ
RCWCleanupList
DumpIL&lt;/pre&gt;
&lt;p&gt;To find out a little more about !U, let&amp;rsquo;s run !help U:&lt;/p&gt;&lt;pre&gt;0:003&amp;gt; !help U
-------------------------------------------------------------------------------
!U [-gcinfo] [-ehinfo] &amp;lt;MethodDesc address&amp;gt; | &amp;lt;Code address&amp;gt; &lt;code address&gt;

Presents an annotated disassembly of a managed method when given a MethodDesc
pointer for the method, or a code address within the method body. Unlike the
debugger "U" function, the entire method from start to finish is printed,
with annotations that convert metadata tokens to names.

&lt;example output&gt;
...
03ef015d b901000000       mov     ecx,0x1
03ef0162 ff156477a25b     call   dword ptr [mscorlib_dll+0x3c7764 (5ba27764)] (System.Console.InitializeStdOutError(Boolean), mdToken: 06000713)
03ef0168 a17c20a701       mov     eax,[01a7207c] (Object: SyncTextWriter)
03ef016d 89442414         mov     [esp+0x14],eax

If you pass the -gcinfo flag, you'll get inline display of the GCInfo for
the method. You can also obtain this information with the !GCInfo command.

If you pass the -ehinfo flag, you'll get inline display of exception info
for the method. (Beginning and end of try/finally/catch handlers, etc.).
You can also obtain this information with the !EHInfo command.&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Right, so we need the address of a MethodDesc structure, or the address of the code itself. How can we get one of these? There&amp;rsquo;s a command called DumpMD&amp;hellip;&lt;/p&gt;&lt;pre&gt;0:003&amp;gt; !help dumpmd
-------------------------------------------------------------------------------
!DumpMD &lt;methoddesc address&gt;

This command lists information about a MethodDesc. You can use !IP2MD to turn 
a code address in a managed function into a MethodDesc:

0:000&amp;gt; !dumpmd 902f40
Method Name: Mainy.Main()
Class: 03ee1424
MethodTable: 009032d8
mdToken: 0600000d
Module: 001caa78
IsJitted: yes
m_CodeOrIL: 03ef00b8

If IsJitted is "yes," you can run !U on the m_CodeOrIL pointer to see a 
disassembly of the JITTED code. You can also call !DumpClass, !DumpMT, 
!DumpModule on the Class, MethodTable and Module fields above.
&lt;/pre&gt;
&lt;p&gt;We&amp;rsquo;re getting a bit closer. Let&amp;rsquo;s try DumpModule&amp;hellip;&lt;/p&gt;&lt;pre&gt;0:003&amp;gt; !help DumpModule
-------------------------------------------------------------------------------
!DumpModule [-mt] &lt;module address&gt;

You can get a Module address from !DumpDomain, !DumpAssembly and other 
functions. Here is sample output:

0:000&amp;gt; !dumpmodule 1caa50
Name: C:\pub\unittest.exe
Attributes: PEFile
Assembly: 001ca248
LoaderHeap: 001cab3c
TypeDefToMethodTableMap: 03ec0010
TypeRefToMethodTableMap: 03ec0024
MethodDefToDescMap: 03ec0064
FieldDefToDescMap: 03ec00a4
MemberRefToDescMap: 03ec00e8
FileReferencesMap: 03ec0128
AssemblyReferencesMap: 03ec012c
MetaData start address: 00402230 (1888 bytes)

The Maps listed map metadata tokens to CLR data structures. Without going into 
too much detail, you can examine memory at those addresses to find the 
appropriate structures. For example, the TypeDefToMethodTableMap above can be 
examined:

0:000&amp;gt; dd 3ec0010
03ec0010  00000000 00000000 0090320c 0090375c
03ec0020  009038ec ...

This means TypeDef token 2 maps to a MethodTable with the value 0090320c. You 
can run !DumpMT to verify that. The MethodDefToDescMap takes a MethodDef token 
and maps it to a MethodDesc, which can be passed to !DumpMD.

There is a new option "-mt", which will display the types defined in a module,
and the types referenced by the module. For example:

0:000&amp;gt; !dumpmodule -mt 1aa580
Name: C:\pub\unittest.exe
...&lt;etc&gt;...
MetaData start address: 0040220c (1696 bytes)

Types defined in this module

      MT    TypeDef Name
------------------------------------------------------------------------------
030d115c 0x02000002 Funny
030d1228 0x02000003 Mainy

Types referenced in this module

      MT    TypeRef Name
------------------------------------------------------------------------------
030b6420 0x01000001 System.ValueType
030b5cb0 0x01000002 System.Object
030fceb4 0x01000003 System.Exception
0334e374 0x0100000c System.Console
03167a50 0x0100000e System.Runtime.InteropServices.GCHandle
0336a048 0x0100000f System.GC&lt;/pre&gt;
&lt;p&gt;We still need a Module to pass to this command, but we&amp;rsquo;re getting there. Maybe DumpDomain can help us? I&amp;rsquo;ll skip the help text this time.&lt;/p&gt;&lt;pre&gt;0:003&amp;gt; !DumpDomain
--------------------------------------
System Domain: 7a3bc8b8
LowFrequencyHeap: 7a3bc8dc
HighFrequencyHeap: 7a3bc934
StubHeap: 7a3bc98c
Stage: OPEN
Name: None
--------------------------------------
Shared Domain: 7a3bc560
LowFrequencyHeap: 7a3bc584
HighFrequencyHeap: 7a3bc5dc
StubHeap: 7a3bc634
Stage: OPEN
Name: None
Assembly: 0052f848
--------------------------------------
Domain 1: 00516800
LowFrequencyHeap: 00516824
HighFrequencyHeap: 0051687c
StubHeap: 005168d4
Stage: OPEN
SecurityDescriptor: 00517d30
Name: simple.exe
Assembly: 0052f848 [C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll]
ClassLoader: 0050e470
SecurityDescriptor: 0051f5d0
  Module Name
790c2000 C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll

Assembly: 00535ac0 [C:\Users\Mike\Documents\Programming\simple.exe]
ClassLoader: 0050e630
SecurityDescriptor: 00535a38
  Module Name
000f2c3c C:\Users\Mike\Documents\Programming\simple.exe&lt;/pre&gt;
&lt;p&gt;At last, we have the address of something we can use. Let&amp;rsquo;s get the module information for simple.exe. For that we need the address next to it in the module list for the simple.exe assembly.&lt;/p&gt;&lt;pre&gt;0:003&amp;gt; !dumpmodule -mt f2c3c
Name: C:\Users\Mike\Documents\Programming\simple.exe
Attributes: PEFile 
Assembly: 00535ac0
LoaderHeap: 00000000
TypeDefToMethodTableMap: 000f0038
TypeRefToMethodTableMap: 000f0040
MethodDefToDescMap: 000f005c
FieldDefToDescMap: 000f0068
MemberRefToDescMap: 000f006c
FileReferencesMap: 000f0088
AssemblyReferencesMap: 000f008c
MetaData start address: 008c206c (740 bytes)

Types defined in this module

      MT    TypeDef Name
------------------------------------------------------------------------------
000f3030 0x02000002 Simple

Types referenced in this module

      MT    TypeRef Name
------------------------------------------------------------------------------
790fd0f0 0x01000001 System.Object
79101118 0x01000006 System.Console
&lt;/pre&gt;
&lt;p&gt;Now we can get the MethodTable for the Simple class:&lt;/p&gt;&lt;pre&gt;0:003&amp;gt; !dumpmt -md f3030
EEClass: 000f1174
Module: 000f2c3c
Name: Simple
mdToken: 02000002  (C:\Users\Mike\Documents\Programming\simple.exe)
BaseSize: 0xc
ComponentSize: 0x0
Number of IFaces in IFaceMap: 0
Slots in VTable: 6
--------------------------------------
MethodDesc Table
   Entry MethodDesc      JIT Name
79371278   7914b928   PreJIT System.Object.ToString()
7936b3b0   7914b930   PreJIT System.Object.Equals(System.Object)
7936b3d0   7914b948   PreJIT System.Object.GetHashCode()
793624d0   7914b950   PreJIT System.Object.Finalize()
00310070   000f3020      JIT Simple.Main()
000fc01c   000f3028     NONE Simple..ctor()&lt;/pre&gt;
&lt;p&gt;Finally we have something we can pass to !U. Note the JIT column. Here, PreJIT means that the code has come from a native image generated by ngen, JIT means that the JIT compiler in this process has generated the code, and NONE means that the method hasn&amp;rsquo;t been compiled yet. We didn&amp;rsquo;t override any of System.Object&amp;rsquo;s virtual methods, so they occupy the first four places in our MethodTable.&lt;/p&gt;
&lt;p&gt;I placed the call to Console.ReadLine at the end of the program so everything has already been compiled &amp;ndash; remember, the JIT compiles code on-demand, one method at a time, when that method is called (barring very simple methods which might be inlined into their callers). Let&amp;rsquo;s just get on and show the code for Main.&lt;/p&gt;&lt;pre&gt;0:003&amp;gt; !U f3020
Normal JIT generated code
Simple.Main()
Begin 00310070, size 36
00310070 833d8c10920300  cmp     dword ptr ds:[392108Ch],0
00310077 750a            jne     00310083
00310079 b901000000      mov     ecx,1
0031007e e8e1580579      call    mscorlib_ni+0x2a5964 (79365964) (System.Console.InitializeStdOutError(Boolean), mdToken: 06000770)
00310083 8b0d8c109203    mov     ecx,dword ptr ds:[392108Ch] (Object: System.IO.TextWriter+SyncTextWriter)
00310089 8b153c309203    mov     edx,dword ptr ds:[392303Ch] ("Hello World!")
0031008f 8b01            mov     eax,dword ptr [ecx]
00310091 ff90d8000000    call    dword ptr [eax+0D8h]
00310097 e84c750d79      call    mscorlib_ni+0x3275e8 (793e75e8) (System.Console.get_In(), mdToken: 0600076e)
0031009c 8bc8            mov     ecx,eax
0031009e 8b01            mov     eax,dword ptr [ecx]
003100a0 ff5064          call    dword ptr [eax+64h]
003100a3 33c0            xor     eax,eax
003100a5 c3              ret&lt;/pre&gt;
&lt;p&gt;Interesting. The JIT clearly sees Console.WriteLine(string) and Console.ReadLine as trivial and has inlined the calls. In turn it&amp;rsquo;s inlined Console.get_Out. The reference to SyncTextWriter isn&amp;rsquo;t the JIT being clever &amp;ndash; it&amp;rsquo;s SOS telling us that the address 0x0392108C is the base of SyncTextWriter&amp;rsquo;s vtable, as this call to TextWriter.WriteLine(string) is virtual.&lt;/p&gt;
&lt;p&gt;I realise, and hope, that this isn&amp;rsquo;t everyday usage. More often than not you&amp;rsquo;ll have crashed somewhere and want to find out where (for which see !IP2MD). But it can be useful to see just how your C# code turns into machine instructions.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-3367969508722700376?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/3367969508722700376/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=3367969508722700376' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/3367969508722700376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/3367969508722700376'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2008/03/how-do-i-see-what-jit-compiled-anyway.html' title='How do I see what the JIT compiled, anyway?'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-2536762942274150721</id><published>2008-03-10T00:13:00.001Z</published><updated>2008-03-10T00:13:09.268Z</updated><title type='text'>What the heck does 'rep ret' mean?</title><content type='html'>&lt;p&gt;I was looking at what the .NET&amp;nbsp;x64 JIT compiler generates for some code, and saw something very odd at the end of the routine: the last instruction of the function was &lt;code&gt;rep ret&lt;/code&gt;. Looking a bit further, this is the same at the end of &lt;em&gt;every&lt;/em&gt; JIT-compiled routine.&lt;/p&gt;
&lt;p&gt;The thing is, the &lt;code&gt;rep&lt;/code&gt; prefix to an instruction is supposed to tell it to be repeated. Repeat the return? How do I do that?&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://developer.intel.com/products/processor/manuals/index.htm"&gt;Intel architecture software developer&amp;rsquo;s manual set&lt;/a&gt; says it&amp;rsquo;s only defined for the &amp;lsquo;string&amp;rsquo; instructions like &lt;code&gt;movs&lt;/code&gt; (which moves a byte/word/dword from the address pointed to by ESI to the address pointed to by EDI). The rep prefix repeats the string instruction ECX times. Yes, this means that you can implement &lt;code&gt;memcpy&lt;/code&gt; in a single instruction. (You can do &lt;code&gt;memset&lt;/code&gt; with a single &lt;code&gt;rep stos&lt;/code&gt; instruction, once AL is loaded with the value to be stored.) It&amp;rsquo;s explicitly undefined for anything else.&lt;/p&gt;
&lt;p&gt;So where the heck has this illegal usage come from? I followed a couple of clues and found &lt;a href="http://sourceware.org/ml/libc-alpha/2004-12/msg00022.html"&gt;this patch notification&lt;/a&gt; for glibc on x64. And indeed &lt;a href="http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/25112.PDF"&gt;the current version of AMD&amp;rsquo;s optimization guide&lt;/a&gt;&amp;nbsp;[PDF] for Athlon 64 processors says that you should do this. The reason? The branch predictor gets it wrong if the &lt;code&gt;ret&lt;/code&gt; instruction is jumped to directly by a branch instruction, or if the &lt;code&gt;ret&lt;/code&gt; directly follows a branch instruction.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m not sure doing it throughout, even when you&amp;rsquo;ve got epilog code in there which prevents the bug, is necessary though.&lt;/p&gt;
&lt;p&gt;AMD have now published &lt;a href="http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/40546.pdf"&gt;a new optimization guide for their Family 10h processors&lt;/a&gt; [PDF] and guess what, the advice has changed. Instead of using a two-byte illegal instruction, they now recommend the &lt;em&gt;three-&lt;/em&gt;byte instruction &lt;code&gt;ret 0&lt;/code&gt;. The difference between a plain &lt;code&gt;ret&lt;/code&gt; and a &lt;code&gt;ret&lt;/code&gt; &lt;em&gt;imm16&lt;/em&gt; (where &lt;em&gt;imm16&lt;/em&gt; is an immediate 16&amp;ndash;bit value) is that &lt;code&gt;ret&lt;/code&gt; &lt;em&gt;imm16&lt;/em&gt; pops the return address, then specified number of bytes from the stack before jumping to the return address. It&amp;rsquo;s common to see this in 32&amp;ndash;bit Windows &lt;code&gt;WINAPI&lt;/code&gt; (&lt;code&gt;__stdcall&lt;/code&gt;) code as this calling convention requires the called function to clean up the parameters from the stack. (64&amp;ndash;bit Windows has only one calling convention and it mainly passes parameters in registers, so stack cleanup is not required.&lt;/p&gt;
&lt;p&gt;Still, it&amp;rsquo;s a shame to see the JIT generating this on my Core 2 Duo laptop, which doesn&amp;rsquo;t have the bug (as far as I know, but there&amp;rsquo;s no mention in Intel&amp;rsquo;s optimization guide). And it&amp;rsquo;s an even bigger shame on AMD that they a) didn&amp;rsquo;t fix the damn bug in the processor and b) recommended an illegal instruction as a way round it.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-2536762942274150721?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/2536762942274150721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=2536762942274150721' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/2536762942274150721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/2536762942274150721'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2008/03/what-heck-does-ret-mean.html' title='What the heck does &amp;#39;rep ret&amp;#39; mean?'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-8857333573167495859</id><published>2008-01-13T23:32:00.001Z</published><updated>2008-01-25T16:19:14.984Z</updated><title type='text'>BT and the case of the missing DSL service</title><content type='html'>&lt;p&gt;Recently, at the end of September, I got a new neighbour in the flat downstairs. The property is an end terrace, split into two flats in 1999, but the landlady never did a great job of separating the services out (electricity and gas usage is included in the meter counts downstairs, there isn’t a separate supply). When I moved in, the landlady lived downstairs; she allowed a previous tenant of this flat to put in extension wiring to use her old BT landline, as she’d got cable service with NTL (now Virgin Cable, of course), so I was using the BT line. After leaving, other tenants of the downstairs flat had simply taken over the cable service.&lt;/p&gt;
&lt;p&gt;When the new bloke moved in downstairs, he wanted a BT service. He claims that he asked them for a new line – they interpreted this to mean taking over the old one, and started the process of transferring &lt;em&gt;my&lt;/em&gt; line to him. First I knew of this was a letter dated 16 October saying “we understand you no longer live at the above address and so we’ll disconnect the phone on 30 October.” Obviously I phoned up straight away and said no, I’m not leaving, please cancel this transfer. They prevaricated a bit, then said, “oh, I can’t cancel this on your say-so, the person ordering has to cancel.” Fine, I say – can I give him a direct number to contact you? “Nope.”&lt;/p&gt;
&lt;p&gt;Anyway, I ask the new guy if that’s OK, he says he got fed up of BT trying to transfer the line and went with cable anyway, and he’d been trying to get through to cancel and would try again. A day or so later he tells me he’s cancelled and I don’t think any more about it.&lt;/p&gt;
&lt;p&gt;In early November my parents tell me they couldn’t get through. (They didn’t &lt;em&gt;actually&lt;/em&gt; tell me they were getting a message saying ‘number not in service.’) A few days into November, suddenly, no connection. A horror begins to dawn on me, and my neighbour – &lt;em&gt;BT have gone ahead and done it anyway&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Now comes the reason for the tale. &lt;em&gt;Most of the time I can’t get through to BT Customer Service, even if I wait for half an hour on the phone&lt;/em&gt;. The first time I get off hold, there’s silence for a few seconds and the line goes dead. Next time I’ve apparently called the wrong department and they try to transfer me, but again I end up on hold for half an hour (when I give up). After several goes of this I go for an end-around: I call sales and ask for the line to be transferred back to me.&lt;/p&gt;
&lt;p&gt;No problem, says the salesman, but there’s a 12–month minimum contract and you can’t have the line until the 27th of November, unless the current customer cancels before that, oh, and you can’t have your old number back. I did try explaining but it seemed futile. Actually I got pretty angry which I did apologise for.&lt;/p&gt;
&lt;p&gt;I thought about it for a couple of days and decided to do what should have been done a &lt;em&gt;very&lt;/em&gt; long time ago – get a separate line terminating in this flat. You’d expect that to take a long time, right? Longer than transferring the billing from one customer to another?&lt;/p&gt;
&lt;p&gt;Nope. I could have it put in on the 20th. So I paid my £125 (£125!) and got it done.&lt;/p&gt;
&lt;p&gt;Unfortunately you can’t order DSL until the phone line is in your name and it appears, under the new number, in BT’s database. So the earliest I could order ADSL was the afternoon of the 20th, then it takes another 14 days or so, taking us to an official activation date of 7 December. I got straight through to Demon sales on practically the first ring. They said I couldn’t have my old hostname/website/email address back initially but once activated I could ask for it back.&lt;/p&gt;
&lt;p&gt;The 27th came and went and I suddenly realised I hadn’t cancelled the transfer! Never fear, either the second BT salesman cancelled it for me, or (more likely) they cocked up again. My neighbour still hasn’t managed to cancel and I think he’s refusing to pay.&lt;/p&gt;
&lt;p&gt;Finally I got DSL back on the 6th, called up Demon support (got through on first ring again) and got my old hostname back, but the contents of my website were lost. So there are a lot of broken images around here, and if you emailed me in November, I didn’t get it.&lt;/p&gt;
&lt;p&gt;I’d always heard that NTL, Telewest, and the unbundled broadband suppliers had worse customer service than BT. If it’s worse than BT they must send round people with pitchforks to stab you with if you even dream of calling them.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-8857333573167495859?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/8857333573167495859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=8857333573167495859' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/8857333573167495859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/8857333573167495859'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2008/01/bt-and-case-of-missing-dsl-service.html' title='BT and the case of the missing DSL service'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-9173699721259443372</id><published>2008-01-13T22:58:00.001Z</published><updated>2008-01-13T22:58:33.698Z</updated><title type='text'>Return of Best Error Page</title><content type='html'>&lt;p&gt;&lt;a href="http://www.codeproject.com/"&gt;CodeProject&lt;/a&gt;&amp;rsquo;s one of my favourite sites &amp;ndash; indeed, one of the few real regular sites I visit &amp;ndash; but it&amp;rsquo;s always had a bit of a problem with errors and with the load on the servers. I commented on this before, but sadly the image is gone &amp;ndash; lost when my DSL account was closed (BT cock-up, nothing to do with Demon).&lt;/p&gt;
&lt;p&gt;Anyway, they recently moved to an all-new ASP.NET implementation of their forums, but unfortunately the errors are still a common occurrence. And the error in the error handler is back:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Error - Windows Internet Explorer" src="http://www.dimmick.demon.co.uk/blog/Error_20_2D_20Windows_20Internet_20Explorer.png" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;(Yes, running Vista now.)&lt;/p&gt;
&lt;p&gt;One of the things I love most about CP is the more&amp;hellip; &lt;em&gt;relaxed&lt;/em&gt; attitude to reporting problems.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-9173699721259443372?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/9173699721259443372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=9173699721259443372' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/9173699721259443372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/9173699721259443372'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2008/01/return-of-best-error-page.html' title='Return of Best Error Page'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-7605945000034532337</id><published>2007-12-07T04:12:00.001Z</published><updated>2007-12-07T04:12:36.584Z</updated><title type='text'>Calling out EMBASSY Trust Suite</title><content type='html'>&lt;p&gt;Dear &lt;a href="http://www.wavesys.com/products/ets.html"&gt;Wave Systems&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Fuck right off.&lt;/p&gt;
&lt;p&gt;When I bought my Dell Latitude D820 laptop, I went through and deleted a certain amount of the shovelware that was preinstalled, but some of it, to be honest, I didn&amp;rsquo;t know what it did. I tried to work out what EMBASSY Trust Suite did, and it seems to be something to do with the Trusted Platform Module in the system. Encrypting files using the TPM key, or something like that.&lt;/p&gt;
&lt;p&gt;Charles Petzold wrote &lt;a href="http://www.charlespetzold.com/blog/2007/12/Computers-Randomness-Alan-Turing.html"&gt;an article&lt;/a&gt; yesterday commenting on random number generators, and I added a comment earlier on mentioning in passing the reported flaw in CryptGenRandom. I decided to see if this seemed to be the case in XP SP2. My answer was inconclusive, as the assembler was hard to follow. By chance I was debugging Internet Explorer with WinDBG (easiest way to force the RSA Enhanced Cryptographic Provider, rsaenh.dll, to load so I could disassemble it) and noticed an odd number of access violation exceptions occurring when I accidentally did a search in the instance of IE I was debugging. That&amp;rsquo;s weird, I thought &amp;ndash; where am I on the stack?&lt;/p&gt;
&lt;p&gt;In wxvault.dll. The stack trace was:&lt;/p&gt;&lt;pre&gt;0012c888 100065ee wxvault+0x7967&lt;br /&gt;0012cac4 42f8c769 wxvault+0x65ee&lt;br /&gt;0012cadc 42f8cdc9 IEFRAME!PathFileExistsW+0x24&lt;br /&gt;0012cb14 42f8ccf7 IEFRAME!HelperForReadIconInfoFromPropStore+0x97&lt;br /&gt;0012cb98 42f78e53 IEFRAME!CInternetShortcut::_GetIconLocationWithURLHelper+0x156&lt;/pre&gt;
&lt;p&gt;Looks like we&amp;rsquo;re trying to get the favourite icon for the address bar. But how is IEFRAME calling into wxvault? Microsoft can&amp;rsquo;t know that this library exists. Is there something on the stack that somehow isn&amp;rsquo;t being included (can happen if a function was compiled with the Frame Pointer omitted and no symbols are available to get FPO data [which tells the debugger how to fix up]). Let&amp;rsquo;s disassemble around PathFileExistsW:&lt;/p&gt;&lt;pre&gt;42f8c75e ff7508&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; dword ptr [ebp+8]&lt;br /&gt;42f8c761 8bf8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; edi,eax&lt;br /&gt;42f8c763 ff152c13ef42&amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; dword ptr [IEFRAME!_imp__GetFileAttributesW (42ef132c)]&lt;br /&gt;42f8c769 83f8ff&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; eax,0FFFFFFFFh&lt;/pre&gt;
&lt;p&gt;That&amp;rsquo;s weird, we called into GetFileAttributesW. How did we end up in wxvault?&lt;/p&gt;&lt;pre&gt;0:000&amp;gt; u kernel32!GetFileAttributesW&lt;br /&gt;kernel32!GetFileAttributesW:&lt;br /&gt;7c80b74c e965ae7f93&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;jmp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wxvault+0x65b6 (100065b6)&lt;/strong&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Evil!&lt;/strong&gt; They patched the running instance of kernel32! What else have they patched?&lt;/p&gt;&lt;pre&gt;kernel32!CreateFileW:&lt;br /&gt;7c810760 e9d0587f93&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; jmp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wxvault+0x6035 (10006035)&lt;/pre&gt;
&lt;p&gt;Note how they&amp;rsquo;ve failed to rebase the DLL, using the default 0x10000000 base address, making it collide with &lt;em&gt;everything ever&lt;/em&gt; which also uses that default address.&lt;/p&gt;
&lt;p&gt;Needless to say this is going to get uninstalled as soon as I take a full backup of the laptop! In my book, this is a user-mode rootkit. I don&amp;rsquo;t use the feature, so it&amp;rsquo;s going.&lt;/p&gt;
&lt;p&gt;How &lt;em&gt;should&lt;/em&gt; they have implemented this? Well, I&amp;rsquo;d start by seeing if it&amp;rsquo;s possible to change the algorithm for the Encrypting File System. It should be, it&amp;rsquo;s implemented using the Cryptographic API and CSPs (involving callbacks into LSASS in usermode!), so I would have thought that simply providing your own CSP would be sufficient.&lt;/p&gt;
&lt;p&gt;If that&amp;rsquo;s not possible, my next port of call would be a file system filter driver. That would have the downside (like this) that every file system call would go through it, rather than the tiny amount of calls which actually target a file encrypted in this way.&lt;/p&gt;
&lt;p&gt;The access violation looks like it might ultimately be caused by a bug in IE&amp;nbsp;&amp;ndash; it looks like IE tried to pass the URL to the favicon to GetFileAttributesW, which I would &lt;em&gt;hope&lt;/em&gt; would fail (or would it try to invoke WebDAV?)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-7605945000034532337?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/7605945000034532337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=7605945000034532337' title='20 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/7605945000034532337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/7605945000034532337'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2007/12/calling-out-embassy-trust-suite.html' title='Calling out EMBASSY Trust Suite'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>20</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-104327928488229551</id><published>2007-11-04T20:09:00.001Z</published><updated>2007-11-04T20:09:12.516Z</updated><title type='text'>VS2005 Smart Device projects don't Dispose components</title><content type='html'>&lt;p&gt;I&amp;rsquo;ve posted about this &lt;a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=305534"&gt;on Connect&lt;/a&gt;&amp;nbsp;and &lt;a href="http://www.codeproject.com/lounge.asp?msg=2278607#xx2278607xx"&gt;on Codeproject&amp;rsquo;s Lounge&lt;/a&gt;, and informed my colleagues, but not yet on here. I realise I&amp;rsquo;m repeating myself for some of my audience, but this is in a more readily searchable location.&lt;/p&gt;
&lt;p&gt;I was trying to work out why Compact Framework applications seemed to be consuming a fair amount of memory, often causing the division between Program and Storage memory on Pocket PC 2003 to shift greatly toward Program, often causing inability to create files. I created a simple Windows Mobile 5.0 application with two forms, both with menu bars with actions on them, and had the first form continually create and destroy the second. I then loaded up &lt;a href="http://blogs.msdn.com/stevenpr/archive/2006/04/17/577636.aspx"&gt;.NET Compact Framework Remote Performance Monitor&lt;/a&gt;&amp;nbsp;to monitor the application. I was seeing 400KB+ of GC heap still being used after a collection. Looking at the GC heap (in .NET CF 2.0 SP2&amp;rsquo;s RPM) showed that a large number of instances of the second form were still referenced.&lt;/p&gt;
&lt;p&gt;Drilling down showed that the MainMenu and MenuItem objects that had been owned by the forms were still rooted, &lt;em&gt;by their finalizers &lt;/em&gt;(shown&amp;nbsp;as [root: Finalizer]). The forms were still referenced because I had event handlers connected to the menu items. That meant that all the other controls on the form were also still referenced, by the members of the form class.&lt;/p&gt;
&lt;p&gt;To understand why they&amp;rsquo;re still rooted, even after GC, you have to know how finalization works. When a GC occurs, the collector marks every object that&amp;rsquo;s referenced by following roots, then sweeps away all those objects that are no longer referenced. When doing the sweep phase, if the object requires finalization (i.e. implements a Finalize method and GC.SuppressFinalize has not been called for that object), instead of actually being deleted and the memory reclaimed, it is placed on a finalization queue. This in itself is a source of roots. The finalizer is not run during the GC itself to reduce the time spent in GC. Instead, a separate &lt;em&gt;finalizer thread&amp;nbsp;&lt;/em&gt;processes the queue of objects to be finalized. The object will continue to be reported to GC until its finalizer is run, so may survive multiple GCs if memory demand is high and the finalizers are slow.&lt;/p&gt;
&lt;p&gt;The reason I recommend that as far as is possible, you avoid the finalizer is that unless you&amp;rsquo;re very careful, you can end up with thread affinity problems (trying to destroy something from the wrong thread, or having to marshal back to the creating thread) and you can end up blocking the finalizer thread indefinitely. The issue of freeing memory later than would otherwise be possible&amp;nbsp;isn&amp;rsquo;t as much of an issue on the desktop, but it also affects GC&amp;rsquo;s tuning of how often to run. It&amp;rsquo;s definitely an issue on the limited memory available on devices.&amp;nbsp;For more on how GC works in the Compact Framework, see Steven Pratschner&amp;rsquo;s &amp;ldquo;&lt;a href="http://blogs.msdn.com/stevenpr/archive/2004/07/26/197254.aspx"&gt;Overview of the .NET Compact Framework Garbage Collector&lt;/a&gt;&amp;rdquo;. I&amp;rsquo;ve recommended before that &lt;a href="http://mikedimmick.blogspot.com/2006/08/you-must-call-dispose.html"&gt;you always call Dispose&lt;/a&gt;, on any object that implements it (although I&amp;rsquo;ve discovered it &lt;em&gt;isn&amp;rsquo;t&lt;/em&gt; safe to Dispose the Graphics object passed to you in a PaintEventArgs structure).&lt;/p&gt;
&lt;p&gt;So where does the finalizer come from? I studied the assemblies in &lt;a href="http://www.aisto.com/roeder/dotnet/"&gt;Reflector&lt;/a&gt;. A side note here: the assemblies in Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE do not actually contain the IL code, only the metadata. For the actual implementation see under SmartDevices\SDK\CompactFramework\2.0\v2.0\Debugger\BCL. Recent versions of Reflector will load assemblies from this location when you create a new assembly list in the File, Open List dialog (or when starting a newly downloaded&amp;nbsp;copy, for the default list).&lt;/p&gt;
&lt;p&gt;In Compact Framework 2.0, the System.ComponentModel.Component class implements a finalizer, so anything which derives from this class automatically gets one too. (It calls the virtual Dispose(bool) method, passing false as the parameter). The Dispose method in this class calls GC.SuppressFinalize, so if you dispose of&amp;nbsp;a component&amp;nbsp;properly, it won&amp;rsquo;t end up on the finalization queue. This matches what the desktop Framework has done since .NET 1.1 at least (I don&amp;rsquo;t have 1.0 installed to check).&lt;/p&gt;
&lt;p&gt;For both desktop and device projects, a newly-created form declares a &lt;em&gt;components&lt;/em&gt; member of type System.ComponentModel.Container, to contain the components dragged onto the designer surface. A Dispose(bool) override is generated for you (in Form.Designer.cs/.vb, for .NET 2.0 projects) which calls Dispose on the container, if &lt;em&gt;components&lt;/em&gt; is not null.&amp;nbsp;(Presumably the intent was that the container wouldn&amp;rsquo;t be created until needed, but in fact the initial code in InitializeComponent for a new form does create a Container and assigns it to &lt;em&gt;components&lt;/em&gt;.) Container&amp;rsquo;s Dispose method disposes anything that was added to the container.&lt;/p&gt;
&lt;p&gt;For a desktop project, when you drop something that derives from IComponent (I think) onto the form, and which doesn&amp;rsquo;t derive from Control, the designer generates code to add that component to the container, so it will be disposed of when the form is disposed. Simple. However &amp;ndash; and here&amp;rsquo;s the bug &amp;ndash; &lt;em&gt;the device designer doesn&amp;rsquo;t&lt;/em&gt;. In fact it even deletes the creation of the Container object. Result, all your components end up running their finalizer, and thereby consuming memory past the first GC after they died, potentially increasing the overall memory use of the process.&lt;/p&gt;
&lt;p&gt;To avoid the problem, you have to write the code to dispose the components yourself. The most straightforward way is to add the code that Visual Studio &lt;em&gt;should &lt;/em&gt;have generated to your form&amp;rsquo;s constructor, after the call to InitializeComponent. That will typically look like:&lt;/p&gt;&lt;pre&gt;this.components = new System.ComponentModel.Container();
this.components.Add( mainMenu1 );
// etc for other components&lt;/pre&gt;
&lt;p&gt;The difficulty is knowing exactly what to add and remembering to update it when you add or remove components. Reflector can help a bit &amp;ndash; use the Derived Types view under Component to see the classes that are affected. The other one that affected us was the HardwareButton class (in Microsoft.WindowsCE.Forms). It doesn&amp;rsquo;t actually override Dispose(bool) so&amp;nbsp;I think you&amp;nbsp;ought to&amp;nbsp;write code to clear&amp;nbsp;AssociatedControl.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This bug still exists in VS2008 Beta 2&lt;/em&gt;. To help ensure it doesn&amp;rsquo;t continue in future versions, please &lt;a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=305534"&gt;vote for the bug on Connect&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In .NET Compact Framework 1.0, there isn&amp;rsquo;t a systematic finalization like this &amp;ndash; Component doesn&amp;rsquo;t have a Finalizer or a Dispose method, although weirdly it does have a virtual Dispose(bool) method and a Disposed event. It also doesn&amp;rsquo;t implement IComponent, so you can&amp;rsquo;t add a Component-derived class to a Container! And it doesn&amp;rsquo;t implement IDisposable either.&lt;/p&gt;
&lt;p&gt;The MainMenu class unfortunately &lt;em&gt;does&lt;/em&gt; have a Finalizer, but it does &lt;em&gt;not&lt;/em&gt; have a Dispose method. After a bit of digging around, you can see that you can at least clean up the native resources by setting the form&amp;rsquo;s Menu property to null. It still causes all the &lt;em&gt;managed &lt;/em&gt;objects to remain referenced (if it has menu items that have event handlers). You&amp;rsquo;ll have to call GC.SuppressFinalize yourself once you&amp;rsquo;ve forced it to clean up.&lt;/p&gt;
&lt;p&gt;The more I think about it, the more I think that garbage collection overpromises and under-delivers. At least the C++ resource-acquisition-is-initialization and automatic variable destruction model ensures that resources are freed in a timely fashion. That&amp;rsquo;s why the C++/CLI designers hooked that model up to IDisposable &amp;ndash; there is no using block because local GC handle destruction does the job.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-104327928488229551?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/104327928488229551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=104327928488229551' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/104327928488229551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/104327928488229551'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2007/11/vs2005-smart-device-projects-don.html' title='VS2005 Smart Device projects don&amp;#39;t Dispose components'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-681216066467317220</id><published>2007-10-12T23:59:00.001+01:00</published><updated>2007-10-12T23:59:28.562+01:00</updated><title type='text'>Tired of whacking rats</title><content type='html'>&lt;p&gt;I&amp;rsquo;m fed up with Windows Mobile. Fed up with it from an enterprise device perspective, anyway. See, most customers want a limited set of applications to run on their device. If it&amp;rsquo;s only one, you can write a full-screen app and hide the Start bar at the top, and maybe the menu bar at the bottom if you don&amp;rsquo;t need the on-screen keyboard. Two, and you have to find a way to switch between them (and recently it seems that the second one is TomTom Navigator, which doesn&amp;rsquo;t co-operate anyway) and stop anything else being run.&lt;/p&gt;
&lt;p&gt;And so you do this, and bing! up pops a notification. So you work out how to kill that one and bing! here comes another one. It&amp;rsquo;s like playing Whack-A-Rat.&lt;/p&gt;
&lt;p&gt;And I&amp;rsquo;m tired of it. I&amp;rsquo;m tired of trying to make my programs survive a cold boot, when your OEM subtly changes how it works from device to device (Symbol MC3090 &amp;ndash; breaks the convention of &amp;lsquo;Application folder is for developers&amp;rsquo; by lumping the wireless configuration utilities in there, and they have to match the wireless driver version, so you can no longer write to a hex file). But Windows Mobile 5.0 has persistent storage, right? Yes, but OS updates include a wipe of persistent storage, because the registry settings in persistent storage are a diff from the ROM version, so you change the ROM registry, you break the diff, and now you have to work out how to persist your program across clean boots. Or the OEM has inexplicably made the clean boot a simple keypress, with a confirmation prompt, but one so confusing where you press one half of a rocker for YES, I&amp;rsquo;d like to destroy my applications,&amp;nbsp;and one for NO, actually I&amp;rsquo;d like to keep them please, and not marked them clearly or the instructions are confusing so the user that meant to say NO says YES by mistake, or they&amp;rsquo;re labelled the wrong damn way round in the first place and you still have to make the damn program survive!&lt;/p&gt;
&lt;p&gt;&amp;hellip;and breathe&amp;hellip;&lt;/p&gt;
&lt;p&gt;&amp;hellip;and now you have to come up with a way to do program and firmware upgrades over the air, only it wasn&amp;rsquo;t designed in, because we were going to use the OEM&amp;rsquo;s system, but we can&amp;rsquo;t use that because a) it costs a bomb and b) it sucks and c) it blows as well and you find that you can&amp;rsquo;t do a complete device reload because the damn ROM image is too big to fit in RAM or persistent storage alongside the updates to your program because they couldn&amp;rsquo;t find room in ROM for .NET &amp;lsquo;Compact&amp;rsquo; Framework and SQL Server &amp;lsquo;Compact&amp;rsquo; Edition so you have to do it a bit at a time and now you&amp;rsquo;re trying to fudge it all at the last minute and then which bit has to chain which other bit and how do we do this on a schedule so updates don&amp;rsquo;t interfere with the user&amp;rsquo;s work and I DIDN&amp;rsquo;T SIGN UP FOR DEVICE MANAGEMENT DAMMIT!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-681216066467317220?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/681216066467317220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=681216066467317220' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/681216066467317220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/681216066467317220'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2007/10/tired-of-whacking-rats.html' title='Tired of whacking rats'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-4127136306236648433</id><published>2007-09-03T20:07:00.001+01:00</published><updated>2007-09-03T20:07:14.927+01:00</updated><title type='text'>Everyone working on databases should read this</title><content type='html'>&lt;p&gt;Rico Mariani (now Chief Architect of Visual Studio, formerly just a performance architect on the .NET Framework) has written a great article on database performance, but also covers correctness issues. A good read for any developer working on databases (and isn&amp;rsquo;t that most of us now?)&lt;/p&gt;
&lt;p&gt;&lt;a title="Database Performance, Correctness, Compostion, Compromise, and Linq too" href="http://blogs.msdn.com/ricom/archive/2007/08/31/database-performance-correctness-compostion-compromise-and-linq-too.aspx"&gt;Database Performance, Correctness, Compostion, Compromise, and Linq too&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-4127136306236648433?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/4127136306236648433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=4127136306236648433' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/4127136306236648433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/4127136306236648433'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2007/09/everyone-working-on-databases-should.html' title='Everyone working on databases should read this'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-6653617632876672662</id><published>2007-07-10T21:00:00.001+01:00</published><updated>2007-07-10T21:00:56.361+01:00</updated><title type='text'>Another reason not to overload the .NET Framework name</title><content type='html'>&lt;p&gt;&lt;a href="http://www.microsoft.com/technet/security/bulletin/ms07-040.mspx"&gt;This month&amp;rsquo;s security bulletin&lt;/a&gt; becomes a lot more confusing. It was pretty confusing already, but the extra detail of .NET Framework 3.0 is/is not vulnerable just adds an extra layer.&lt;/p&gt;
&lt;p&gt;(Suggestion: update and let your customers know. Since .NET Framework patches are cumulative I expect &lt;a href="http://idunno.org/archive/2007/06/27/asp.net-validators-for-ajax-finally-sort-of-maybe.aspx"&gt;Barry&amp;rsquo;s validators&lt;/a&gt; are also included.)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-6653617632876672662?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/6653617632876672662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=6653617632876672662' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/6653617632876672662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/6653617632876672662'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2007/07/another-reason-not-to-overload-net.html' title='Another reason not to overload the .NET Framework name'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-1237952712301993253</id><published>2007-06-05T23:12:00.001+01:00</published><updated>2007-06-05T23:12:48.243+01:00</updated><title type='text'>Wow, long time no post</title><content type='html'>&lt;p&gt;I have intended to on occasions, never got round to it. It&amp;rsquo;s been so long that Blogger have changed completely over to Google logins and my old configuration in &lt;a href="http://www.codingrobots.com/blogjet/"&gt;BlogJet&lt;/a&gt; no longer worked because I&amp;rsquo;d had to switch to the Google login at one point (think I wanted to use my own identity on posting a comment on someone else&amp;rsquo;s blog).&lt;/p&gt;
&lt;p&gt;Indeed the old Google API didn&amp;rsquo;t work anymore either and I had to grab BlogJet 2.0.x.&lt;/p&gt;
&lt;p&gt;Google&amp;rsquo;s increasing privacy-invasion is making me want to get off this ship (and &lt;a href="http://www.feedburner.com/"&gt;this one too&lt;/a&gt;).&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-1237952712301993253?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/1237952712301993253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=1237952712301993253' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/1237952712301993253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/1237952712301993253'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2007/06/wow-long-time-no-post.html' title='Wow, long time no post'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-8576775363794388318</id><published>2007-06-05T23:08:00.001+01:00</published><updated>2007-06-05T23:08:03.886+01:00</updated><title type='text'>When developers fight...</title><content type='html'>&lt;a href="http://blogs.msdn.com/vistacompatteam/archive/2007/04/12/setthreadpriority-from-run-key.aspx"&gt;Microsoft take their ball away&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-8576775363794388318?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/8576775363794388318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=8576775363794388318' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/8576775363794388318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/8576775363794388318'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2007/06/when-developers-fight.html' title='When developers fight...'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-116975871018946325</id><published>2007-01-25T20:58:00.000Z</published><updated>2007-01-25T20:58:30.303Z</updated><title type='text'>The problem with biometrics</title><content type='html'>&lt;p&gt;&lt;a href="http://software.ericsink.com/entries/Technology_Dependence.html"&gt;If they change, they can&amp;rsquo;t identify you&lt;/a&gt; &lt;img src="http://www.dimmick.demon.co.uk/blog/smile3.gif" /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-116975871018946325?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/116975871018946325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=116975871018946325' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/116975871018946325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/116975871018946325'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2007/01/problem-with-biometrics.html' title='The problem with biometrics'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-116899119330968983</id><published>2007-01-16T23:46:00.000Z</published><updated>2007-01-16T23:46:35.993Z</updated><title type='text'>Geek Dinner this Friday (19 Jan)</title><content type='html'>&lt;p&gt;My friend &lt;a href="http://www.colinmackay.net/"&gt;Colin Mackay&lt;/a&gt;, who I know from &lt;a href="http://www.codeproject.com/"&gt;CodeProject&lt;/a&gt;, sent me a message last week to tell me that he was attending this weekend&amp;rsquo;s &lt;a href="http://www.microsoft.com/uk/launch2007/dev/default.mspx"&gt;Vista and Office Developer Launch&lt;/a&gt; in Reading, and to ask if I&amp;rsquo;d like to meet up while he was here.&lt;/p&gt;&lt;p&gt;I was a bit slow responding and discovered tonight that he&amp;rsquo;d signed up for &lt;a href="http://www.zimakki.com/blog"&gt;Zi Makki&lt;/a&gt;&amp;rsquo;s &lt;a href="http://www.thehughpage.com/VistaOfficeLaunchGeekDinner"&gt;Geek Dinner on Friday night&lt;/a&gt;. If you&amp;rsquo;re in the area &amp;ndash; whether or not you&amp;rsquo;re going to the event itself (I&amp;rsquo;m not, and nor is Ian) &amp;ndash; why not come along?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-116899119330968983?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/116899119330968983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=116899119330968983' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/116899119330968983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/116899119330968983'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2007/01/geek-dinner-this-friday-19-jan.html' title='Geek Dinner this Friday (19 Jan)'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-116658164995000358</id><published>2006-12-20T02:27:00.000Z</published><updated>2006-12-20T02:27:32.416Z</updated><title type='text'>How to misuse the Office 2007 Ribbon</title><content type='html'>&lt;p&gt;Dare Obasanjo &lt;a href="http://www.25hoursaday.com/weblog/PermaLink.aspx?guid=b2909bc4-53bc-411c-8a10-8c47d974ceec"&gt;has noticed&lt;/a&gt; a &lt;a href="http://blogs.msdn.com/jensenh/archive/2006/11/21/licensing-the-2007-microsoft-office-user-interface.aspx#1121843"&gt;comment&lt;/a&gt; of mine on Jensen Harris&amp;rsquo;s post &lt;a href="http://blogs.msdn.com/jensenh/archive/2006/11/21/licensing-the-2007-microsoft-office-user-interface.aspx"&gt;announcing Microsoft&amp;rsquo;s licensing of the concept&lt;/a&gt; of the Office 2007 &amp;lsquo;Ribbon&amp;rsquo; UI. In that comment, I criticised (in a single sentence) Dare&amp;rsquo;s &lt;a href="http://www.25hoursaday.com/weblog/CommentView.aspx?guid=29141fb4-efb0-4ae2-aba6-59ae2096feee"&gt;concept&lt;/a&gt; for a future version of &lt;a href="http://www.rssbandit.org/"&gt;RSS Bandit&lt;/a&gt;. I should say up-front that I&amp;rsquo;m a regular user of RSS Bandit; it&amp;rsquo;s my main RSS reader at home, in which I&amp;rsquo;m subscribed to over 100 feeds. I want this to remain usable, and my fear is that it won&amp;rsquo;t be.&lt;/p&gt;&lt;p&gt;Funnily, he doesn&amp;rsquo;t acknowledge that I made the first comment on &lt;em&gt;that&lt;/em&gt; post, in which I go into detail. I said:&lt;/p&gt;&lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;p&gt;It doesn't belong. There's no need to go to an Office-style menu system in RSS Bandit because you barely ever use the menus anyway. It's not like there are loads of features hidden in the depths of the menus and dialogs, and the gallery is particularly over-the-top. How often do you think people will change the style of the newspaper view? Virtually never, in my opinion - they'll pick one that works, and stick with it. These options don't need to be 'in your face' the whole time. RSS Bandit is not document authoring software, it's a browser.&lt;br /&gt;&lt;br /&gt;If anything you could follow IE7's lead and drop the menu bar entirely. There aren't that many menu options, and most of them are replicated with some other widget, on one of the toolbars, or in the case of View/Feed Subscriptions and View/Search, the two tabs in the pane.&lt;br /&gt;&lt;br /&gt;Most of the other options that aren't duplicated could end up on an extended Tools menu.&lt;/p&gt;&lt;/blockquote&gt;&lt;p dir="ltr"&gt;Dare links to Mike Torres who comments on the menu-less UI of various Microsoft applications, suggesting that this is something recent. At least two of these have been menu-less for a while, in one case for five years: Windows Media Player. The original version of WMP in Windows XP was without menus:&lt;/p&gt;&lt;p dir="ltr"&gt;&lt;img alt="Windows Media Player for Windows XP (WMP 8)" src="http://www.winsupersite.com/images/reviews/wxp_rtm_pro_003_sm.gif" border="0" /&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;&lt;em&gt;(screenshot from &lt;/em&gt;&lt;a href="http://www.winsupersite.com/reviews/wm9series.asp"&gt;&lt;em&gt;http://www.winsupersite.com/reviews/wm9series.asp&lt;/em&gt;&lt;/a&gt;&lt;em&gt;).&lt;/em&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;The highly-unconventional window shape was toned down in version 9.0 and became virtually conventional in 10.0, although&amp;nbsp;all four corners&amp;nbsp;are rounded whereas the normal XP themes have rounded top corners and square bottom corners.&lt;/p&gt;&lt;p dir="ltr"&gt;It appears that the menus first disappeared from MSN Messenger in version 7.0, which was released in April 2005:&lt;/p&gt;&lt;p dir="ltr"&gt;&lt;img alt="MSN Messenger 7.0" src="http://www.winsupersite.com/images/reviews/msn_messenger7_01_sm.jpg" border="0" /&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;&lt;em&gt;(screenshot from &lt;a href="http://www.winsupersite.com/reviews/msn_messenger7.asp"&gt;http://www.winsupersite.com/reviews/msn_messenger7.asp&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;Which Office application is RSS Bandit most like? Word? Excel? No. It&amp;rsquo;s most like Outlook. Which major Office 2007 application does &lt;em&gt;not&lt;/em&gt; get a Ribbon (in its main UI)? Outlook.&lt;/p&gt;&lt;p dir="ltr"&gt;I&amp;rsquo;ve been following Jensen Harris&amp;rsquo;s blog more-or-less since the beginning. In it, he explains the motivations behind creating the Ribbon, and the data that was used to feed the process of developing it. The Ribbon is mainly about creating better access to &lt;em&gt;creating and formatting documents&lt;/em&gt;, by showing the user a gallery of choices and allowing them to refine it. Which part of Outlook gets a Ribbon? The message editor (OK, this is actually part of Word).&lt;/p&gt;&lt;p dir="ltr"&gt;RSS Bandit is about &lt;em&gt;viewing other people&amp;rsquo;s content&lt;/em&gt;, for which the best analogy is probably IE7.&lt;/p&gt;&lt;p dir="ltr"&gt;I haven&amp;rsquo;t done any UI studies. I&amp;rsquo;ve not taken part in any. But Microsoft &lt;em&gt;have &lt;/em&gt;analysed their UIs. They&amp;rsquo;ve gathered data on how those interfaces are used &amp;ndash; automatically, in some cases (the Customer Experience Improvement Programs). The Ribbon is an improvement for Office. It&amp;rsquo;s not going to be right for all applications. Many applications actually suffer in the classic&amp;nbsp;File/Edit/View/Tools/Help system: the menus tend to either be padded with commands that are duplicated elsewhere, or are ridiculously short (e.g. RSS Bandit&amp;rsquo;s &amp;lsquo;Edit&amp;rsquo; menu which only has a &amp;lsquo;Select All&amp;rsquo; option, which if you&amp;rsquo;re currently looking at a browser tab appears to do nothing &amp;ndash; it&amp;rsquo;s only when you switch back to the Feed tab that you notice it&amp;rsquo;s selected all the items in the&amp;nbsp;current feed or feed group). They&amp;rsquo;ll suffer equally in the Ribbon, particularly if there are too few&amp;nbsp;features to make a Ribbon worthwhile.&lt;/p&gt;&lt;p dir="ltr"&gt;When designing a UI for your application, don&amp;rsquo;t be too slavish to a particular model. If you find yourself padding out the menus to conform to the File/Edit/View model, or if all your&amp;nbsp;commands are on the Tools menu, a classic menu probably doesn&amp;rsquo;t fit. If you&amp;rsquo;re not offering a feature for the user to customise the formatting of something, which the user will use &lt;em&gt;regularly&lt;/em&gt;, a Ribbon is probably also wrong. The standard toolbar is probably enough.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-116658164995000358?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/116658164995000358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=116658164995000358' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/116658164995000358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/116658164995000358'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/12/how-to-misuse-office-2007-ribbon.html' title='How to misuse the Office 2007 Ribbon'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-116648676459289566</id><published>2006-12-19T00:06:00.000Z</published><updated>2006-12-19T00:06:04.776Z</updated><title type='text'>Another knock-on effect of the stupid WinFX-&gt;.NET 3.0 naming decision</title><content type='html'>&lt;p&gt;The next version of the Compact Framework will be called:&lt;/p&gt;&lt;p&gt;&lt;a href="http://blogs.msdn.com/netcfteam/archive/2006/12/18/NetCF-3.5_2700_s-Finalizer-Log.aspx"&gt;.NET Compact Framework &lt;em&gt;3.5&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Yeah.&lt;/p&gt;&lt;p&gt;Great way to confuse people.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-116648676459289566?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/116648676459289566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=116648676459289566' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/116648676459289566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/116648676459289566'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/12/another-knock-on-effect-of-stupid.html' title='Another knock-on effect of the stupid WinFX-&gt;.NET 3.0 naming decision'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-116527095659370932</id><published>2006-12-04T22:22:00.001Z</published><updated>2006-12-04T22:22:36.600Z</updated><title type='text'>Spotted: bad Google ads</title><content type='html'>&lt;p&gt;Saw this strip of ads on a site:&lt;/p&gt;&lt;p&gt;&lt;img alt="www.example.com in an advert?" src="http://www.dimmick.demon.co.uk/blog/BadGoogleAd.png" border="0" /&gt;&lt;/p&gt;&lt;p&gt;Test advert got onto a real site, perhaps? I know the site owner has only just added AdWords to their site, but it should show something useful!&lt;/p&gt;&lt;p&gt;(example.com is reserved by IANA for use in example URLs)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-116527095659370932?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/116527095659370932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=116527095659370932' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/116527095659370932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/116527095659370932'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/12/spotted-bad-google-ads_04.html' title='Spotted: bad Google ads'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-116527093329954025</id><published>2006-12-04T22:22:00.000Z</published><updated>2006-12-04T22:22:23.410Z</updated><title type='text'>Spotted: bad Google ads</title><content type='html'>&lt;p&gt;Saw this strip of ads on a site:&lt;/p&gt;&lt;p&gt;&lt;img alt="www.example.com in an advert?" src="http://www.dimmick.demon.co.uk/blog/BadGoogleAd.png" border="0" /&gt;&lt;/p&gt;&lt;p&gt;Test advert got onto a real site, perhaps? I know the site owner has only just added AdWords to their site, but it should show something useful!&lt;/p&gt;&lt;p&gt;(example.com is reserved by IANA for use in example URLs)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-116527093329954025?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/116527093329954025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=116527093329954025' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/116527093329954025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/116527093329954025'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/12/spotted-bad-google-ads.html' title='Spotted: bad Google ads'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-116258843944445812</id><published>2006-11-03T21:13:00.000Z</published><updated>2006-11-03T21:14:01.386Z</updated><title type='text'>How to fix the Smart Device Framework 2.0 installer</title><content type='html'>&lt;p&gt;Neil Cowburn &lt;a href="http://blog.opennetcf.org/ncowburn/CommentView.aspx?guid=cd05e483-ec46-463d-bacf-967d573ef7db"&gt;noted that the Smart Device Framework 2.0 installer doesn&amp;rsquo;t work properly on Windows Vista&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;This is the comment I couldn&amp;rsquo;t post to his website:&lt;/p&gt;&lt;p&gt;&amp;ldquo;It's error upon error for this one. Code 2869 means that the dialog designated as an error dialog doesn't work how Windows Installer needs an error dialog to work - see &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/windows_installer_error_messages.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/windows_installer_error_messages.asp&lt;/a&gt;. So the real error is being lost. Visual Studio is generating you a broken Error dialog.&lt;/p&gt;&lt;p&gt;I'm going to guess that the real error is that your custom action is failing, because it isn't privileged. On Windows Vista, only custom actions marked NoImpersonate get to run with administrative permissions (actually, they run as LocalSystem). Visual Studio cannot be told to mark a custom action as NoImpersonate (as far as I know). If you want to fix it after generating the MSI, you can use Orca (the MSI table editor, part of the Platform SDK, search for Orca.MSI) to add 2048 to the Type column of the three rows which use the InstallUtil DLL (which is the native code that calls into your managed DLL). I've also heard of tools which can be used to execute SQL against an MSI - it should be possible to do this with VBScript using the MSI object model.&lt;/p&gt;&lt;p&gt;The Windows Installer team does not recommend the use of managed code custom actions. This message does not seem to have got through to the Visual Studio deployment team. The recommendation is to use as few dependencies as possible, which generally translates to statically-linked C++ code.&lt;/p&gt;&lt;p&gt;Digging around in Reflector shows that you're using the custom actions to add the SDF to the ActiveSync Add/Remove Programs box. I'm not really a fan of this idea - and I note that Microsoft doesn't do this with the Compact Framework itself. It would be simplest to scrap this custom action completely. I also note that you're not handling rollback or uninstall. You should also use the /register flag to CEAppMgr.exe so that it doesn't install immediately on the connected device (or install when the next device is connected).&lt;/p&gt;&lt;p&gt;Windows Installer does support finding and executing an EXE that's already on the system as a custom action, but I don't think you can do this in Visual Studio.&lt;/p&gt;&lt;p&gt;You might want to consider a better installation solution, such as Windows Installer XML (WiX, &lt;a href="http://wix.sourceforge.net/"&gt;http://wix.sourceforge.net/&lt;/a&gt;)&amp;rdquo;&lt;/p&gt;&lt;p&gt;I&amp;rsquo;ve been getting into WiX recently. I was going to do a presentation at &lt;a href="http://www.developerday.co.uk/ddd/default.asp"&gt;DDD4&lt;/a&gt;, but not enough people voted for it. If you fancy attending any of the proposed sessions and can spare a Saturday, &lt;a href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032315483&amp;amp;Culture=en-GB"&gt;sign up now&lt;/a&gt;. (I&amp;rsquo;m waiting for the final agenda to be posted, but the places may all go before that happens.)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-116258843944445812?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/116258843944445812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=116258843944445812' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/116258843944445812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/116258843944445812'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/11/how-to-fix-smart-device-framework-20.html' title='How to fix the Smart Device Framework 2.0 installer'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-115871456442317813</id><published>2006-09-20T02:09:00.000+01:00</published><updated>2006-09-20T02:09:28.666+01:00</updated><title type='text'>Petition to rename .NET Framework 3.0</title><content type='html'>&lt;p&gt;As soon as I heard that Microsoft were changing the name WinFX, an umbrella name for Avalon, Indigo &amp;ndash; oh, excuse me, Windows Presentation Foundation and Windows Communication Foundation &amp;ndash; and Windows Workflow, to .NET Framework 3.0, I thought it was an incredibly bad idea.&lt;/p&gt;&lt;p&gt;The trouble is that it confuses everybody. I&amp;rsquo;ve seen people commenting that they&amp;rsquo;ll delay moving to .NET 2.0 &amp;lsquo;because .NET 3.0 is just around the corner.&amp;rsquo; They then get horribly confused &amp;ndash; and normally angry &amp;ndash; when you tell them that the CLR, BCL, Windows Forms, ASP.NET and the language compilers are completely unchanged in &amp;lsquo;.NET 3.0&amp;rsquo; from .NET 2.0.&lt;/p&gt;&lt;p&gt;Someone&amp;rsquo;s started a &lt;a href="http://www.petitiononline.com/winfx/petition.html"&gt;petition to name it back to WinFX&lt;/a&gt;. I don&amp;rsquo;t care what name it has &amp;ndash; does it even need an umbrella name? Can we not call the three subsystems by their own names? Even better, their codenames which despite not being descriptive were at least &lt;em&gt;easy to say! &lt;/em&gt;Do I really need to even install WCF and WF just to get a WPF application to work?&lt;/p&gt;&lt;p&gt;What&amp;nbsp;I suspect it does mean is that versions of .NET after 3.0 simply won&amp;rsquo;t install or work on Windows before XP SP2, Server 2003 SP1, or Vista. That&amp;rsquo;s a huge compatibility loss &amp;ndash; .NET 2.0 works right back to Windows 98 and NT 4.0. Or, if new versions of the CLR and BCL &lt;em&gt;will&lt;/em&gt; install and work on older operating systems, they&amp;rsquo;ll have &lt;em&gt;another&lt;/em&gt; stupid naming decision to make.&lt;/p&gt;&lt;p&gt;It also means that even for downlevel systems, the new installers will be even more humungous than ever for the One That Is To Come After. People still complain about the size of the Framework installer; most end users will never have a web server installed on their machine &amp;ndash; security considerations would suggest that they shouldn&amp;rsquo;t &amp;ndash; so why in hell does .NET Framework include and install ASP.NET on every single box? This leads to people asking about and trying to invent jerry-rigged systems to either try to link the framework into their binaries or ship only bits of the Framework. It&amp;rsquo;s a recipe for disaster come servicing time.&lt;/p&gt;&lt;p&gt;Please, if you value everyone&amp;rsquo;s sanity, &lt;em&gt;sign this petition&lt;/em&gt;. It probably won&amp;rsquo;t do any good but you can at least say you spoke up against the insanity.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-115871456442317813?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/115871456442317813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=115871456442317813' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115871456442317813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115871456442317813'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/09/petition-to-rename-net-framework-30.html' title='Petition to rename .NET Framework 3.0'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-115869621490267380</id><published>2006-09-19T21:03:00.000+01:00</published><updated>2006-09-19T21:03:40.783+01:00</updated><title type='text'>Biometric scanners not particularly reliable</title><content type='html'>&lt;p&gt;Dana Epp &lt;a href="http://silverstr.ufies.org/blog/archives/000973.html"&gt;posted&lt;/a&gt; a movie from Mythbusters cracking a fingerprint &amp;lsquo;lock&amp;rsquo;.&lt;/p&gt;&lt;p&gt;Not exactly secure.&lt;/p&gt;&lt;p&gt;&lt;a href="http://silverstr.ufies.org/blog/archives/000973.html"&gt;Watch now&lt;/a&gt;. (YouTube, may get taken down when someone spots the copyright violation. What the hell, it&amp;rsquo;s Talk Like A Pirate Day. Arrr!)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-115869621490267380?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/115869621490267380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=115869621490267380' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115869621490267380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115869621490267380'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/09/biometric-scanners-not-particularly.html' title='Biometric scanners not particularly reliable'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-115791151547874914</id><published>2006-09-10T19:05:00.000+01:00</published><updated>2006-09-10T19:05:15.490+01:00</updated><title type='text'>Missing font on Vista RC1</title><content type='html'>&lt;p&gt;Anyone reading this blog from Windows Vista (Pre-RC1 build 5536 or RC1 build 5600) might notice a slight difference in appearance between Vista and XP. What is it?&lt;/p&gt; &lt;p&gt;&lt;em&gt;They forgot to include Trebuchet MS&amp;nbsp;Italic!&lt;/em&gt;&lt;/p&gt; &lt;p&gt;Windows Vista instead installs two copies of Trebuchet MS Bold Italic. When called upon to produce Trebuchet MS Italic, the Windows&amp;nbsp;TrueType/OpenType renderer instead simply slants a copy of &lt;a href="http://www.microsoft.com/typography/fonts/font.aspx?FID=2&amp;amp;FNAME=Trebuchet+MS"&gt;Trebuchet MS&lt;/a&gt;. This doesn't look very good - there's a reason that &lt;a href="http://www.connare.com/"&gt;Vincent Connare&lt;/a&gt; drew a true italic.&lt;/p&gt; &lt;p&gt;I remember reporting a bug on Pre-RC1, but since I can't access the feedback site (being part of the Customer Preview Program rather than a 'beta tester', a differentiation that seems a little bizarre&amp;nbsp;– do Microsoft not want bug reports from CPP members?) I don't know if anything's being done.&lt;/p&gt; &lt;p&gt;Perhaps&amp;nbsp;&lt;a href="http://blogs.msdn.com/michkap/"&gt;Michael Kaplan&lt;/a&gt; could see what's happening here (although he does use Tahoma 'Italic' on his blog ;-)&amp;nbsp;– there is no true italic for Tahoma).&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-115791151547874914?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/115791151547874914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=115791151547874914' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115791151547874914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115791151547874914'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/09/missing-font-on-vista-rc1.html' title='Missing font on Vista RC1'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-115696852185074837</id><published>2006-08-30T21:08:00.000+01:00</published><updated>2006-09-01T00:21:12.806+01:00</updated><title type='text'>VS6 family completely broken on Vista Pre-RC1 (or so it looked)</title><content type='html'>&lt;p&gt;Looks like my &lt;a href="http://mikedimmick.blogspot.com/2006/08/anyone-managed-to-get-evc-working-on.html"&gt;compatibility&lt;/a&gt; &lt;a href="http://mikedimmick.blogspot.com/2006/07/warning-installing-vs-60-on-vista-beta.html"&gt;problems&lt;/a&gt; are solved: in the radical way, by completely breaking Setup on all three applications. Setup now crashes on clicking 'Next' at the welcome screen. No Program Compatibility settings work.&lt;/p&gt; &lt;p&gt;&lt;em&gt;These tools are essential for my work&lt;/em&gt;. If they don't work I &lt;em&gt;cannot&lt;/em&gt; upgrade.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt; 2006-08-31: It appears that whatever was causing this may have been a temporary glitch; Visual Studio 6.0 is now installing. Still, given my experiences with eVC before, I can perhaps be forgiven for jumping the gun?&lt;/p&gt; &lt;p&gt;I can't go in and add a note to the bugs I filed, because as a Customer Public Preview user, while I can submit bug reports using the Beta Feedback tool, I can't log on to Connect to make changes or additional comments. This means I'm wasting someone's time to triage bugs that &lt;em&gt;I&lt;/em&gt; now cannot repro.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-115696852185074837?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/115696852185074837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=115696852185074837' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115696852185074837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115696852185074837'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/08/vs6-family-completely-broken-on-vista.html' title='VS6 family completely broken on Vista Pre-RC1 (or so it looked)'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-115688976963000816</id><published>2006-08-29T23:16:00.000+01:00</published><updated>2006-08-29T23:16:09.726+01:00</updated><title type='text'>People exhibit surprise that Windows Media DRM is 'cracked'</title><content type='html'>&lt;p&gt;&lt;a href="http://www.internet-nexus.com/2006/08/fairuse4wm-windows-mediadrm-removal.htm"&gt;Example surprise&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;I&amp;rsquo;m not at all surprised this is possible. In order to decrypt data, you need two things: the encrypted data, and the decryption key. In order for media playback of DRM-protected files&amp;nbsp;to be possible while disconnected from the Internet, &lt;em&gt;both of those things need to be on your PC&lt;/em&gt;. If the key is already on&amp;nbsp;the attacker&amp;rsquo;s&amp;nbsp;PC, it&amp;rsquo;s only a matter of time before they find out where it is.&lt;/p&gt;&lt;p&gt;There are of course things that can be done &amp;ndash; such as encrypting the decryption key with a master encryption key, so that it isn&amp;rsquo;t on disk in a usable form, then decrypting it only while it&amp;rsquo;s actually needed for playback &amp;ndash; but ultimately, the key will be visible in the system&amp;rsquo;s memory &lt;em&gt;somewhere&lt;/em&gt; for long enough to be copied.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-115688976963000816?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/115688976963000816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=115688976963000816' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115688976963000816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115688976963000816'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/08/people-exhibit-surprise-that-windows.html' title='People exhibit surprise that Windows Media DRM is &apos;cracked&apos;'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-115659097081009437</id><published>2006-08-26T12:16:00.000+01:00</published><updated>2006-08-26T12:16:11.250+01:00</updated><title type='text'>TV Licensing has serious issues</title><content type='html'>&lt;p&gt;(Note for non-Brits reading this [if any]: in the UK we are required, if we want to watch broadcast television, to pay a licence fee of &amp;pound;131.50, which goes to support the BBC &amp;ndash; BBC TV has no commercial advertising, except for other BBC programmes. You have to show that your TV is physically incapable of receiving broadcast television to avoid it.)&lt;/p&gt;&lt;p&gt;When I moved into this flat, I bought a TV licence using the &lt;a href="http://www.tvlicensing.co.uk/index.jsp"&gt;TV Licensing website&lt;/a&gt;. I did not notice at the time that it had &amp;lsquo;auto-corrected&amp;rsquo; the address I entered. This house, an early-20th-century end terrace,&amp;nbsp;was split into two flats by the landlady in 1999 (based on the details from the &lt;a href="http://www.voa.gov.uk/council_tax/cti_home.htm"&gt;Council Tax website&lt;/a&gt;). The landlady, and all the rental documents, refer to my upstairs flat as &amp;lsquo;17A&amp;rsquo;. However, the council, for council tax, refers to it as &amp;lsquo;First Floor Flat&amp;rsquo;. (Actually looking at it right now, the Council Tax website I linked above shows &amp;lsquo;1st Flr Flat&amp;rsquo; &amp;ndash; they clearly &lt;em&gt;also&lt;/em&gt; have a stupidly short field length.)&lt;/p&gt;&lt;p&gt;When I moved my credit cards, I wasn&amp;rsquo;t aware of the council&amp;rsquo;s designation, so I used &amp;lsquo;17A&amp;rsquo;, and that&amp;rsquo;s what I entered on the TV Licensing website as well. Most UK websites have a gazetteer &amp;ndash; a lookup of house number and postcode to pick the correct full address, and this one is no exception. It expanded the street name and town correctly, but dropped the &amp;lsquo;A&amp;rsquo;, so my licence is actually for number 17, which according to the council, no longer exists. The landlady calls the downstairs flat number 17.&lt;/p&gt;&lt;p&gt;Earlier this year, I decided to get a PVR (Humax PVR9200T, very good thanks). I ordered it with my credit card, and as usual when buying from a new supplier, they insisted it was sent to the card address (i.e. 17A). Whenever you buy TV equipment, this is reported to TV Licensing. Ever since then, I&amp;rsquo;ve been getting demands to buy a licence for 17A &amp;ndash; which I can&amp;rsquo;t, because the website won&amp;rsquo;t accept it!&lt;/p&gt;&lt;p&gt;I&amp;rsquo;ve tried to change the address. You can still edit the address after it&amp;rsquo;s been expanded out on the change of address page, and I&amp;rsquo;ve tried that, but the &amp;lsquo;A&amp;rsquo; is still dropped.&lt;/p&gt;&lt;p&gt;I&amp;rsquo;ve sent them letters. They&amp;rsquo;ve ignored them.&lt;/p&gt;&lt;p&gt;I&amp;rsquo;ve tried to&amp;nbsp;phone them. They have an automated change of address system. It&amp;rsquo;s unusable. I&amp;rsquo;ve tried to leave a phone message. You get about 30 seconds, which is far too little to actually explain the problem. I&amp;rsquo;ve asked to be phoned back &amp;ndash; they haven&amp;rsquo;t. I&amp;rsquo;ve tried to be put through to an agent &amp;ndash; I just get disconnected.&lt;/p&gt;&lt;p&gt;I&amp;rsquo;ve sent emails through their website. They&amp;rsquo;ve been ignored or lost.&lt;/p&gt;&lt;p&gt;What&amp;rsquo;s actually almost more annoying is the lackadaisical attitude they&amp;rsquo;ve taken. I bought the PVR in &lt;em&gt;February&lt;/em&gt;. I guess when I haven&amp;rsquo;t had a reply to one of the many attempts to contact them and get this corrected, I&amp;rsquo;ve been overoptimistic and assumed that they&amp;rsquo;d sorted it, whereas silence actually means I&amp;rsquo;m being ignored.&lt;/p&gt;&lt;p&gt;Today I&amp;rsquo;ve sent two more emails, one using the contact form and the other directly to the email address shown. Hopefully &lt;em&gt;one&lt;/em&gt; of them will be processed this time, before the bailiffs come round.&lt;/p&gt;&lt;p&gt;I can&amp;rsquo;t even try to buy another licence (I&amp;rsquo;d lose about &amp;pound;40 because this licence still has four months to run, but that&amp;rsquo;s worth less to me than all this hassle), because&amp;nbsp;I &lt;em&gt;still&lt;/em&gt; can&amp;rsquo;t enter the correct address!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-115659097081009437?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/115659097081009437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=115659097081009437' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115659097081009437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115659097081009437'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/08/tv-licensing-has-serious-issues.html' title='TV Licensing has serious issues'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-115637688609366320</id><published>2006-08-24T00:48:00.000+01:00</published><updated>2006-08-24T00:48:06.203+01:00</updated><title type='text'>Generic components can only get you so far</title><content type='html'>&lt;p&gt;We had a strange issue with Meteor Server about two years back. Under stress, the Mem Size column (working set size, in fact) in Task Manager would be up and down like a yo-yo. I initially wondered whether the OS was trimming the working set too aggressively, and tried using the &lt;em&gt;SetProcessWorkingSetSize&lt;/em&gt; function to increase the quota. Result: no improvement, it was still happening. The time spent in the memory allocator was causing the server to slow down significantly, and as it started to slow down, the problem would get worse, and worse, eventually virtually grinding to a halt.&lt;/p&gt;&lt;p&gt;To prevent overhead of context switching between multiple runnable worker processes, we moved a long time ago (before I started working on it) from a model where each client would have a dedicated worker process, to a much smaller pool of worker threads (the old mode can still be enabled for compatibility with older applications that don&amp;rsquo;t store their shared state in our session object or otherwise manage their state, but it is highly discouraged for new code). This does mean that there will be times where a client request cannot be handled because there is no worker process to handle it.&lt;/p&gt;&lt;p&gt;After some thought and experimentation, it became clear that what was happening was that when the server started to slow down, the incoming packets were building up in, of all things, the windows message queue. I should say at this point that we were using the Winsock ActiveX control supplied with Visual Basic 6 for all network communications. We already had a heuristic that would enable a shortcut path if the average time to handle a request exceeded a certain threshold. This shortcut path simply wasn&amp;rsquo;t fast enough.&lt;/p&gt;&lt;p&gt;To work around the problem, I added code that would actually close the socket when either of these conditions held. This was pretty tricky to get right as we had to reopen the socket in order to send a response out of it, and we would then need to close again if the average time still exceeded the threshold. There was at least one server release where the socket would not be reopened under certain conditions (if I recall, when both the time threshold was exceeded and a worker process became available). The memory allocation issue still occurred, but it was contained. I added an extra condition that would also close the socket if no worker process was available (this would prevent some retries from lost responses and some requests for additional blocks, both handled in the server process without using a worker, from being handled).&lt;/p&gt;&lt;p&gt;Then, recently, we discovered a problem with the code used to send subsequent packets of large responses, too large to fit into a single packet (the application server protocol is UDP-based). We weren&amp;rsquo;t setting the destination (&lt;em&gt;RemoteHost&lt;/em&gt; and &lt;em&gt;RemotePort&lt;/em&gt; properties) for these packets, assuming that this wouldn&amp;rsquo;t change. Wrong! If another packet from another client arrives (or is already queued) between calling &lt;em&gt;GetData&lt;/em&gt; and &lt;em&gt;SendData&lt;/em&gt;, the properties change to the source of the new packet. This sometimes meant that a client would receive half of its own response and half of a different one, which when reassembled would be gibberish (typically this would cause the client to try to allocate some enormous amount of memory, which would fail). I corrected that, but found that the log in which we (optionally) record all incoming and outgoing packets still had some blanks in it where the destination IP and port were supposed to be &amp;ndash; these values retrieved from the &lt;em&gt;RemoteHostIP&lt;/em&gt; and &lt;em&gt;RemotePort&lt;/em&gt; properties. Where were these packets going? Who knows! Perhaps they were (eek!) being broadcast?&lt;/p&gt;&lt;p&gt;The WinSock control really isn&amp;rsquo;t designed to be a server component. Frankly it was amazing we were getting around 2,400 transactions per minute (peak)&amp;nbsp;out of it. It was time to go back to the drawing board. Clearly I was going to need an asynchronous way of receiving packets, and the Windows Sockets API really isn&amp;rsquo;t conducive to use from VB6, so it was going to be a C++ component. Since string manipulation and callbacks were involved, I went with a COM object written with ATL.&lt;/p&gt;&lt;p&gt;I surmise that the WinSock control uses the &lt;em&gt;WSAAsyncSelect&lt;/em&gt; API to receive notifications of new packets, and that&amp;rsquo;s why we were seeing the message queue grow with each packet received. The new component uses &lt;em&gt;WSAEventSelect&lt;/em&gt; and has a worker thread which waits on the event for a new packet to arrive. When a packet arrives it synchronously fires an event, which has the effect of waiting until the server finishes processing the packet &amp;ndash; either discarding it (as a duplicate, otherwise malformed, or due to excessive load), sending the next block in a multi-block response, or handing the request off to a worker process.&lt;/p&gt;&lt;p&gt;This does mean that there could be long delays between checking for packets. Doesn&amp;rsquo;t that cause a problem? Not really. The TCP/IP stack buffers incoming packets on a UDP socket in a small First-In-First-Out buffer. If the buffer doesn&amp;rsquo;t have enough space for an incoming packet, the oldest one in the buffer is discarded. That behaviour is perfect for our situation. You can vary the buffer size (warning, it&amp;rsquo;s in kernel mode and taken from non-paged pool, IIRC) by calling &lt;em&gt;setsockopt&lt;/em&gt; with the &lt;em&gt;SO_RCVBUF&lt;/em&gt; parameter.&lt;/p&gt;&lt;p&gt;For added&amp;nbsp;performance the socket is in non-blocking mode, so on sending a packet, it simply gets buffered and the OS sends the data asynchronously.&lt;/p&gt;&lt;p&gt;Net result? No more problems with misdirected packets (my new API requires you to pass the destination in at the same time as the data), a step on the road to IPv6 support (the WinSock control will not be updated for that) &amp;ndash; and a substantial performance improvement. My work computer now does &lt;em&gt;7,000&lt;/em&gt; transactions per minute (peak) on the same application&amp;nbsp;&amp;ndash; and the bottleneck has moved somewhere else, because that figure was achieved with only three worker processes while the earlier one was with eight. (Hyperthreaded P4 3.0GHz). We saw&amp;nbsp;much less difference in a VM (on the same machine)&amp;nbsp;I&amp;rsquo;d been using to get performance baselines, but what we did see was that the performance was much more &lt;em&gt;consistent&lt;/em&gt; with the new socket component.&lt;/p&gt;&lt;p&gt;The sizing for this application was previously around 1,500 transactions per minute per server, so this really gives a substantial amount of headroom.&lt;/p&gt;&lt;p&gt;My component would be terrible for general use &amp;ndash; but it&amp;rsquo;s just right for this one.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-115637688609366320?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/115637688609366320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=115637688609366320' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115637688609366320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115637688609366320'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/08/generic-components-can-only-get-you-so.html' title='Generic components can only get you so far'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-115637031492768139</id><published>2006-08-23T22:58:00.000+01:00</published><updated>2006-08-23T22:58:35.026+01:00</updated><title type='text'>Sometimes where code runs is more important than what it is</title><content type='html'>&lt;p&gt;Sometimes, to get the best performance from some code, you have to change the architecture.&lt;/p&gt;&lt;p&gt;Our application server product, Meteor Server is a complex beast. To be able to handle requests from clients concurrently, the main MeteorServer.exe process&amp;nbsp;farms out those requests to a pool of worker processes. (Yes, we could switch to a single multi-threaded worker process even with VB6, but it&amp;rsquo;s a lot of effort and many existing applications may not be threadsafe, so we&amp;rsquo;d have to offer both schemes, and that&amp;rsquo;s even more effort.)&lt;/p&gt;&lt;p&gt;We can&amp;rsquo;t multi-thread the main MeteorServer.exe process because it&amp;rsquo;s written in VB6, and while you can make an out-of-process COM server process (a local server in COM parlance, an &amp;lsquo;ActiveX EXE&amp;rsquo; in VB6 terminology) multi-threaded, you can&amp;rsquo;t make a &amp;lsquo;Standard EXE&amp;rsquo; multithreaded. Oh, there are hacks, but I&amp;rsquo;m of the firm opinion that you shouldn&amp;rsquo;t subvert a technology to make it do something it wasn&amp;rsquo;t designed to do &amp;ndash; when it goes wrong you will get no support.&lt;/p&gt;&lt;p&gt;A Meteor application is a COM object which exposes two methods through a dispatch (Automation) interface &amp;ndash; well, one property and one method. The property, called VersionString, is simply to allow Meteor to pick up and display version information for the application. Every other piece of interaction is done through the TerminalEvent method, which receives a couple of interface pointers to allow it to call back into Meteor, a flag indicating whether this is a new client, a numeric event type indicating what the user&amp;rsquo;s last action was, and a string representing any event data. The application then calls methods on the interface to accumulate a batch of commands to be sent to the client &amp;ndash; things like clearing the screen, setting the text colour, displaying text at a given location, sending a menu of options, defining an entry field. When&amp;nbsp;one of these methods is called, it&amp;rsquo;s turned into an on-the-wire format, with an operation code and a wire-representation of the parameters. When the application returns from TerminalEvent, the server sends the complete batch to the client.&lt;/p&gt;&lt;p&gt;When I first started working on Meteor Server, when the application called a command-generating method, the stub of code in the interface made a call back into the MeteorServer.exe process to perform the wire-format translation. This meant it had to wait for the server process to finish whatever it was doing and go back to waiting for a window message. This made the server process a serious bottleneck &amp;ndash; it was a &amp;lsquo;chatty&amp;rsquo; interface, which is really not advisable across process boundaries. About three years ago, I looked at the code and realised it actually had no dependencies on any data in the server process, and had the idea to move this formatting code into the worker process that the application object was running in, to improve both performance and scalability. The commands would be batched up in the worker process then only sent across to the server when the batch was complete.&lt;/p&gt;&lt;p&gt;About a year later I actually made the change &amp;ndash; we were seeking a significant performance improvement at the time. I don&amp;rsquo;t have a record of the performance change but I think it was some decent multiple &amp;ndash; 3x&amp;nbsp;or so the transaction rate.&lt;/p&gt;&lt;p&gt;About this time last year, or a little before, I was asked to add a new feature. Meteor provides a session state storage object which can store arbitrary strings that the application sets. The new feature was to allow an application to copy the session state data from another session to its own &amp;ndash; this allows a user to resume their work on a different client, for example if the hardware is damaged or otherwise fails. I initially put the extra code directly in the batch-retire method that the worker process calls on completing a request, adding a new parameter, but when testing for performance, discovered that the simple test to see if the session should be transferred caused a regression of about 10%, and that would mean the difference between exceeding and failing to meet the performance requirement for a different customer.&lt;/p&gt;&lt;p&gt;The solution was to make this a separate method that the worker process would call if required, and to take it out of the mainline, returning the batch-retire method to its previous implementation. On doing this, the regression had gone &amp;ndash; we were back up to almost exactly the same performance level we&amp;rsquo;d had before.&lt;/p&gt;&lt;p&gt;Know the environment in which your code has to run.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-115637031492768139?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/115637031492768139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=115637031492768139' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115637031492768139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115637031492768139'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/08/sometimes-where-code-runs-is-more.html' title='Sometimes where code runs is more important than what it is'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-115636450727676216</id><published>2006-08-23T21:21:00.000+01:00</published><updated>2006-08-23T21:21:49.680+01:00</updated><title type='text'>You must call Dispose</title><content type='html'>&lt;p&gt;You &lt;em&gt;must&lt;/em&gt; call Dispose.&lt;/p&gt;&lt;p&gt;If an object implements the IDisposable pattern, or otherwise offers a Dispose or Close method, you &lt;em&gt;must&lt;/em&gt; call it. No exceptions. If an instance member of your class&amp;nbsp;implements IDisposable, your class should too.&lt;/p&gt;&lt;p&gt;OK, if you don&amp;rsquo;t, a finalizer &lt;em&gt;might&lt;/em&gt; clean up after you. But you don&amp;rsquo;t want it to do that. The finalizer will only run once a GC has occurred. And a GC only runs based on heuristics of how much memory has been allocated (in general; there are a few cases in Compact Framework where the GC can be spurred to run, for example on receiving a WM_HIBERNATE message from the shell to say that physical memory is low). In .NET Framework 1.x and both versions of .NET Compact Framework, the GC has no idea how much unmanaged memory is being used by any object that manages an unmanaged resource. .NET Framework 2.0 does have the GC.AddMemoryPressure method, which can guide the GC to collect earlier than it might otherwise have done.&lt;/p&gt;&lt;p&gt;Finalizers don&amp;rsquo;t run on a regular application thread. They run on a special finalizer thread. This means you have to be careful around possible synchronisation issues. Objects to be finalized wait in a queue, and only one thread services that queue, so if a finalizer blocks, &lt;em&gt;all&lt;/em&gt; undisposed objects will end up hanging around.&lt;/p&gt;&lt;p&gt;Once the finalizer has run, the managed memory isn&amp;rsquo;t automatically released. You have to wait for GC to run &lt;em&gt;again&lt;/em&gt;. On the desktop or server, with the full Framework, you have to wait for it to collect the generation of the heap which the object is now in, which means an even longer wait for the managed memory to be released, which can keep the GC heap larger than it could have been.&lt;/p&gt;&lt;p&gt;The GC propoganda basically tells us we can be lazy. We can&amp;rsquo;t. We must clean up after ourselves. Treat the finalizer as a safety net.&lt;/p&gt;&lt;p&gt;Best practice is to manage one unmanaged resource with one managed object, and keep that managed object as simple as possible &amp;ndash; ideally, just to manage that object. Make your resource manager class&amp;nbsp;implement IDisposable and give it a finalizer as a backstop.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-115636450727676216?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/115636450727676216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=115636450727676216' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115636450727676216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115636450727676216'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/08/you-must-call-dispose.html' title='You must call Dispose'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-115608673059224886</id><published>2006-08-20T16:12:00.000+01:00</published><updated>2006-08-20T16:12:10.600+01:00</updated><title type='text'>Anyone managed to get eVC working on Windows Vista Beta 2?</title><content type='html'>&lt;p&gt;My job involves a fair amount of C++ development for Pocket PCs and other Windows CE-based devices. I&amp;rsquo;ve been doing this for five years as of next week, so in that time I&amp;rsquo;ve used &amp;ndash; and deployed projects developed with &amp;ndash;&amp;nbsp;eMbedded Visual C++ 3.0 with the Pocket PC 2000 SDK, the Pocket PC 2002 SDK, eMbedded Visual C++ 4.0 with Pocket PC 2003 SDK and now even a couple of things debugged with VS2005 (note: not &lt;em&gt;compiled&lt;/em&gt; with VS2005 because they needed to be backwards compatible with PPC2003 and not redistribute the MFC 8.0 runtime &amp;ndash; you can&amp;rsquo;t use the MFC 6ish supplied with the PPC2003 SDK with VS2005 because the headers won&amp;rsquo;t compile). To be able to upgrade to Windows Vista, compatibility with eVC is an absolute requirement &amp;ndash; if it doesn&amp;rsquo;t work, I can&amp;rsquo;t upgrade.&lt;/p&gt;&lt;p&gt;(What about running under Virtual PC? Virtual PC doesn&amp;rsquo;t virtualise USB ports, new versions of ActiveSync don&amp;rsquo;t offer network sync, I don&amp;rsquo;t really fancy manual connection setup, and I can&amp;rsquo;t always rely on having devices with network support.)&lt;/p&gt;&lt;p&gt;Unfortunately it seems at the moment that eVC just doesn&amp;rsquo;t work under Vista. eVC 3.0 works with the Pocket PC 2000 SDK (only) installed, but as soon as you install the 2002 SDK (which shipped Platform Manager 4.0) it breaks, taking an access violation exception on opening a project. That&amp;rsquo;s installing with User Account Control enabled. With UAC disabled before installation, it doesn&amp;rsquo;t even get as far as an empty environment after installing the 2002 SDK.&lt;/p&gt;&lt;p&gt;eVC 4.0 barely even installs. If you launch Setup from the Program Compatibility Wizard, after setting Windows 2000 compatibility, it does install; using the default compatibility options (i.e. none) it crashes before even asking for the product key. I did find that a scripted build (using EVC /MAKE from the command line) would build&amp;nbsp;for some platforms but not others, but again would crash on&amp;nbsp;opening a project, making it impossible to debug. I&amp;rsquo;m guessing that UAC gets in the way of installing the SDKs to the right place.&lt;/p&gt;&lt;p&gt;This is a shame. I&amp;rsquo;d hoped that UAC would&amp;nbsp;help with the myriad problems in trying to get eVC (either version) to work&amp;nbsp;under a limited user account.&lt;/p&gt;&lt;p&gt;On Windows XP, to get them working as a limited user, both versions require users to have write-access to their installation directories. This stems from the Access/Jet database used to hold the processor type definitions, VCCEDB.MDB. Write access to this file is needed when running, and if you start more than one copy, Jet needs to create a &amp;lsquo;lock&amp;rsquo; (.ldb) file in the same directory to manage concurrency. There are also registry keys which contain platform definitions under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows CE Tools\Platform Manager, which contain things like the paths under Tools, Options, Directories. If eVC cannot write to this key, it creates an equivalent tree under HKEY_CURRENT_USER, but &lt;em&gt;does not copy the original data&lt;/em&gt;, leaving you with a non-functional SDK. You have to copy the settings (maybe I should write a program to do this). I recall that there are other settings that you have to change the permissions on, but can&amp;rsquo;t recall what they are right now &amp;ndash; it&amp;rsquo;s a while since I last had to do it.&lt;/p&gt;&lt;p&gt;eVC 4.0 also complains that it is unable to update its help system after you install any new SDKs. Running from a command prompt launched by &lt;em&gt;&lt;a href="http://nonadmin.editme.com/MakeMeAdmin"&gt;makemeadmin&lt;/a&gt;&lt;/em&gt; doesn&amp;rsquo;t help, nor does running eVC as an administrator with Run As.&lt;/p&gt;&lt;p&gt;Somewhat related, VS.NET 2003 has a problem with device debugging as a limited user where it will fail to connect to&amp;nbsp;a device that hasn&amp;rsquo;t been used for debugging before. You have to run as an admin (via &lt;em&gt;makemeadmin&lt;/em&gt;) the first time you connect to a device (or the first time after cold booting). I surmise that some part or parts of the encryption keys are stored in a location that isn&amp;rsquo;t writable by a limited user.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-115608673059224886?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/115608673059224886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=115608673059224886' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115608673059224886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115608673059224886'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/08/anyone-managed-to-get-evc-working-on.html' title='Anyone managed to get eVC working on Windows Vista Beta 2?'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-115352472208224828</id><published>2006-07-22T00:32:00.000+01:00</published><updated>2006-07-22T00:32:02.276+01:00</updated><title type='text'>Avoid interactive services</title><content type='html'>&lt;p&gt;It&amp;rsquo;s common, when thinking about providing configuration UI for a Windows service, for the developer to see the &amp;lsquo;Interactive&amp;rsquo; checkbox in the service properties dialog. Or, maybe you have a server program which already has UI, which you&amp;rsquo;d like to turn into a service, and you need that UI to be available to the user.&lt;/p&gt;&lt;p&gt;Don&amp;rsquo;t be tempted.&lt;/p&gt;&lt;p&gt;Interactive services must run under the SYSTEM account (sometimes shown as LocalSystem). Well, OK, it&amp;rsquo;s not really a user account (you won&amp;rsquo;t see it in the user accounts database, it doesn&amp;rsquo;t have a password, it&amp;rsquo;s just assigned by the system to the special processes it creates at boot time like CSRSS and WINLOGON) but it behaves a lot like one. Anyway, the point is that it&amp;rsquo;s very highly privileged, and you should strive to have your services run with only the minimum privileges you need, rather than the maximum available. You cannot create a lower-privileged interactive service.&lt;/p&gt;&lt;p&gt;Interactive services also only work for session 0. On Windows 2000, XP and Server 2003, session 0 is the one which the user logs onto on the physical console &amp;ndash; the actual keyboard, mouse and graphics hardware physically plugged into the machine. In Fast User Switching on XP, the first user to log on gets session 0, subsequent users get their own sessions. Windows XP Professional will remote session 0 if the user currently logged on locally to session&amp;nbsp;0 logs on remotely, or if no user is currently logged on. Windows Server 2003 will only remote session 0 if you pass the /console switch to mstsc.exe (Remote Desktop Connection). Windows 2000 never remotes session 0.&lt;/p&gt;&lt;p&gt;Users with other sessions never see the interactive service UI. If you&amp;rsquo;re trying to notify an administrator of a problem, they may not see the problem until physically logging on at a console, but the trend is towards remote administration. I have to walk all of probably 20 metres to administer servers at work, but it&amp;rsquo;s more convenient to do it at my desk, so I use Remote Desktop, when there isn&amp;rsquo;t a tool I can install on my workstation (for example, I&amp;rsquo;ve installed the Exchange Server 2003 management tools on my computer, and use RunAs to give myself appropriate privileges when using them).&lt;/p&gt;&lt;p&gt;On the current generation of operating systems, interactive services can be vulnerable to so-called &lt;a href="http://en.wikipedia.org/wiki/Shatter_attack"&gt;&amp;ldquo;shatter&amp;rdquo; attacks&lt;/a&gt;, where an attacker sends window messages to the service to cause the service to execute code on his behalf. To mitigate this, Microsoft are making a change for Windows Vista and its successors including the next Windows Server version. Now, no users will log on to session 0 &amp;ndash; it will be reserved for privileged processes only. Instead, the first user will log on to session 1. Since processes cannot send window messages across sessions, the shatter attack can no longer&amp;nbsp;work. But this means that now &lt;em&gt;no-one&lt;/em&gt; will see your UI. For more information, see the whitepaper &lt;a href="http://www.microsoft.com/whdc/system/vista/services.mspx"&gt;&amp;ldquo;Impact of Session 0 Isolation on Services and Drivers in Windows Vista&amp;rdquo;&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;So what to do? You will have to come up with some method of inter-process communication to allow a separate UI process to send commands to the service and display results. You might as well make it a network-capable IPC mechanism &amp;ndash; then you can make your UI process capable of running on another machine.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-115352472208224828?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/115352472208224828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=115352472208224828' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115352472208224828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115352472208224828'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/07/avoid-interactive-services.html' title='Avoid interactive services'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-115306385816326748</id><published>2006-07-16T16:30:00.000+01:00</published><updated>2006-08-20T15:53:00.536+01:00</updated><title type='text'>Warning: Installing VS 6.0 on Vista Beta 2 leaves vulnerable Java VM</title><content type='html'>&lt;p&gt;I still need to use Visual Studio 6.0 at work &amp;ndash; we have a lot of legacy software, and even some actively enhanced software, which uses VB 6.0 and Visual C++ 6.0. The installer for Enterprise Edition requires Microsoft&amp;rsquo;s Java VM to be installed and won&amp;rsquo;t continue without it. The version installed dates from 1998 (as does VS 6.0, of course) and is Build 2572.&lt;/p&gt;&lt;p&gt;&lt;em&gt;Windows Update does not offer any updates for this VM on Vista Beta 2&lt;/em&gt;. There is no other source of updates. There were many security patches for this software.&lt;/p&gt;&lt;p&gt;When you have finished installing Visual Studio 6.0 you should &lt;em&gt;immediately&lt;/em&gt; uninstall the VM.&lt;/p&gt;&lt;p&gt;You should also of course install Visual Studio 6.0 Service Pack 6. Some users have reported problems installing VS6 SP5 but I had no problems with SP6. Well, except that Windows Vista popped up a compatibility box claiming that the software hadn&amp;rsquo;t installed correctly, but it seemed to be OK.&lt;/p&gt;&lt;p&gt;If you need Java you should &lt;a href="http://java.sun.com/getjava"&gt;install Sun&amp;rsquo;s runtime environment&lt;/a&gt; (at time of writing version 5.0 Update 7). Note that when you have the JRE loaded, the Aero environment will shut down and you&amp;rsquo;ll revert to the Basic theme &amp;ndash; no &amp;lsquo;cool&amp;rsquo; 3D or&amp;nbsp;glass&amp;nbsp;effects &amp;ndash; until the process that launched Java shuts down. This is because the JRE uses DirectX in an exclusive mode to do its drawing. This is supposed to be fixed by Vista RTM (&lt;a href="http://blogs.msdn.com/greg_schechter/archive/2006/03/10/549310.aspx"&gt;source&lt;/a&gt;).&lt;/p&gt;&lt;p&gt;[&lt;strong&gt;Update:&lt;/strong&gt; I have discovered that you can fake it by simply placing an empty file called &lt;em&gt;msjava.dll&lt;/em&gt; in your System32 directory (presumably SysWOW64 on an x64 box). This also works for machines installed from clean with Windows XP Service Pack 2, which doesn&amp;rsquo;t include the Microsoft VM, although Windows Update &lt;em&gt;does&lt;/em&gt; offer updates for the Microsoft VM after installing from the VS 6.0 CD, on XP.]&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-115306385816326748?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/115306385816326748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=115306385816326748' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115306385816326748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/115306385816326748'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/07/warning-installing-vs-60-on-vista-beta.html' title='Warning: Installing VS 6.0 on Vista Beta 2 leaves vulnerable Java VM'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-114842191373104693</id><published>2006-05-23T23:05:00.000+01:00</published><updated>2006-05-23T23:05:13.920+01:00</updated><title type='text'>Don't bother using Google to search for Windows APIs anymore</title><content type='html'>&lt;p&gt;I&amp;rsquo;ve tried several times over the last&amp;nbsp;week or so&amp;nbsp;to look up details of an API, given its&amp;nbsp;name,&amp;nbsp;using Google (using a search engine in the web browser is still faster than waiting for the documentation browser to load) and have found that the official documentation (that is, msdn.microsoft.com)&amp;nbsp;has just plummeted off the list.&lt;/p&gt;&lt;p&gt;MSN Search still brings up the API documentation usually as the first or second result (often, if it&amp;rsquo;s a routine that Windows CE also implements, it&amp;rsquo;s the first &lt;em&gt;and&lt;/em&gt; second result). In case you think this is a quirk or that somehow Microsoft are blocking Google&amp;rsquo;s spider, it&amp;rsquo;s interesting to note that MSDN is usually the top hit on Yahoo search as well. Of course that doesn&amp;rsquo;t prove that Microsoft aren&amp;rsquo;t blocking Google&amp;rsquo;s spider.&lt;/p&gt;&lt;p&gt;If, like me, you&amp;rsquo;re using IE 7 Beta 2, you can use the MSDN Lab search (which uses MSN Search under the covers) directly from the browser search box by going to &lt;a href="http://lab.msdn.microsoft.com/search/"&gt;http://lab.msdn.microsoft.com/search/&lt;/a&gt;&amp;nbsp;and clicking the &amp;ldquo;Got IE7? &amp;ndash; get our search&amp;rdquo; link in the bottom right-hand corner.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-114842191373104693?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/114842191373104693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=114842191373104693' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114842191373104693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114842191373104693'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/05/dont-bother-using-google-to-search-for.html' title='Don&apos;t bother using Google to search for Windows APIs anymore'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-114399318688067059</id><published>2006-04-02T16:53:00.000+01:00</published><updated>2006-04-02T16:53:08.633+01:00</updated><title type='text'>A question for the mobile networks: when are you going to deploy EDGE?</title><content type='html'>&lt;p&gt;Mobile data communications is starting to become a major business tool, for many logistics and distribution companies, and businesses who have a logistics or distribution component. Instead of downloading a whole batch of work to a handheld or other mobile computer, then uploading the results of the whole batch at the end of the working day, the business can get more timely information by having the mobile send its results as work is done. The business can also expose some of this information to its end customers, for applications like live package tracking. A system can even send live data updates of additional work required to the mobile computer, reducing requirements for the user to manually input job information.&lt;/p&gt;&lt;p&gt;For timely updates and responsive applications, it helps to have fast transfer speeds. The last generation of enterprise mobile handhelds, at least here in the UK, supported integrated GPRS. The new generation just coming on stream support &lt;a href="http://en.wikipedia.org/wiki/EDGE"&gt;EDGE&lt;/a&gt; &amp;ndash; Enhanced Data rates for GSM Evolution (hmm, smells like an invented name to me). EDGE offers more bandwidth than GPRS, but is entirely compatible with GSM using the same basic radio format, unlike &lt;a href="http://en.wikipedia.org/wiki/Universal_Mobile_Telecommunications_System"&gt;UMTS&lt;/a&gt; (3G). This enables existing GSM networks to be upgraded to support the higher data rates.&lt;/p&gt;&lt;p&gt;Unfortunately, on the whole, the UK networks haven&amp;rsquo;t. They&amp;rsquo;ve concentrated on 3G. Orange have &lt;a href="http://www.3g.co.uk/PR/Feb2006/2548.htm"&gt;recently announced&lt;/a&gt; some EDGE support, while (as far as I know) the others have made no such announcements.&lt;/p&gt;&lt;p&gt;The networks spent a huge amount of money on 3G licences, and the customers basically haven&amp;rsquo;t turned up (ok, Ian, I&amp;rsquo;m excepting you and your N90!) It shouldn&amp;rsquo;t matter &lt;em&gt;where&lt;/em&gt; they recoup this investment &amp;ndash; hell, it&amp;rsquo;s now a sunk cost. Recouping from the mass market of existing 2G customers, to me, makes more sense than trying to charge huge premiums on UMTS.&lt;/p&gt;&lt;p&gt;Adding EDGE would also improve&amp;nbsp;bandwidth for 3G users outside the 3G coverage area, probably at a lower cost than expanding the 3G network, assuming that the user&amp;rsquo;s equipment also supports EDGE.&lt;/p&gt;&lt;p&gt;Now, I wonder if &lt;a href="http://geekswithblogs.net/waterbaby/archive/2006/03/30/73846.aspx"&gt;someone&lt;/a&gt; could ask this question for me? &lt;img src="http://www.dimmick.demon.co.uk/blog/smile3.gif" /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-114399318688067059?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/114399318688067059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=114399318688067059' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114399318688067059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114399318688067059'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/04/question-for-mobile-networks-when-are.html' title='A question for the mobile networks: when are you going to deploy EDGE?'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-114388700694447966</id><published>2006-04-01T11:23:00.000+01:00</published><updated>2006-04-01T11:23:27.003+01:00</updated><title type='text'>Race condition in eVC linker?</title><content type='html'>&lt;p&gt;I&amp;rsquo;m not sure exactly why this happened. Yesterday I was trying to do a batch build for one of our most complex components &amp;ndash; our Barcode Scanner Hardware Abstraction Layer (ScanHAL). This is a set of libraries which implement the same interface, to make our applications hardware independent with respect to the barcode scanner, making it possible to run more-or-less seamlessly on HHP Dolphin, Intermec and Symbol hardware, as well as on handhelds with no built-in barcode scanner (there&amp;rsquo;s a stub implementation). The clever bit (heh) is that all of the different libraries are included in the same CAB package, with a setup DLL which probes to decide which library is correct for the handheld it&amp;rsquo;s running on.&lt;/p&gt;&lt;p&gt;Anyway, the release process involves a batch build of everything, which rebuilds everything from source. For historical reasons the projects still support Pocket PC 2000, which ran on a bunch of different processor types (ARM, MIPS, SH3, x86 emulation). The build process currently builds both debug and release builds. For one particular customer, we made available a release build with debugging information, stripped of private symbol information using a tool by &lt;a href="http://www.wintellect.com/TechnicalBioDetail.aspx?Tech=4"&gt;John Robbins&lt;/a&gt; called PrivateStrip &amp;ndash; this means that they can tell us which function&amp;nbsp;the program crashed on, if it does, but can&amp;rsquo;t easily disassemble the library. So in all there are about 20 different configurations of different libraries that need to be built.&lt;/p&gt;&lt;p&gt;Unfortunately since &lt;a href="http://www.wintellect.com/"&gt;Wintellect&lt;/a&gt; reorganised their website, PrivateStrip is no longer available. I hope they&amp;rsquo;ll reinstate it.&lt;/p&gt;&lt;p&gt;Yesterday, the linker was repeatedly hanging in the last stage of building DLLs: it had just output the message about building the .LIB and .EXP files, but wasn&amp;rsquo;t completing the build. On a couple of occasions it did this on the last DLL &amp;ndash; but it wasn&amp;rsquo;t consistently on any given DLL. My work machine is hyperthreading-capable, and this was happening with HT enabled. Turning HT off enabled me to complete the build.&lt;/p&gt;&lt;p&gt;I don&amp;rsquo;t know whether this would also happen on a dual-core or other multiprocessor machine.&lt;/p&gt;&lt;p&gt;You might need to be careful if you&amp;rsquo;re using older tools (eVC 3.0 and 4.0 both use modified versions of Visual C++ 6.0&amp;rsquo;s LINK.EXE) on a computer with more than one logical or physical processor.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-114388700694447966?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/114388700694447966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=114388700694447966' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114388700694447966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114388700694447966'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/04/race-condition-in-evc-linker.html' title='Race condition in eVC linker?'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-114323772895960548</id><published>2006-03-24T22:02:00.000Z</published><updated>2006-03-24T22:02:09.033Z</updated><title type='text'>Best line from Hustle tonight</title><content type='html'>&lt;p&gt;&lt;em&gt;Tailor:&lt;/em&gt; &amp;ldquo;Do you dress to the right, sir?&amp;rdquo;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Danny:&lt;/em&gt; &amp;ldquo;No, I always vote New Labour.&amp;rdquo;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Tailor: &amp;ldquo;&lt;/em&gt;Ah, swinging to the right it is&amp;hellip;&amp;rdquo;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-114323772895960548?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/114323772895960548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=114323772895960548' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114323772895960548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114323772895960548'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/03/best-line-from-hustle-tonight.html' title='Best line from Hustle tonight'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-114270601019868896</id><published>2006-03-18T18:20:00.000Z</published><updated>2006-03-18T18:20:10.260Z</updated><title type='text'>Subtle interaction between WM_DESTROY handler and OnFinalMessage in ATL for CE</title><content type='html'>&lt;p&gt;There&amp;rsquo;s a subtle issue around handling WM_DESTROY in an ATL window and also overriding &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/vcrefcwindowimplonfinalmessage.asp"&gt;OnFinalMessage&lt;/a&gt;, if using the ATL windowing classes on Windows CE. &lt;/p&gt;&lt;p&gt;Typically, you would override OnFinalMessage if you wanted to do some final cleanup when the window has been destroyed and no further messages will be received. The canonical example &amp;ndash; given in the documentation &amp;ndash; is automatically deleting the object that manages the window using &lt;em&gt;delete this&lt;/em&gt;.&lt;/p&gt;&lt;p&gt;On the desktop, OnFinalMessage is called by the CWindowImplBaseT::WindowProc function after the WM_NCDESTROY message is received. Since Windows CE top-level windows don&amp;rsquo;t &lt;em&gt;have&lt;/em&gt; a non-client area, the non-client messages were removed from the platform. The Windows CE version of ATL therefore uses WM_DESTROY instead.&lt;/p&gt;&lt;p&gt;The code inside WindowProc only cleans up the window proc thunks (dynamic objects containing code used to patch between Windows&amp;rsquo; expectation of a flat API, and a call to a C++ object member function) and calls OnFinalMessage if the message (WM_DESTROY or WM_NCDESTROY as appropriate) is &lt;em&gt;not&lt;/em&gt; handled. This means it will work fine if you don&amp;rsquo;t override WM_DESTROY, but what if you need to do some cleanup here?&lt;/p&gt;&lt;p&gt;The last parameter of a message handling function in ATL is a BOOL reference typically named &lt;em&gt;bHandled&lt;/em&gt;. This is set to TRUE by the message map macros (ATL message map macros generate a big &lt;em&gt;if&lt;/em&gt; statement, rather than being table-driven like MFC) on calling the message handling function. If the value is still TRUE when the function returns, the message map considers it handled and stops processing; if it&amp;rsquo;s FALSE the macro code keeps looking for a handler.&lt;/p&gt;&lt;p&gt;If you handle WM_DESTROY on CE using ATL, you &lt;em&gt;must&lt;/em&gt; set &lt;em&gt;bHandled&lt;/em&gt; to FALSE, otherwise the window will never be cleaned up, and OnFinalMessage will not be called. The same is true if you handle WM_NCDESTROY on the desktop, but since this message is rarely handled, it&amp;rsquo;s less of an issue.&lt;/p&gt;&lt;p&gt;This issue was responsible for me leaking 96 bytes in a program every time an activity was completed, which doesn&amp;rsquo;t sound like a lot, but any long-running application needs to be free of leaks as far as possible. This was actually a Compact Framework program for the most part &amp;ndash; this window implemented a signature capture control, which is actually pretty hard to do in CF 1.0, and we already had working C++ code (excepting leaks&amp;hellip;). For some strange reason, though, a leak of 96 bytes here was causing an overall leak of over 300KB of virtual memory! Removing this leak has got it down to about 160KB but I&amp;rsquo;m stumped on where the rest of it&amp;rsquo;s going &amp;ndash; the amount of VM allocated increases by 160KB whenever the form containing the control is created, but that isn&amp;rsquo;t returned when the form is disposed. A C++ program containing the control doesn&amp;rsquo;t exhibit the same behaviour.&lt;/p&gt;&lt;p&gt;Compact Framework seems to do wacky things to the process default heap, which usually means that you can&amp;rsquo;t actually view it with Remote Heap Walker &amp;ndash; it&amp;nbsp;aborts after several seconds of trying to walk the heap. To find this leak I created a non-default heap, overrode &lt;em&gt;operator new &lt;/em&gt;and &lt;em&gt;operator delete&lt;/em&gt; to allocate and free from this alternative heap, then viewed that.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-114270601019868896?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/114270601019868896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=114270601019868896' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114270601019868896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114270601019868896'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/03/subtle-interaction-between-wmdestroy.html' title='Subtle interaction between WM_DESTROY handler and OnFinalMessage in ATL for CE'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-114225747824030879</id><published>2006-03-13T13:35:00.000Z</published><updated>2006-03-13T13:44:38.290Z</updated><title type='text'>Time to move on?</title><content type='html'>&lt;p&gt;I'm thinking about moving away from Blogger/BlogSpot. It's not a great fit for my content really. I'm considering either &lt;a href="http://geekswithblogs.net/"&gt;geekswithblogs.net&lt;/a&gt; or &lt;a href="http://wdevs.com/"&gt;wdevs.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;If you're subscribed and want to follow me if/when I do move, I've added a &lt;a href="http://feeds.feedburner.com/MikeDimmick"&gt;feed&lt;/a&gt; through FeedBurner which should allow me to automatically switch to whichever new service I go for. In the spirit of full disclosure I should add that it &lt;i&gt;also&lt;/i&gt; allows me to track who's reading my feed, which I don't get at the moment from Blogger. I believe it also does content negotiation, so if your aggregator supports RSS you should get RSS while if it supports Atom you should get Atom.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-114225747824030879?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/114225747824030879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=114225747824030879' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114225747824030879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114225747824030879'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/03/time-to-move-on.html' title='Time to move on?'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-114225118712667772</id><published>2006-03-13T11:51:00.000Z</published><updated>2006-03-13T11:59:47.136Z</updated><title type='text'>Tired of cancelling ActiveSync Partnership Wizard?</title><content type='html'>&lt;p&gt;If you're a developer using Windows Mobile or Windows CE devices, you may be a bit fed up with the Partnership Wizard that appears when you connect a device. If you decide to create a partnership every time, your list of partnerships grows huge, you keep having to think of a unique name, and you still have to do it every time after hard resetting the device. Alternatively, if you cancel out or opt to connect as Guest, you have to do this every time you connect. After nearly five years of mobile device development I'm sick at the sight of this wizard.&lt;/p&gt;&lt;p&gt;There is another option: to use an undocumented registry key to stop the wizard appearing. Open Registry Editor (as an administrator) and navigate to &lt;i&gt;HKEY_LOCAL_MACHINE\Software\Microsoft\Windows CE Services&lt;/i&gt;. Create a new DWORD value called &lt;i&gt;GuestOnly&lt;/i&gt; and set its value to 1. The wizard will no longer appear on connecting a device. If you ever do need to create a partnership, you'll need to set this value back to 0 before connecting.&lt;/p&gt;&lt;p&gt;If you already have a partnership with a device, it will still connect with its partnership, rather than as Guest, even if this option is set.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-114225118712667772?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/114225118712667772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=114225118712667772' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114225118712667772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114225118712667772'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/03/tired-of-cancelling-activesync.html' title='Tired of cancelling ActiveSync Partnership Wizard?'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-114219124366706090</id><published>2006-03-12T19:20:00.000Z</published><updated>2006-03-12T19:20:43.736Z</updated><title type='text'>What's the difference between x64 and IA-64?</title><content type='html'>&lt;p&gt;There still seems to be a bit of confusion over the identity of 64-bit processors for Windows operating systems. Windows runs on two types of 64-bit processor, identified as &lt;em&gt;x64&lt;/em&gt; and &lt;em&gt;IA-64&lt;/em&gt;.&lt;/p&gt;&lt;p&gt;Going with the oldest first, IA-64 stands for &lt;em&gt;Intel Architecture, 64-bit&lt;/em&gt; and was Intel&amp;rsquo;s attempt to move to a 64-bit architecture. It remains compatible with 32-bit &lt;em&gt;user-mode&lt;/em&gt; code through hardware emulation, but this hardware emulation performs so poorly relative to a genuine x86 that all operating systems shipping for IA-64 now include a software x86 emulation called IA-32 EL. IA-64 is the instruction set; the family of processors which implement it are named &lt;em&gt;Itanium&lt;/em&gt; (which you&amp;rsquo;ll see critics refer to as &lt;em&gt;Itanic&lt;/em&gt;, suggesting that it&amp;rsquo;s sinking) and so you&amp;rsquo;ll sometimes see code written for them referenced as &lt;em&gt;Itanium Processor Family&lt;/em&gt; or &lt;em&gt;IPF&lt;/em&gt;. You need a new operating system to run &lt;em&gt;any&lt;/em&gt; code on an Itanium &amp;ndash; it cannot boot a 32-bit operating system.&lt;/p&gt;&lt;p&gt;x64 is actually a Microsoft term and stands for &lt;em&gt;Extended 64&lt;/em&gt;. It is implemented by both AMD and Intel who respectively call it AMD64 and EM-64T (&lt;em&gt;Extended Memory 64 Technology&lt;/em&gt;). AMD invented it as extensions to the existing x86 architecture. An x64-capable processor natively implements x86 in hardware &amp;ndash; it &lt;em&gt;is&lt;/em&gt; an x86 processor, with additional modes. It boots up in the same 16-bit &amp;lsquo;real mode&amp;rsquo; that an x86 does. It can run existing 32-bit operating systems. You may well have an x64-capable processor without realising it. All AMD Athlon 64 and Opteron processors, and Intel Pentium 4, Pentium D&amp;nbsp;and Xeon processors built within about the last year, implement x64. To check whether your Intel processor supports x64, use Intel&amp;rsquo;s &lt;a href="http://www.intel.com/support/processors/tools/piu/"&gt;Processor Identification Utility&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Itanium had the early lead and for a while held the general performance crown, but the relentless increase in x86 clock speeds eventually had AMD&amp;rsquo;s Opteron overtake it for integer calculation performance. Itanium still leads for floating point performance but has been stuck at 1.6GHz for about two years, if I recall correctly. It&amp;rsquo;s liable to be beaten by Intel&amp;rsquo;s own &amp;lsquo;Woodcrest&amp;rsquo; Xeon-replacement later this year, in my opinion, if it remains stuck at this (now relatively low) speed.&lt;/p&gt;&lt;p&gt;Itanium is now pretty-much reserved to big-iron datacentre servers. It&amp;rsquo;s good for highly computationally-intensive applications. If you just need lots of memory, go with x64. Itanium used to have an advantage in number of supported processors too, but IBM recently started selling the xSeries 460 which supports up to 32 dual-core Xeons. This hits Microsoft&amp;rsquo;s limit of 64 logical processors which applies to both architectures.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-114219124366706090?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/114219124366706090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=114219124366706090' title='57 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114219124366706090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114219124366706090'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/03/whats-difference-between-x64-and-ia-64.html' title='What&apos;s the difference between x64 and IA-64?'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>57</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-114205481424947134</id><published>2006-03-11T05:26:00.000Z</published><updated>2006-03-11T05:26:54.256Z</updated><title type='text'>Development Tools for Windows CE and Windows Mobile</title><content type='html'>&lt;p&gt;This is kind of a brain-dump. I get asked this a fair bit &amp;ndash; which tools do you need to develop for Windows CE and/or Windows Mobile? (&lt;a href="http://mikedimmick.blogspot.com/2006/01/whats-difference-between-windows.html"&gt;See here for the difference&lt;/a&gt;.)&lt;/p&gt;&lt;p&gt;&lt;em&gt;Native code:&lt;/em&gt;&lt;/p&gt;&lt;p&gt;For Windows CE 3.0 custom platforms, Pocket PC 2000 and Pocket PC 2002: eMbedded Visual C++ 3.0. You cannot debug on these older devices using eVC 4.0; you can&amp;rsquo;t debug CE 4.x or later devices using eVC 3.0.&lt;/p&gt;&lt;p&gt;For Windows CE 4.x custom platforms: eMbedded Visual C++ 4.0. At least SP1 is required for CE 4.1, SP2 for CE 4.2, latest is SP4. SP1 and SP2 were mutually exclusive &amp;ndash; if you installed SP2 you couldn&amp;rsquo;t develop for CE 4.1; this was rectified in SP3.&lt;/p&gt;&lt;p&gt;For Pocket PC 2003 (alternatively Windows Mobile 2003 for Pocket PC), Smartphone 2003 (Windows Mobile 2003 for Smartphone) and respective Second Editions: eVC 4.0 SP2 or later, or VS 2005.&lt;/p&gt;&lt;p&gt;For Windows CE 5.x custom platforms: eVC 4.0 SP4, or VS 2005. You will get link errors complaining about corrupt debug information if you use eVC 4.0&amp;nbsp;because the platforms are actually built using version 13.1 (VS2003&amp;ndash;compatible) compilers while eVC 4.0 SP4 can only handle debug information from version 12.0 (VC 6.0&amp;ndash;compatible) compilers, hence SP4 only includes 12.0 compilers.&lt;/p&gt;&lt;p&gt;For Windows Mobile 5.0: VS 2005 only. The SDKs do not install into eVC 4.0.&lt;/p&gt;&lt;p&gt;For whatever device you&amp;rsquo;re building for, you need the correct SDK. However, you will find that&amp;nbsp;programs are binary-compatible across different CE platforms, &lt;em&gt;if the APIs required by the program are present on the platform&lt;/em&gt;. Using the correct SDK ensures&amp;nbsp;that you build&amp;nbsp;for the correct&amp;nbsp;processor type and don&amp;rsquo;t accidentally reference APIs that won&amp;rsquo;t be available at runtime.&lt;/p&gt;&lt;p&gt;&lt;em&gt;Managed code:&lt;/em&gt;&lt;/p&gt;&lt;p&gt;.NET Compact Framework 1.0 is supported for Pocket PC 2002, Windows Mobile 2003 for Pocket PC, Windows Mobile 2003 for Smartphone and Windows Mobile 5.0, and custom CE 4.x platforms. For Pocket PC 2002 you must use VS.NET 2003; for Windows Mobile 5.0 you need VS 2005 (I think). For Windows Mobile 2003 you can use either, and I would strongly recommend using VS 2005 as soon as you can stand to convert your project. This will completely rewrite your &lt;em&gt;resx&lt;/em&gt; files. Converting the project does &lt;em&gt;not&lt;/em&gt; mean immediately upgrading to .NET Compact Framework 2.0, that&amp;rsquo;s a separate step.&lt;/p&gt;&lt;p&gt;.NET Compact Framework 2.0 requires VS 2005 and only runs on Windows Mobile 2003 for Pocket PC (&lt;em&gt;not&lt;/em&gt; WM2003 Smartphone), and CE 5.0 and Windows Mobile 5.0 devices.&lt;/p&gt;&lt;p&gt;VS2005 requires ActiveSync 4.1, minimum, for deployment and debugging. I was originally annoyed at the loss of network synchronisation capability, but found that, if a wireless connection is present, you can begin a debugging session over USB and continue over wireless if you disconnect from the cradle or cable.&lt;/p&gt;&lt;p&gt;To complete the compatibility matrix, as far as I can see CF1.0&amp;rsquo;s SqlCeClient only works with SQL Server CE 2.0 while CF2.0&amp;rsquo;s only works with SQL Mobile 2005 (SQL Server 2005 Mobile Edition). If anyone knows different let me know.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-114205481424947134?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/114205481424947134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=114205481424947134' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114205481424947134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114205481424947134'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/03/development-tools-for-windows-ce-and.html' title='Development Tools for Windows CE and Windows Mobile'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-114107400504809840</id><published>2006-02-27T21:00:00.000Z</published><updated>2006-02-27T21:00:05.106Z</updated><title type='text'>I tried so hard</title><content type='html'>&lt;p&gt;I tried so hard, but I was defeated.&lt;/p&gt;&lt;p&gt;I was looking to buy &lt;a href="http://www.satriani.com/"&gt;Joe Satriani&lt;/a&gt;&amp;rsquo;s new album, &amp;ldquo;&lt;a href="http://www.satriani.com/2004/discography/Super_Colossal/"&gt;Super Colossal&lt;/a&gt;&amp;rdquo;, from a genuine UK retailer &amp;ndash; ideally actually a UK copy. First of all, it doesn&amp;rsquo;t look like this is getting a UK release, or at least if it is, there&amp;rsquo;s no official information on it.&lt;/p&gt;&lt;p&gt;OK, so it has to be an import. I look on Amazon UK, it&amp;rsquo;s there, I pre-order it. About a day later I get an email &amp;ndash; they&amp;rsquo;re cancelling the order. So now I&amp;rsquo;m buying from CD-WOW instead. Since this is Sony USA, I hope it&amp;rsquo;s not too badly DRM infested (although I am of course running as a limited user).&lt;/p&gt;&lt;p&gt;If you&amp;rsquo;re interested, Joe&amp;rsquo;s &lt;a href="http://www.satriani.com/podcast/Super_Colossal/"&gt;podcasting&lt;/a&gt; a little about each track, plus a one minute (or so) preview of the track. Schedule: Monday/Wednesday/Friday. If you want the videos, you&amp;rsquo;ll need QuickTime 7. I&amp;rsquo;m using Media Player Classic plus ffdshow codecs.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-114107400504809840?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/114107400504809840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=114107400504809840' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114107400504809840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/114107400504809840'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/02/i-tried-so-hard.html' title='I tried so hard'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-113995528232941236</id><published>2006-02-14T22:14:00.000Z</published><updated>2006-02-14T22:14:42.386Z</updated><title type='text'>Back in time</title><content type='html'>&lt;p&gt;I&amp;rsquo;ve been meaning to switch around the samples of the &lt;a href="http://mikedimmick.blogspot.com/2004/08/it-was-twenty-years-ago-today.html"&gt;band I was in&lt;/a&gt;, back in sixth form. This is an appropriate day to do it, because the song I&amp;rsquo;ve put up was written the day after Valentine&amp;rsquo;s in 1995, and it was written because of what happened.&lt;/p&gt;&lt;p&gt;Song: &lt;a href="http://www.dimmick.demon.co.uk/media/tornintwo.mp3"&gt;Torn In Two&lt;/a&gt; (MP3, 128kbps, 7.2MB, 7:53).&lt;/p&gt;&lt;p&gt;The song, basically, is about Dave having a crush on a girl in his music class, and her not being interested. He sent her a card, she sent him a note, and he was pretty cut up. He wrote some lyrics that night (first verse and chorus, if I remember right), the following morning he and Roger put together a chord sequence and basic vocal melody, then that afternoon I joined them to practice. After Roger had to leave, I added the second verse, and David and I put together the third. I took some of my inspiration from my own feelings at the time (yup, more unrequited crushing) and some from the note Dave received. There are harder things to take when you&amp;rsquo;re 17 than &amp;lsquo;I just want to be friends,&amp;rsquo; but not all that many.&lt;/p&gt;&lt;p&gt;We practiced the song for about a week, then Dave called his guitar teacher and asked if, instead of a lesson, we could record it. Our then-drummer, James, couldn&amp;rsquo;t make it, so we had Nigel, the teacher, program a sequencer with a simple drum beat. Roger and&amp;nbsp;Dave played together, with me singing a guide track,&amp;nbsp;to get the keyboard track into the sequencer as well. Then Dave let it all out (and boy, did he let it out) on his lead guitar track &amp;ndash; that&amp;rsquo;s all one take I think, or it might be two. I added the vocals, then we asked Nige to add a bass track for us. There&amp;rsquo;s a little &amp;lsquo;fill&amp;rsquo; bit in the bassline where the fridge motor cut in and knocked the sequencer out for half a bar! A quick mix later and we had something. I can&amp;rsquo;t recall if Dave sent the girl in question a tape or not &amp;ndash; he may well have!&lt;/p&gt;&lt;p&gt;I&amp;rsquo;m not sure if we were asked, or Dave asked, to perform Torn In Two at a school concert. The girl asked us not to, but by that point Dave had got over it a bit, so we did it anyway.&lt;/p&gt;&lt;p&gt;Six months later we had a new drummer, Chris,&amp;nbsp;and returned to Nige&amp;rsquo;s studio to record four more tracks (among them, &lt;a href="http://mikedimmick.blogspot.com/2004/08/it-was-twenty-years-ago-today.html"&gt;Survivor&lt;/a&gt;). We asked if we could add a new, live, drum track to Torn In Two. We found the tape, which had miraculously not been recorded over, but the sequencer program was gone: Roger had to re-record the keyboards. Nige programmed in a &amp;lsquo;click&amp;rsquo; track for Chris to follow, since the sequencer timing data was still on the tape. I&amp;rsquo;m still amazed at just how well Chris was able to add drum fills building to some key parts in Dave&amp;rsquo;s solos.&lt;/p&gt;&lt;p&gt;I love this song. It&amp;rsquo;s my favourite of the ones we recorded. Now that I have my own guitar, it&amp;rsquo;s one of the songs I practice, although I&amp;rsquo;m only playing the chords in a semi-acoustic setup.&lt;/p&gt;&lt;p&gt;I&amp;rsquo;ve left &lt;a href="http://www.dimmick.demon.co.uk/media/survivor.mp3"&gt;Survivor&lt;/a&gt; up for the moment; I&amp;rsquo;ve re-encoded to 128kbps to save some space and download time.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-113995528232941236?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/113995528232941236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=113995528232941236' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113995528232941236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113995528232941236'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/02/back-in-time.html' title='Back in time'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-113891613886921728</id><published>2006-02-02T21:35:00.000Z</published><updated>2006-02-02T21:35:38.903Z</updated><title type='text'>WeWare?</title><content type='html'>&lt;p&gt;Eric Sink has a great article &amp;ldquo;&lt;a title="Eric.Weblog()" href="http://software.ericsink.com/articles/Yours_Mine_Ours.html"&gt;Yours, Mine and Ours&lt;/a&gt;&amp;rdquo; in which he discusses different types of software:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&amp;ldquo;I claim here that there are three categories of software:&lt;/p&gt;&lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;&lt;li&gt;&lt;b&gt;MeWare&lt;/b&gt;:&amp;nbsp; The developer creates software.&amp;nbsp; The developer uses it.&amp;nbsp; Nobody else does. &lt;li&gt;&lt;b&gt;ThemWare&lt;/b&gt;:&amp;nbsp; The developer creates software.&amp;nbsp; Other people use it.&amp;nbsp; The developer does not. &lt;li&gt;&lt;b&gt;UsWare&lt;/b&gt;:&amp;nbsp; The developer creates software.&amp;nbsp; Other people use it.&amp;nbsp; The developer uses it too.&amp;rdquo;&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;p&gt;Can I add &lt;strong&gt;WeWare&lt;/strong&gt; to that list? I define it as &lt;strong&gt;MeWare&lt;/strong&gt; but for your own development team. This gives it a slightly larger audience &amp;ndash; requiring a &lt;em&gt;touch&lt;/em&gt; more thought than MeWare in user interface and usability, but not really requiring the robustness or even completeness of true UsWare.&lt;/p&gt;&lt;p&gt;I spend a fair chunk of my time on WeWare &amp;ndash; libraries for helping to complete a project rather than actually writing the code that solves the customer&amp;rsquo;s problem. Of course I do a lot of that too.&lt;/p&gt;&lt;p&gt;We&amp;rsquo;re still having trouble pushing Meteor Server over the chasm from WeWare to UsWare (from an application-development point of view, at least &amp;ndash; there are plenty of installations where &lt;em&gt;we&lt;/em&gt; wrote the application). We might have a couple of customers now, but it remains to be seen whether they&amp;rsquo;re able to run with it themselves.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-113891613886921728?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/113891613886921728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=113891613886921728' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113891613886921728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113891613886921728'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/02/weware.html' title='WeWare?'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-113891481537064275</id><published>2006-02-02T21:13:00.000Z</published><updated>2006-02-02T21:17:39.506Z</updated><title type='text'>Why you should install and enable a firewall on your PC</title><content type='html'>&lt;p&gt;&amp;hellip;even if you have a hardware firewall/NAT/whatever.&lt;/p&gt;&lt;p&gt;Larry Osterman has a great post &amp;ldquo;&lt;a title="Larry Osterman's WebLog" href="http://blogs.msdn.com/larryosterman/archive/2006/02/02/523259.aspx"&gt;Firewalls, a history lesson&lt;/a&gt;,&amp;rdquo; in which he makes an analogy to the first world war. An interesting read.&lt;/p&gt;&lt;p&gt;I should take up this fight with my colleagues again. They all think I&amp;rsquo;m crazy for running as a low-privileged user and having the XP SP2 software firewall on, but when one of the salesmen brings their horribly-infected notebooks into the office for me to disentangle, I&amp;rsquo;m glad of it.&lt;/p&gt;&lt;p&gt;I remain unconvinced of the merits of a two-way firewall: the trick is not to get the malware onto your PC in the first place. Two-way firewalls are pretty annoying whenever there&amp;rsquo;s a change to the &lt;em&gt;client&lt;/em&gt; software you use; you only have to configure an incoming-only firewall when there&amp;rsquo;s a change to the &lt;em&gt;services you provide&lt;/em&gt;. There&amp;rsquo;s a common problem in computer security &amp;ndash; ensuring that you don&amp;rsquo;t train the user to just click &amp;lsquo;Yes&amp;rsquo; all the time. That&amp;rsquo;s why the &amp;lsquo;enter root password for elevation&amp;rsquo; prompts in Mac OS X worry me, especially since there doesn&amp;rsquo;t seem to be a way for the user&amp;nbsp;to validate that the prompt came from a secure subsystem rather than J. Random Malware. I&amp;rsquo;m actually happier that the initial plan for Windows Vista is that &amp;ldquo;&lt;a href="http://blogs.msdn.com/uac/archive/2006/01/22/516066.aspx"&gt;Consent Admins&lt;/a&gt;&amp;rdquo; will default to being presented simply with a dialog explaining the elevation, to which you click Permit to elevate or Deny to refuse.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-113891481537064275?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/113891481537064275/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=113891481537064275' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113891481537064275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113891481537064275'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/02/why-you-should-install-and-enable.html' title='Why you should install and enable a firewall on your PC'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-113874677701967227</id><published>2006-01-31T22:32:00.000Z</published><updated>2006-01-31T22:32:57.053Z</updated><title type='text'>MLP</title><content type='html'>&lt;p&gt;&lt;a title="Sorting It All Out" href="http://blogs.msdn.com/michkap/archive/2006/01/30/519993.aspx"&gt;One reason you should clean up warnings&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-113874677701967227?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/113874677701967227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=113874677701967227' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113874677701967227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113874677701967227'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/01/mlp.html' title='MLP'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-113710198066833892</id><published>2006-01-12T21:39:00.000Z</published><updated>2006-01-12T21:39:40.733Z</updated><title type='text'>What's the difference between Windows Mobile 5.0 and Windows CE 5.0?</title><content type='html'>&lt;p&gt;I got the following question in email today:&lt;/p&gt;&lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;p&gt;Can you please explain me the difference in windows CE 5.0 and windows mobile 5.0? Isn't windows 5.0 is based on windows CE 5.0? If yes then why is the development tools for these are different, i mean windows CE based applications can be developed using evc++ 4.0 but for WM 5.0 based application we need Visual Studio 5.0?&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Well, I&amp;rsquo;ve kind of &lt;a href="http://mikedimmick.blogspot.com/2004/06/are-pocket-pc-and-windows-ce-same.html"&gt;answered this question&lt;/a&gt; already. The only new thing to add is that Windows Mobile 5.0 for Pocket PCs is based on Windows CE 5.1 bits according to the About screen (Microsoft using pre-release versions of Windows CE in Windows Mobile again? That caused a boatload of trouble for Pocket PC 2000 and 2002 and I thought they&amp;rsquo;d finally got over it.)&lt;/p&gt;&lt;p&gt;As for the development tools question, don&amp;rsquo;t ask me &amp;ndash; ask Microsoft. The simple answer is that they didn&amp;rsquo;t generate an eVC-compatible SDK therefore it doesn&amp;rsquo;t register with eVC 4.0 therefore you can&amp;rsquo;t select Windows Mobile 5.0 as a target. As to why they didn&amp;rsquo;t do this, who knows? Perhaps something to do with the old Platform Manager, which was not the most reliable of software (understating the case severely). Also, it appears that MFC 6.0/CE and ATL 3.0/CE are not supported for new development; they don&amp;rsquo;t ship with the SDK any more, although the DLLs do ship on the device I think.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-113710198066833892?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/113710198066833892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=113710198066833892' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113710198066833892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113710198066833892'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/01/whats-difference-between-windows.html' title='What&apos;s the difference between Windows Mobile 5.0 and Windows CE 5.0?'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-113692490133555829</id><published>2006-01-10T20:28:00.000Z</published><updated>2006-01-10T20:28:21.396Z</updated><title type='text'>Two more alleged WMF 'vulnerabilities' - but there's a problem with the 'exploit'...</title><content type='html'>&lt;p&gt;A &lt;a href="http://www.windowsitpro.com/windowspaulthurrott/Article/ArticleID/49008/windowspaulthurrott_49008.html"&gt;number&lt;/a&gt; &lt;a href="http://news.com.com/More+WMF+problems+for+Microsoft/2100-1002_3-6024931.html?part=rss&amp;amp;tag=6024931&amp;amp;subj=news"&gt;of&lt;/a&gt; &lt;a href="http://www.theinquirer.net/?article=28867"&gt;news&lt;/a&gt; &lt;a href="http://www.nist.org/news.php?extend.57"&gt;sites&lt;/a&gt; are pointing to a &lt;a href="http://www.securityfocus.com/archive/1/421258"&gt;post&lt;/a&gt; on the Bugtraq mailing list alleging more problems with Windows&amp;rsquo; handling of the Windows Metafile format.&lt;/p&gt;&lt;p&gt;Just a quick recap on the original issue: I &lt;a href="http://mikedimmick.blogspot.com/2006/01/thoughts-on-wmf-vulnerability.html"&gt;originally thought&lt;/a&gt; that this was simply a buffer overflow issue, but in fact it appears that it&amp;rsquo;s something different &amp;ndash; that an intended feature can be used in an unintended way. As I said last time, a WMF file contains a sequence of GDI commands. One of the supported commands is the GDI &lt;em&gt;Escape&lt;/em&gt; function, which allows the application programmer to pass additional commands to the graphics driver, which &amp;ndash; because GDI is a unified screen and printing API &amp;ndash; can be a printer driver. The exploit apparently uses the &lt;em&gt;SETABORTPROC&lt;/em&gt; escape. This escape was intended to permit GDI to call the application back, periodically during printing, to determine whether the user had tried to abort the print job. The attacker can use the &lt;em&gt;SETABORTPROC&lt;/em&gt; escape to point to another part of the WMF file which contains code, which will be executed by GDI. It&amp;rsquo;s a case of an overlooked feature with insufficient security protection, &lt;em&gt;not&lt;/em&gt; a failure to correctly validate the input parameters &amp;ndash; the parameters are valid.&lt;/p&gt;&lt;p&gt;To the new &amp;lsquo;&lt;a href="http://www.securityfocus.com/archive/1/421257/30/30/threaded"&gt;vulnerability&lt;/a&gt;&amp;rsquo;. Here we are dealing with a malformed file. The attacker supplies sizes for some of the parameters which are larger than the amount of data supplied. &lt;em&gt;There is no vulnerability here&lt;/em&gt; &amp;ndash; all that happens is that Windows tries to copy more data than is supplied. When the source pointer goes off the end of the input buffer, it may encounter an unallocated page. When this occurs, an access violation exception occurs, which, unless the application has been written to guard against it, causes the application to crash.&lt;/p&gt;&lt;p&gt;Note that this &lt;em&gt;cannot&lt;/em&gt; crash Windows itself. It can only crash the process performing the file parsing. Now, in many cases this will be Windows Explorer (explorer.exe) &amp;ndash; but Explorer should restart after a crash (it always used to &amp;ndash; I haven&amp;rsquo;t actually had a problem in a while so I don&amp;rsquo;t recall if it still does). If an attacker put a WMF malformed in this way on a website, and the user browsed to it, the browser would simply crash. So yes, it &lt;em&gt;is&lt;/em&gt; a denial of service, of&amp;nbsp;a sort, but it&amp;rsquo;s not a serious issue.&lt;/p&gt;&lt;p&gt;With this information in hand, &lt;a href="http://blogs.technet.com/msrc/archive/2006/01/09/417198.aspx"&gt;Microsoft&amp;rsquo;s response&lt;/a&gt; seems pretty reasonable.&lt;/p&gt;&lt;p&gt;Don&amp;rsquo;t believe everything you read on Bugtraq.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-113692490133555829?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/113692490133555829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=113692490133555829' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113692490133555829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113692490133555829'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/01/two-more-alleged-wmf-vulnerabilities.html' title='Two more alleged WMF &apos;vulnerabilities&apos; - but there&apos;s a problem with the &apos;exploit&apos;...'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-113649330499785553</id><published>2006-01-05T20:35:00.000Z</published><updated>2006-01-05T20:35:05.103Z</updated><title type='text'>WMF vulnerability patch to be released early</title><content type='html'>2pm Pacific Time today. That&amp;rsquo;s 10pm GMT according to my handy &lt;a href="http://www.codeproject.com/dotnet/WorldClock.asp"&gt;World Clock&lt;/a&gt; app (recently updated to not crash if you&amp;rsquo;ve disabled automatic daylight saving adjustment).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-113649330499785553?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/113649330499785553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=113649330499785553' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113649330499785553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113649330499785553'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/01/wmf-vulnerability-patch-to-be-released.html' title='WMF vulnerability patch to be released early'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-113633016017201730</id><published>2006-01-03T23:16:00.000Z</published><updated>2006-01-03T23:16:00.230Z</updated><title type='text'>Thoughts on the WMF vulnerability</title><content type='html'>&lt;p&gt;OK, so we know there&amp;rsquo;s a zero-day vulnerability (i.e. one which was not reported to any security organisation or vendor before being exploited) out there which utilises a malformed WMF file to execute code on a victim&amp;rsquo;s computer. This is being termed a &amp;lsquo;remote code execution&amp;rsquo; vulnerability &amp;ndash; this term is now being used to cover any situation where an attacker could cause code to be executed, but doesn&amp;rsquo;t differentiate between a situation where this can be done by the attacker actively sending data over a network to the victim, and one (such as this) where the victim must request data from the attacker. However, the attacker can cause software executing on the victim computer to automatically request the bad data &amp;ndash; in this case, for example, by sending an email message to the victim containing a suitably malformed image file, which will cause some email packages to automatically render (draw) the image when the message is displayed.&lt;/p&gt;&lt;p&gt;Firstly, what is a WMF file? It stands for Windows Metafile. That&amp;rsquo;s a pretty meaningless name. What it actually contains is just a sequence of commands &amp;ndash; that map one-to-one to GDI API calls &amp;ndash; for producing a drawing. The easiest way to construct a WMF is to use the &lt;em&gt;CreateMetaFile&lt;/em&gt; API which produces a GDI drawing surface, a &lt;em&gt;device context&lt;/em&gt;, and returns a handle to it, an &lt;em&gt;HDC&lt;/em&gt;. Once you&amp;rsquo;ve finished drawing &amp;ndash; using the regular GDI API calls &amp;ndash; you then call &lt;em&gt;CloseMetaFile&lt;/em&gt; which gives you a &lt;em&gt;HMETAFILE&lt;/em&gt;. You can then draw the metafile again using &lt;em&gt;PlayMetaFile&lt;/em&gt;. It appears that this API is the one which contains the vulnerability &amp;ndash; that some part of the format is insufficiently checked and the attacker can therefore cause the processor&amp;rsquo;s instruction pointer to end up pointing at a part of the supplied file.&lt;/p&gt;&lt;p&gt;This does suggest that &lt;em&gt;any&lt;/em&gt; application that renders WMF data using the &lt;em&gt;PlayMetaFile&lt;/em&gt; API could be an attack vector. Because it is such a venerable format, many applications will support it. You can include WMF drawings in your Word documents. You can process WMF files in Paint Shop Pro.&lt;/p&gt;&lt;p&gt;The current&amp;nbsp;advisory from Microsoft suggests unregistering the &lt;em&gt;shimgvw.dll&lt;/em&gt; component. This component is responsible for much more than WMF rendering. It performs all thumbnail rendering in Windows Explorer for all the best-known filetypes. It&amp;nbsp;provides the size and other information for&amp;nbsp;the Task pane and status bar. It also implements the &amp;lsquo;Windows Picture and Fax Viewer&amp;rsquo; frame that appears if you click Preview&amp;nbsp;on the context menu for an image.&amp;nbsp;Unregistering this DLL kills all this functionality &amp;ndash; but it does &lt;em&gt;not&lt;/em&gt; protect against the vulnerability in other applications which call &lt;em&gt;PlayMetaFile &lt;/em&gt;(except those which use &lt;em&gt;shimgvw.dll&lt;/em&gt; as a proxy, such as Internet Explorer). This is my supposition, anyway &amp;ndash; I would be astonished if &lt;em&gt;shimgvw.dll&lt;/em&gt; did &lt;em&gt;not&lt;/em&gt; render WMF simply by calling &lt;em&gt;PlayMetaFile&lt;/em&gt;, and likewise Enhanced Metafiles by calling &lt;em&gt;PlayEnhMetaFile&lt;/em&gt;.&lt;/p&gt;&lt;p&gt;While WMF files are most often used in the filesystem for storing vector-based clip-art (one among many other formats), you can also find them used within other formats, because of the native OS support. For example, when copying a diagram from Visio to Word, you will find that the prerendered version of the diagram (used for a linked or embedded diagram when the diagram is not active) is a metafile &amp;ndash; although in this case it is most likely an Enhanced Metafile. Whether the Enhanced Metafile format&amp;nbsp;can also be exploited&amp;nbsp;is an unknown.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-113633016017201730?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/113633016017201730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=113633016017201730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113633016017201730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113633016017201730'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/01/thoughts-on-wmf-vulnerability.html' title='Thoughts on the WMF vulnerability'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-113632035362041807</id><published>2006-01-03T20:32:00.000Z</published><updated>2006-01-03T20:32:33.670Z</updated><title type='text'>How to stop TlbImp requiring admin privileges</title><content type='html'>&lt;p&gt;It seems that the Type Library Importer tool, &lt;code&gt;TlbImp.exe&lt;/code&gt;,&amp;nbsp;sometimes needs administrative privileges to do its job, if you&amp;rsquo;re trying to create a Primary Interop Assembly (or otherwise a strong-named reference). At work today, even admin privileges weren&amp;rsquo;t enough &amp;ndash; I&amp;rsquo;m not sure if something&amp;rsquo;s been broken after installing Visual Studio 2005 since it used to work fine. The error given is &amp;lsquo;Invalid strong name parameters specified.&amp;rsquo;&lt;/p&gt;&lt;p&gt;What seems to be required is that the strong-name-key needs to be added to a key container in order to be used, which TlbImp is doing for you behind the scenes. The container used by strong-name functions can be either a user or a machine container. The default seems to be a machine container (at least that&amp;rsquo;s been the case both here at home and at work).&lt;/p&gt;&lt;p&gt;You can switch to a user container using the following command from a Visual Studio command prompt (either from the Start Menu&amp;rsquo;s Visual Studio group, or by running &lt;code&gt;vsvars32.bat&lt;/code&gt; from the &lt;code&gt;Common7\Tools&lt;/code&gt; directory, or &lt;code&gt;sdkvars.bat&lt;/code&gt; from the .NET Framework SDK &lt;code&gt;Bin&lt;/code&gt; directory):&lt;/p&gt;&lt;pre&gt;sn -m n&lt;/pre&gt;&lt;p&gt;Having done this, you should no longer need administrative privileges to strongly-name an assembly.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-113632035362041807?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/113632035362041807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=113632035362041807' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113632035362041807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113632035362041807'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2006/01/how-to-stop-tlbimp-requiring-admin.html' title='How to stop TlbImp requiring admin privileges'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-113533930931838637</id><published>2005-12-23T12:01:00.000Z</published><updated>2005-12-23T12:01:49.323Z</updated><title type='text'>This much laughing hurts</title><content type='html'>&lt;p&gt;I don&amp;rsquo;t often end up laughing hysterically at &lt;em&gt;musical instruments&lt;/em&gt;!&lt;/p&gt;&lt;p&gt;In today&amp;rsquo;s feeds, an &lt;a href="http://improbable.typepad.com/improbable_research_whats/2005/12/contrabassophon.html"&gt;article&lt;/a&gt; from the &lt;a href="http://improbable.typepad.com/improbable_research_whats/"&gt;Annals of Improbable Research&lt;/a&gt; blog linked to a Mr. &lt;a href="http://www.jayeaston.com/gallery_index.html"&gt;Jay C. Easton&lt;/a&gt;, who plays the saxophone. Well, not just &lt;em&gt;the&lt;/em&gt; saxophone, since there are many different types. Many more than the traditional four.&lt;/p&gt;&lt;p&gt;Including &lt;a href="http://www.jayeaston.com/galleries/sax_family/subcontrabass_sax.html"&gt;this monster&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;There are some &lt;a href="http://www.eppelsheim.com/bassax.php?lang=en"&gt;very smart saxophone makers&lt;/a&gt; out there, and the sound is actually pretty good. Well, except for the very lowest notes. I&amp;rsquo;m sure you can guess what they sound like, but there are plenty of clips on Easton&amp;rsquo;s site and Mr Eppelsheim&amp;rsquo;s. Another player, &lt;a href="http://www.bayerf.de/"&gt;Fred Bayer&lt;/a&gt;, has had his Tubax modified to play much higher notes too (click on Tubax under Music in the navigation frame &amp;ndash; a direct link takes you to the German language site).&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-113533930931838637?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/113533930931838637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=113533930931838637' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113533930931838637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113533930931838637'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/12/this-much-laughing-hurts.html' title='This much laughing hurts'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-113528553276050623</id><published>2005-12-22T21:05:00.000Z</published><updated>2005-12-22T21:05:32.766Z</updated><title type='text'>Revisiting .NET CF Whinges</title><content type='html'>&lt;p&gt;18 months ago, I wrote an article called &amp;ldquo;&lt;a href="http://mikedimmick.blogspot.com/2004/03/net-cf-whinging.html"&gt;.NET CF whinging&lt;/a&gt;&amp;rdquo;. Now that Compact Framework 2.0 has been released, what&amp;rsquo;s been fixed?&lt;/p&gt;&lt;ul&gt;&lt;li&gt;I complained that only DrawLine was available, not DrawLines (which maps better to the underlying Polyline call). In .NET CF 2.0, you can now use DrawLines.&lt;/li&gt;&lt;li&gt;Previously, you could only create a one-pixel-wide pen. Now you can create pens of any width.&lt;/li&gt;&lt;li&gt;The System.Diagnostics.Process class has been added.&lt;/li&gt;&lt;li&gt;WaitHandle.WaitOne now offers a timeout overload. WaitAny is still missing.&lt;/li&gt;&lt;li&gt;Thread.Abort and Thread.Join are now present.&lt;/li&gt;&lt;li&gt;Control.InvokeRequired makes an appearance, and the Control.Invoke overload that takes an array of object parameters to pass to the delegate is now present. However, the documentation still contains a note that for .NET Compact Framework, you must use the EventHandler delegate, which only offers an empty EventArgs.&amp;nbsp;This appears to be a documentation error &amp;ndash;&amp;nbsp;passing other delegate types and parameters &lt;em&gt;does&lt;/em&gt; now work!&amp;nbsp;The new BackgroundWorker class of the desktop Framework is &lt;em&gt;not&lt;/em&gt; offered.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Rumour has it that the marshalling&amp;rsquo;s better in this version too.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-113528553276050623?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/113528553276050623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=113528553276050623' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113528553276050623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113528553276050623'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/12/revisiting-net-cf-whinges.html' title='Revisiting .NET CF Whinges'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-113528411975929492</id><published>2005-12-22T20:41:00.000Z</published><updated>2005-12-22T20:41:59.840Z</updated><title type='text'>HOWTO: Program Symbol MC3000 function keys</title><content type='html'>&lt;p&gt;With my powers of intuition, I divine that someone out there needs to handle or program the function keys on the Symbol MC3000 device.&lt;/p&gt;&lt;p&gt;(Well, OK, it turned up in my referrer log &amp;ndash; click the tracker icon at the bottom of the right-hand bar!)&lt;/p&gt;&lt;p&gt;The 28&amp;ndash;key variant has F1 through F10 available through pressing the blue Func button and then the corresponding number key. The 38&amp;ndash;key variant has F1 through F10 keys, then F11 through F14 on Func+F1 to Func+F4. The 48&amp;ndash;key variant has F1 to F13 on Func+A to Func+M. (Nothing like consistency). When pressed, these will appear as VK_F1 through VK_F14 in your application&amp;rsquo;s WM_KEYDOWN and WM_KEYUP handlers or their equivalent in your environment (Control.KeyDown and Control.KeyUp events in the .NET Compact Framework, the value of KeyEventArgs.KeyCode will be Key.F1 through Key.F14).&lt;/p&gt;&lt;p&gt;That&amp;rsquo;s the default keyboard map. If you want to &lt;em&gt;change&lt;/em&gt; the keyboard map, on any Symbol device, you need the Device Configuration Package for that device, which you can download from &lt;a href="http://devzone.symbol.com/"&gt;Symbol DevZone&lt;/a&gt;. In the package, you&amp;rsquo;ll find under Tools\kbtool a bunch of C++ files and a VC6 project. This is a program &lt;em&gt;for your desktop computer &lt;/em&gt;which generates the keyboard map files. Open this with VC6 or later.&lt;/p&gt;&lt;p&gt;Each keyboard layout has (up to) three files associated with it &amp;ndash; for the MC3000, MC3000Key&lt;em&gt;nn&lt;/em&gt;M, R and S.cpp, where &lt;em&gt;nn&lt;/em&gt; is the number of keys. The M file controls the multiple-press key operations, such as the mobile-phone-style input on the 28&amp;ndash;key variant. The R file controls remapping key functions in different shift states. Finally the S file controls the scan code that&amp;rsquo;s output by each key &amp;ndash; this is normally the one you want to edit. The available scan codes can be found in the accompanying ScanCode.h file.&lt;/p&gt;&lt;p&gt;Running the program generates the files that the keyboard driver is looking for. For the MC3000 these are named MC3000&amp;ndash;{28,38,48}.{sct,rmt,mmt}. You can either overwrite these files in their normal location (\Platform\Keyboard) or modify the registry under HKLM\Hardware\DeviceMap\KEYBD to point to your version of the files.&lt;/p&gt;&lt;p&gt;We did this for New Look to make the two keys below the screen &amp;ndash; with the red and green surrounds &amp;ndash; perform &amp;lsquo;soft key&amp;rsquo; functions in their applications.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-113528411975929492?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/113528411975929492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=113528411975929492' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113528411975929492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113528411975929492'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/12/howto-program-symbol-mc3000-function.html' title='HOWTO: Program Symbol MC3000 function keys'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-113510897630141864</id><published>2005-12-20T20:02:00.000Z</published><updated>2005-12-20T20:02:56.356Z</updated><title type='text'>Do I look old to you?</title><content type='html'>&lt;p&gt;I met up with some of the people from &lt;a href="http://channel9.msdn.com/"&gt;Channel 9&lt;/a&gt; last Saturday &amp;ndash; &lt;a href="http://geekswithblogs.net/sabotsshell/"&gt;Dave Oliver&lt;/a&gt;, &lt;a href="http://idunno.org/"&gt;Barry Dorrans&lt;/a&gt;, &lt;a href="http://geekswithblogs.net/waterbaby/"&gt;Sarah Blow&lt;/a&gt; and &lt;a href="http://www.peat.me.uk/"&gt;Richard Peat&lt;/a&gt; (and his lovely wife Beth, who I don&amp;rsquo;t think has her own blog). Richard&amp;rsquo;s already written it up &lt;a href="http://www.peat.me.uk/2005/12/18/christmas-geek-and-greet/"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Separately, Dave and Barry both told me that I looked older than my tender years (ahem) of 27, and suggested that I get rid of my beard. Barry also reckoned the ponytail should go (can&amp;rsquo;t remember what Dave thought but he did admit he&amp;rsquo;d had one when younger!)&lt;/p&gt;&lt;p&gt;For comparison:&lt;/p&gt;&lt;p&gt;&lt;img alt="Passport Photo" src="http://www.dimmick.demon.co.uk/blog/Passport_20Photo.jpg" border="0" /&gt;&lt;/p&gt;&lt;p&gt;What I looked like in 1998, the last photo I have to hand of me with short hair and no beard (digital snapshot of my passport photo!)&lt;/p&gt;&lt;p&gt;&lt;img alt="2004" src="http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg" border="0" /&gt;&lt;/p&gt;&lt;p&gt;What I looked like last year (taken at my friend&amp;rsquo;s wedding in Toppenish, WA, USA).&lt;/p&gt;&lt;p&gt;The length of hair and beard varies. I was short-haired and clean-shaven at my graduation ceremony&amp;nbsp;in 2001 and frankly I thought I still looked a bit too young in the photo (and very pale!) I&amp;rsquo;ve been letting the hair grow pretty much since then and it now just reaches the small of my back. I trim my beard every few weeks, normally when it starts itching too much &amp;ndash; it&amp;rsquo;s quite short right now as you can see in &lt;a href="http://www.flickr.com/photos/rtpeat/74741869/"&gt;Richard&amp;rsquo;s picture from Saturday&lt;/a&gt;&amp;nbsp;where we&amp;rsquo;re attempting to play Barry&amp;rsquo;s card game &lt;a href="http://www.wunderland.com/LooneyLabs/Fluxx/Fluxx.html"&gt;Fluxx&lt;/a&gt;&amp;nbsp;while waiting for food and/or &lt;a href="http://www.irascian.com/cs/blogs/ian_smith/"&gt;Ian&lt;/a&gt; to arrive.&lt;/p&gt;&lt;p&gt;So, should I follow their advice?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-113510897630141864?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/113510897630141864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=113510897630141864' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113510897630141864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113510897630141864'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/12/do-i-look-old-to-you.html' title='Do I look old to you?'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-113509862500050589</id><published>2005-12-20T17:10:00.000Z</published><updated>2005-12-20T17:10:25.106Z</updated><title type='text'>Can the Windows Vista Network Map Control Panel detect a non-functioning switch?</title><content type='html'>&lt;p&gt;Adam Nathan &lt;a href="http://blogs.msdn.com/adam_nathan/archive/2005/12/20/505917.aspx"&gt;blogged today about some new features&lt;/a&gt; in the Windows Vista December CTP. One of them is a new Control Panel applet: Network Map.&lt;/p&gt;&lt;p&gt;&lt;a href="http://pinvoke.net/blog/images/decctp6.png"&gt;&lt;img alt="Network Map applet" src="http://pinvoke.net/blog/images/decctp6thumb.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;At work we commonly have problems with our switched network fabric. Sometimes after a power failure (a regrettably common occurrence at our location) the cheap 5-port switches at each desk will give all the signs of working, but not actually forward network frames &amp;ndash; quite literally, &amp;ldquo;the lights are on, but no-one&amp;rsquo;s home.&amp;rdquo; Only power-cycling them gets them working again. Unfortunately there are chains of these in some places before reaching one of the wall sockets which connects to the main switch.&lt;/p&gt;&lt;p&gt;We also have a problem where, if one particular machine is switched on and connected, the entire LAN seems to go nuts, intermittently or permanently causing some routes to fail, unpredictably. We think this is due to the switches&amp;rsquo; internal mapping of MAC addresses to ports somehow becoming incorrect, and forwarding packets to the wrong ports, or not at all. This is a mystery to all of us, especially since we&amp;rsquo;ve replaced the network card with a different model, tried it with different operating systems, tried it on a different wall socket, and repatched the wall socket/main switch connection. Nothing helps! If you have any ideas, leave a comment!&lt;/p&gt;&lt;p&gt;If this Network Map can tell you which device seems to be malfunctioning, that would be a serious boost to network administrators everywhere.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-113509862500050589?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/113509862500050589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=113509862500050589' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113509862500050589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113509862500050589'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/12/can-windows-vista-network-map-control.html' title='Can the Windows Vista Network Map Control Panel detect a non-functioning switch?'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-113495178620558344</id><published>2005-12-19T00:23:00.000Z</published><updated>2005-12-19T00:23:06.260Z</updated><title type='text'>Idiotic things to do</title><content type='html'>&lt;p&gt;Look on Flickr for &lt;a href="http://www.flickr.com/photos/87372824@N00/"&gt;your own photos&lt;/a&gt;, from the&amp;nbsp;machine you uploaded them from.&lt;/p&gt;&lt;p&gt;&lt;em&gt;Doh!&lt;/em&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-113495178620558344?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/113495178620558344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=113495178620558344' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113495178620558344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113495178620558344'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/12/idiotic-things-to-do.html' title='Idiotic things to do'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-113494144048321749</id><published>2005-12-18T21:30:00.000Z</published><updated>2005-12-18T21:30:40.633Z</updated><title type='text'>The two-minute Xbox 360 and PGR3 review</title><content type='html'>&lt;p&gt;I&amp;rsquo;m underwhelmed.&lt;/p&gt;&lt;p&gt;OK, that evaluation is based on playing a guy for one race on multiplayer on a demo pod yesterday. The shop was pretty loud and the console quiet, which made it not very involving. The rumble didn&amp;rsquo;t feel that great. The graphics are better than the current generation but actually not that much better than PGR2 &amp;ndash; but I had a one foot view, not a ten foot view since the controllers are hard-attached to the pod. I &lt;em&gt;think&lt;/em&gt; the screen was set up correctly but I don&amp;rsquo;t actually know.&lt;/p&gt;&lt;p&gt;We were lost in the game&amp;rsquo;s UI. Very lost. We ended up having a race with one computer car which zoomed off into the distance &amp;ndash; and that was only on Medium skill. I lost &amp;ndash; I kept crashing into the corners due to the lack of feedback from the game (audio and rumble), and lost when I crashed into the last corner on the last lap. I lost so badly that I didn&amp;rsquo;t even reach the finish line before the 30 second timer ran out after the computer car crossed the line (hence ending the game).&lt;/p&gt;&lt;p&gt;Maybe I should go back when it&amp;rsquo;s quieter and have a go at Career Mode.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-113494144048321749?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/113494144048321749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=113494144048321749' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113494144048321749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113494144048321749'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/12/two-minute-xbox-360-and-pgr3-review.html' title='The two-minute Xbox 360 and PGR3 review'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-113460027184942147</id><published>2005-12-14T22:44:00.000Z</published><updated>2005-12-14T22:44:31.853Z</updated><title type='text'>Coining a word</title><content type='html'>&lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;p&gt;&lt;strong&gt;horricious &lt;/strong&gt;&lt;em&gt;(adj)&lt;/em&gt;: Mind-numbingly awful. Descriptive of the speed of Microsoft&amp;rsquo;s first attempt at a &amp;lsquo;real&amp;rsquo; Windows CE emulator.&lt;/p&gt;&lt;/blockquote&gt;&lt;p dir="ltr"&gt;A colleague asked if there was an emulator for one of Symbol&amp;rsquo;s hand-helds &amp;ndash; a customer wanted to evaluate it with some software. While eVC 4.0 and VS.NET 2003 do ship an emulation platform, and Symbol supplies an emulator image for this platform, it is pretty slow. In describing this emulator to my colleague, I inadvertently coined this word. I&amp;rsquo;d just used &amp;lsquo;horrible&amp;rsquo; and &amp;lsquo;horrendous&amp;rsquo; and was searching for a third &amp;ndash; lists of three, you know &amp;ndash; and somehow got &amp;lsquo;horrific&amp;rsquo; and &amp;lsquo;atrocious&amp;rsquo; mangled together.&lt;/p&gt;&lt;p dir="ltr"&gt;Oops.&lt;/p&gt;&lt;p dir="ltr"&gt;The Pocket PC 2000 emulator, and earlier Windows CE emulators, ran weirdly compiled x86 code inside an app running on top of Windows. Stable it was not, and it didn&amp;rsquo;t emulate a CE device at all accurately. This made it completely unusable for actually developing apps.&lt;/p&gt;&lt;p dir="ltr"&gt;The Pocket PC 2002 and later emulators were a little better. Now they were based on Connectix&amp;rsquo; Virtual PC technology, which virtualises your PC&amp;rsquo;s processor and other resources (Microsoft bought out Connectix soon after). Unfortunately that&amp;rsquo;s still a virtualised x86, which is different from the &lt;em&gt;actual&lt;/em&gt; Pocket PC 2002 devices, which use ARM processors. The result is that you had to do a special build for the emulator, meaning again that you&amp;rsquo;re not testing the same code you&amp;rsquo;re going to ship &amp;ndash; and it was very hard to get libraries built for the emulator.&lt;/p&gt;&lt;p dir="ltr"&gt;Windows CE on the x86 has always been a slug &amp;ndash; Microsoft have never really taken it seriously as a platform, most hand-helds using MIPS or SH3 to begin with, then later ARM. Virtual PC wasn&amp;rsquo;t really designed to run Windows CE. Putting some form of Additions on the image would have been a) hard and b) defeated the object a little.&lt;/p&gt;&lt;p dir="ltr"&gt;Visual Studio 2005 (at least, some editions) includes the Microsoft Device Emulator 1.0. This, finally, emulates an ARM processor. And you know what? It&amp;rsquo;s quicker than the virtualised x86! At last, it&amp;rsquo;s possible to use virtually a real OS image and real binaries in an emulated environment.&lt;/p&gt;&lt;p dir="ltr"&gt;It&amp;rsquo;s still quite a bit slower than a real device though, even a 400MHz PXA255.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-113460027184942147?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/113460027184942147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=113460027184942147' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113460027184942147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113460027184942147'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/12/coining-word.html' title='Coining a word'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-113459884184505992</id><published>2005-12-14T22:20:00.000Z</published><updated>2005-12-14T22:20:41.900Z</updated><title type='text'>A rant on programming books</title><content type='html'>&lt;p&gt;&lt;a href="http://blogs.msdn.com/matt_pietrek/default.aspx"&gt;Matt Pietrek&lt;/a&gt; &amp;ndash; he of the erstwhile MSDN Magazine column &amp;lsquo;Under The Hood&amp;rsquo; &amp;ndash; has an &lt;a href="http://blogs.msdn.com/matt_pietrek/archive/2005/12/14/503750.aspx"&gt;interesting post&lt;/a&gt;:&lt;/p&gt;&lt;blockquote&gt;In a nut shell, there are a&amp;nbsp;lot of books out there, and people are relying on them less and less as search engines become the dominant way to find information. It's pretty hard to pour massive amounts of work into something when you know most people just want the code snippet that gets them past their current problem. No actual learning required.&lt;/blockquote&gt;&lt;p&gt;&amp;nbsp;...and then they have no idea how the code works, so cannot adapt it to new requirements, or debug it when it doesn't work.&lt;/p&gt;&lt;p&gt;To me, a good tutorial is worth a thousand times a code snippet - although I do find that often MS Press books (at least, of a certain vintage) will print the entire source of a sample program which leads to the new stuff being lost among the boilerplate.&lt;/p&gt;&lt;p&gt;How new Windows programmers are supposed to learn what's going on when truly excellent books like Jeff Richter's "Programming Applications for Windows" go out of print I don't know. All abstractions leak, and I think you're better off understanding what leaks through the abstraction.&lt;/p&gt;&lt;p&gt;I only really &amp;lsquo;got&amp;rsquo; MFC once I&amp;rsquo;d read &amp;ldquo;MFC Internals&amp;rdquo;, and understood the boilerplate that Visual Studio generates for a new MFC project.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-113459884184505992?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/113459884184505992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=113459884184505992' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113459884184505992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113459884184505992'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/12/rant-on-programming-books.html' title='A rant on programming books'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-113080329017011795</id><published>2005-11-01T00:01:00.000Z</published><updated>2005-11-01T00:01:30.276Z</updated><title type='text'>How media companies root your system</title><content type='html'>&lt;p&gt;&amp;hellip;and why you shouldn&amp;rsquo;t insert an audio CD into your computer if you&amp;rsquo;re running as an administrator: &lt;a href="http://www.sysinternals.com/blog/2005/10/sony-rootkits-and-digital-rights.html"&gt;what Mark Russinovich found on one of his systems&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;(If you&amp;rsquo;re not running as an administrator &lt;em&gt;you, or software running on your behalf,&amp;nbsp;cannot install a driver&lt;/em&gt;).&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-113080329017011795?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/113080329017011795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=113080329017011795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113080329017011795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/113080329017011795'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/11/how-media-companies-root-your-system.html' title='How media companies root your system'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-112905742743022040</id><published>2005-10-11T20:03:00.000+01:00</published><updated>2005-10-11T20:03:47.436+01:00</updated><title type='text'>MetaBlog: CAPTCHA enabled</title><content type='html'>&lt;p&gt;Over the last week or so, comment spammers have found this blog. I&amp;rsquo;ve therefore turned on Blogger&amp;rsquo;s only security feature, word-recognition (sometimes known as CAPTCHA). It&amp;rsquo;s probably not enough to fool a determined comment spammer but I hope it will reduce it a bit.&lt;/p&gt;&lt;p&gt;I&amp;rsquo;ve also enabled &amp;lsquo;backlinks&amp;rsquo; which I hope are just a Blogger name for referrers or some such.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-112905742743022040?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/112905742743022040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=112905742743022040' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/112905742743022040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/112905742743022040'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/10/metablog-captcha-enabled.html' title='MetaBlog: CAPTCHA enabled'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-112812375758015179</id><published>2005-10-01T00:42:00.000+01:00</published><updated>2005-10-01T00:42:37.626+01:00</updated><title type='text'>Project Gotham Racing 3 videos</title><content type='html'>&lt;p&gt;Some shakycam footage of a presentation of Project Gotham Racing 3.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.xbox360news.com/Blogs/News/hqs/blr_630.aspx"&gt;Xbox360 News&lt;/a&gt;&amp;nbsp;has six videos. They link to another which is still downloading as I write this.&lt;/p&gt;&lt;p&gt;I have to admit that graphically, it&amp;rsquo;s very, very good. There&amp;rsquo;s no substitute for actually playing it though. Looking at these videos does make me think that the game may well actually be ready for launch day &amp;ndash; for an idea of software manufacturing schedules, note that Visual Studio 2005 is due to RTM on 14 October with physical product supposedly available on 7 November. In both cases the manuals and boxes can be pre-prepared, with only the DVD duplication required. Bizarre Creations still have probably a month to fine-tune the game.&lt;/p&gt;&lt;p&gt;There&amp;rsquo;s something worrying me. In the first video (actually the fifth link, named &amp;lsquo;pgr3gp1.wmv&amp;rsquo;) the menu has &amp;lsquo;Buy A New Car&amp;rsquo; and &amp;lsquo;Sell Car&amp;rsquo;. I&amp;rsquo;ve played many games where you have to earn money to buy new cars and they&amp;rsquo;re universally a pain &amp;ndash; you can never, ever afford a decent car, and the sale price is a small fraction of what you paid to buy it. It doesn&amp;rsquo;t look like PGR3 will have &amp;lsquo;repair&amp;rsquo; requirements though, where you have to pay to repair your car. This was one of the many, many things that made Sega GT (a freebie with my Xbox) completely annoying and unplayable (on the other hand, the &lt;em&gt;other&lt;/em&gt; freebie game, Jet Set Radio Future, is one of my all-time favourites and one of the major reasons I bought the console).&lt;/p&gt;&lt;p&gt;I recall that PGR2 has &amp;lsquo;Kudos Tokens&amp;rsquo; which you earn by gaining a level, which you do simply by earning Kudos (basically by racing well or doing tricks like sliding the back end out or doing donuts, although I hope &lt;em&gt;that&amp;rsquo;s&lt;/em&gt; easier on the new game). You unlock cars by exchanging Kudos Tokens, and in PGR2 you can&amp;rsquo;t sell a pony that you&amp;rsquo;ve bought. Having said that in PGR2 it&amp;rsquo;s rare that you&amp;rsquo;ll buy a complete dud because the car stats are pretty accurate (indicating that the Porsche Cayenne Turbo is by far the best SUV for example). As long as you&amp;rsquo;re not penalised too heavily for making a bad car choice, I&amp;rsquo;m happy. PGR2 also had a test drive feature but I&amp;rsquo;ll confess I never used it! PGR3 is meant to have much more level car sets, so there isn&amp;rsquo;t one &amp;lsquo;right&amp;rsquo; car to use for a section of the game.&lt;/p&gt;&lt;p&gt;Here&amp;rsquo;s hoping they skip the American Muscle section this time. Last time out you&amp;rsquo;d got used to the nice-handling-but-a-little-slow cars in the early stages of the game, only to suddenly encounter cars which accelerate fast but lurch all over the place, and have no brakes to speak of. These cars were uniformly awful, there was no good one in the bunch. Making it through this section was a tedious slog, and it was a definite relief when I finished that section and could move onto some cars which, you know, &lt;em&gt;handled&lt;/em&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-112812375758015179?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/112812375758015179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=112812375758015179' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/112812375758015179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/112812375758015179'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/10/project-gotham-racing-3-videos.html' title='Project Gotham Racing 3 videos'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-112580744150059549</id><published>2005-09-04T05:17:00.000+01:00</published><updated>2005-09-04T05:21:24.493+01:00</updated><title type='text'>What does the (VB.NET) ComClass attribute do?</title><content type='html'>&lt;p&gt;A former colleague emailed me this week to ask about registering C# assemblies for COM Interop. He was convinced that you needed to do something special to advertise a COM object from C#, since we’d used the &lt;code&gt;ComClass&lt;/code&gt; attribute in VB.NET. Also, Rockford Lhotka &lt;a href="http://www.lhotka.net/WeBlog/CommentView.aspx?guid=ec218e39-9136-442c-98f8-cff081b80ccd"&gt;wrote&lt;/a&gt; (in July 2004):&lt;/p&gt;&lt;p&gt;“There are several COM interop features in VB that require much more work in C#. VB has the ComClass attribute and the CreateObject method for instance.”&lt;/p&gt;&lt;p&gt;I was able to assure him that for his scenario – late-bound use of an object – all you need to do is use &lt;code&gt;regasm&lt;/code&gt; to register the assembly. That registers &lt;em&gt;every&lt;/em&gt; public class in the assembly, except any that are marked &lt;code&gt;[ComVisible(false)]&lt;/code&gt;. (A quick aside here – the registration time is longer the more public classes you have, so you should only make the classes you actually want to expose to COM public.)&lt;/p&gt;&lt;p&gt;But if &lt;code&gt;regasm&lt;/code&gt; registers all public classes in an assembly, what is the &lt;code&gt;ComClass&lt;/code&gt; attribute for? The documentation suggests it’s required but as we’ve just seen it isn’t, at least not for this scenario.&lt;/p&gt;&lt;p&gt;It’s a signal to the VB.NET compiler to do three things:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Emit an interface definition automatically generated from the methods and properties in the class – a so-called Class Interface.&lt;/li&gt;&lt;li&gt;Add this interface to the &lt;code&gt;Implements&lt;/code&gt; list for the class (so the class appears to implement this interface).&lt;/li&gt;&lt;li&gt;Emit a &lt;code&gt;&amp;lt;ClassInterface(ClassInterfaceType.None)&amp;gt;&lt;/code&gt; attribute to suppress auto-generation of a class interface.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;That last one is interesting. The .NET Framework supports automatic generation of class interfaces at registration time using the &lt;code&gt;ClassInterfaceAttribute&lt;/code&gt; attribute. That generated interface is either a dispatch-only or a dual interface depending on the type selected. So what’s the difference?&lt;/p&gt;&lt;p&gt;Let’s take a simple test:&lt;/p&gt;&lt;pre&gt;Imports System.Runtime.InteropServices&lt;/pre&gt;&lt;pre&gt;&amp;lt;ComClass()&amp;gt; _&lt;/pre&gt;&lt;pre&gt;Public Class WithComClassAttribute&lt;/pre&gt;&lt;pre&gt;    Sub Test()&lt;/pre&gt;&lt;pre&gt;    End Sub&lt;/pre&gt;&lt;pre&gt;End Class&lt;/pre&gt;&lt;pre&gt;Public Class WithNoAttribute&lt;/pre&gt;&lt;pre&gt;    Sub Test()&lt;/pre&gt;&lt;pre&gt;    End Sub&lt;/pre&gt;&lt;pre&gt;End Class&lt;/pre&gt;&lt;pre&gt;&amp;lt;ClassInterface(ClassInterfaceType.AutoDual)&amp;gt; _&lt;/pre&gt;&lt;pre&gt;Public Class WithClassInterfaceAttribute&lt;/pre&gt;&lt;pre&gt;    Sub Test()&lt;/pre&gt;&lt;pre&gt;    End Sub&lt;/pre&gt;&lt;pre&gt;End Class&lt;/pre&gt;&lt;p&gt;First, let’s look at the generated code with the help of &lt;a href="http://www.aisto.com/roeder/dotnet/"&gt;Reflector&lt;/a&gt; (in C# mode):&lt;/p&gt;&lt;pre&gt;&lt;span style="color:#1000a0;"&gt;namespace&lt;/span&gt; &lt;b&gt;VbComTlbTest
&lt;/b&gt;{
      [&lt;a title="System.Runtime.InteropServices.ClassInterfaceAttribute.ClassInterfaceAttribute(ClassInterfaceType);" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Object=1"&gt;&lt;span style="color:#006018;"&gt;ClassInterface&lt;/span&gt;&lt;/a&gt;(&lt;span style="color:#800000;"&gt;2&lt;/span&gt;)]
      &lt;span style="color:#1000a0;"&gt;public&lt;/span&gt; &lt;span style="color:#1000a0;"&gt;class&lt;/span&gt; &lt;b&gt;WithClassInterfaceAttribute
&lt;/b&gt;      {
            &lt;span style="color:#808080;"&gt;// Methods
&lt;/span&gt;            &lt;span style="color:#1000a0;"&gt;public&lt;/span&gt; &lt;b&gt;WithClassInterfaceAttribute&lt;/b&gt;();
            &lt;span style="color:#1000a0;"&gt;public&lt;/span&gt; &lt;a title="System.Void" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Object=2"&gt;&lt;span style="color:#006018;"&gt;void&lt;/span&gt;&lt;/a&gt; &lt;b&gt;Test&lt;/b&gt;();
      }&lt;/pre&gt;&lt;pre&gt;      [&lt;a title="System.Runtime.InteropServices.ClassInterfaceAttribute.ClassInterfaceAttribute(ClassInterfaceType);" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Object=3"&gt;&lt;span style="color:#006018;"&gt;ClassInterface&lt;/span&gt;&lt;/a&gt;(&lt;span style="color:#800000;"&gt;0&lt;/span&gt;), &lt;a title="Microsoft.VisualBasic.ComClassAttribute.ComClassAttribute();" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Object=4"&gt;&lt;span style="color:#006018;"&gt;ComClass&lt;/span&gt;&lt;/a&gt;]
      &lt;span style="color:#1000a0;"&gt;public&lt;/span&gt; &lt;span style="color:#1000a0;"&gt;class&lt;/span&gt; &lt;b&gt;WithComClassAttribute&lt;/b&gt; : &lt;a title="VbComTlbTest.WithComClassAttribute+_WithComClassAttribute" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Object=5"&gt;&lt;span style="color:#006018;"&gt;_WithComClassAttribute&lt;/span&gt;&lt;/a&gt;
      {
            &lt;span style="color:#808080;"&gt;// Methods
&lt;/span&gt;            &lt;span style="color:#1000a0;"&gt;public&lt;/span&gt; &lt;b&gt;WithComClassAttribute&lt;/b&gt;();
            &lt;span style="color:#1000a0;"&gt;public&lt;/span&gt; &lt;a title="System.Void" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Object=6"&gt;&lt;span style="color:#006018;"&gt;void&lt;/span&gt;&lt;/a&gt; &lt;b&gt;Test&lt;/b&gt;();&lt;/pre&gt;&lt;pre&gt;            &lt;span style="color:#808080;"&gt;// Nested Types
&lt;/span&gt;            &lt;span style="color:#1000a0;"&gt;public&lt;/span&gt; &lt;span style="color:#1000a0;"&gt;interface&lt;/span&gt; &lt;b&gt;_WithComClassAttribute
&lt;/b&gt;            {
                  &lt;span style="color:#808080;"&gt;// Methods
&lt;/span&gt;                  [&lt;a title="System.Runtime.InteropServices.DispIdAttribute.DispIdAttribute(int);" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Object=7"&gt;&lt;span style="color:#006018;"&gt;DispId&lt;/span&gt;&lt;/a&gt;(&lt;span style="color:#800000;"&gt;1&lt;/span&gt;)]
                  &lt;a title="System.Void" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Object=8"&gt;&lt;span style="color:#006018;"&gt;void&lt;/span&gt;&lt;/a&gt; &lt;b&gt;Test&lt;/b&gt;();
            }
      }&lt;/pre&gt;&lt;pre&gt;      &lt;span style="color:#1000a0;"&gt;public&lt;/span&gt; &lt;span style="color:#1000a0;"&gt;class&lt;/span&gt; &lt;b&gt;WithNoAttribute
&lt;/b&gt;      {
            &lt;span style="color:#808080;"&gt;// Methods
&lt;/span&gt;            &lt;span style="color:#1000a0;"&gt;public&lt;/span&gt; &lt;b&gt;WithNoAttribute&lt;/b&gt;();
            &lt;span style="color:#1000a0;"&gt;public&lt;/span&gt; &lt;a title="System.Void" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Object=9"&gt;&lt;span style="color:#006018;"&gt;void&lt;/span&gt;&lt;/a&gt; &lt;b&gt;Test&lt;/b&gt;();
      }
}&lt;/pre&gt;&lt;p&gt;Notice that VB has generated the automatic class interface as a &lt;em&gt;nested&lt;/em&gt; type, inside the class it belongs to.&lt;/p&gt;&lt;p&gt;To see the difference from a COM perspective, we need to look at the type library. Export it using &lt;code&gt;tlbexp&lt;/code&gt;, then use OLE View from the Platform SDK (also supplied with VS.NET) to load the type library (File/View TypeLib).&lt;/p&gt;&lt;p&gt;I’m not going to post the entire type library IDL shown by OLE View, but note that not setting an attribute generates an empty class interface definition (equivalent to setting &lt;code&gt;ClassInterfaceType.AutoDispatch&lt;/code&gt;), and that setting &lt;code&gt;AutoDual&lt;/code&gt; generates a class interface &lt;em&gt;containing all inherited methods&lt;/em&gt;, including &lt;code&gt;ToString&lt;/code&gt;, &lt;code&gt;Equals&lt;/code&gt;, &lt;code&gt;GetHashCode&lt;/code&gt; and &lt;code&gt;GetType&lt;/code&gt; from &lt;code&gt;System.Object&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;So to duplicate VB.NET’s behaviour with the &lt;code&gt;ComClass&lt;/code&gt; attribute in C# – if you need to, bearing in mind that this really only applies to &lt;em&gt;early&lt;/em&gt;-binding scenarios – you need to define an interface then implement that interface, and use &lt;code&gt;ClassInterfaceType.None&lt;/code&gt;. This (declaring interfaces) is, of course, what you have to do in traditional C++.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-112580744150059549?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/112580744150059549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=112580744150059549' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/112580744150059549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/112580744150059549'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/09/what-does-vbnet-comclass-attribute-do.html' title='What does the (VB.NET) ComClass attribute do?'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-112527447862345439</id><published>2005-08-29T01:14:00.000+01:00</published><updated>2005-08-29T01:14:38.683+01:00</updated><title type='text'>Answering the mail - anatomy of a solution</title><content type='html'>&lt;p&gt;I&amp;rsquo;m a bit slow in answering questions from the contact box. A couple of months ago, a commenter asked how the MC3000 application for New Look was implemented. Since we&amp;rsquo;re using this system as a case study it&amp;rsquo;s probably fair to post details if I don&amp;rsquo;t go into &lt;em&gt;too&lt;/em&gt; much detail.&lt;/p&gt;&lt;p&gt;Actually I&amp;rsquo;m not sure where New Look&amp;rsquo;s name came up. I don&amp;rsquo;t think I&amp;rsquo;ve mentioned it here. It must have been some other forum.&lt;/p&gt;&lt;p&gt;As far as the MC3000 software goes, the main application is just Meteor Client. Meteor is our application server product which allows text-mode applications to be written using Windows-based desktop/server development tools &amp;ndash; typically more rapidly than the equivalent handheld application. On this occasion, the four applications (Price Check, Stock Availability and the ancillary Menu and Head Office applications) were developed with Visual Basic .NET using a SQL Server 2000 data source. The total number of handhelds deployed is over 1200 I believe.&lt;/p&gt;&lt;p&gt;Meteor Client was originally written for Symbol&amp;rsquo;s Series 3000 DOS handhelds and&amp;nbsp;the original/common code is&amp;nbsp;written in C targetting a Symbol library called ADL and Symbol&amp;rsquo;s BiosXxx routines (wrappers around both the standard IBM PC BIOS interrupts and Symbol&amp;rsquo;s own BIOS features). It was ported to a Windows console application which is mainly used for development and testing although it has been used in deployment occasionally. It was also ported to PalmOS for the Symbol SPT 1700 and Monarch&amp;rsquo;s Pathfinder Ultra DOS device, although those ports are not currently maintained.&lt;/p&gt;&lt;p&gt;Meteor Client on Windows CE was originally targetted at Pocket PC-based devices such as the PPT 2700. I started the porting work about three years ago. Pocket PC devices don&amp;rsquo;t have console support and even if they did, the console would still &amp;ndash; I think &amp;ndash; have ended up with a certain amount of &amp;lsquo;furniture&amp;rsquo; we didn&amp;rsquo;t want. Meteor Client is meant to be a locked-down application, no other applications can be used.&lt;/p&gt;&lt;p&gt;Without this console support, I had to provide all on-screen rendering. The only monospaced font I could rely on was Courier New, which I detest &amp;ndash; it would be illegible at the screen sizes we need &amp;ndash;&amp;nbsp;and we needed the potential for custom font capabilities anyway. Therefore we use bitmapped fonts using bitmaps I drew, designed to use the maximum space available on the Pocket PC screen and others at two sizes, 8 rows by 20 columns (matching the PDT 3100) and 16 rows by 21 columns (matching the PDT 6800). Further fonts have been drawn to offer better displays on devices with different screen sizes &amp;ndash; the MC3000 has a 320x320 screen which can all be used &amp;ndash; and there are now 8 sizes ranging from a 9x9 pixel character cell up to a 15x39 pixel character.&lt;/p&gt;&lt;p&gt;The Windows CE port uses C++ for the Windows CE-specific code, and uses ATL for windowing support and a small amount of additional data structure support. MFC is overkill and I&amp;rsquo;d originally intended to do without it, but when it came to integrating barcode support I remembered that the code I&amp;rsquo;d written up to that point used bits of MFC since the new CE apps we were writing at that point were all written with MFC (the .NET Compact Framework wasn&amp;rsquo;t released until 2003). As part of the process to turn the port code into a separate library for porting DOS applications, I&amp;rsquo;ve eliminated this dependency.&lt;/p&gt;&lt;p&gt;Actually, the core of the porting library is really the keyboard buffer. Windows&amp;rsquo; keyboard system requires that a window accept keyboard input messages. There&amp;rsquo;s a bit of a mismatch between the DOS behaviour, which made both scan code and character code available at the same time, and Windows, which generates a WM_CHAR message with the character code after the WM_KEYDOWN message with the virtual key code, but this wasn&amp;rsquo;t too hard to work around. Originally all the screen and keyboard code ran on the same thread as the application code, which meant that the screen didn&amp;rsquo;t update until you&amp;nbsp;called&amp;nbsp;either a keyboard wait function or a delay function,&amp;nbsp;but I&amp;rsquo;ve recently &amp;ndash;&amp;nbsp;as part of the porting library effort&amp;nbsp;&amp;ndash; moved all the screen functions, and hence the keyboard functions, to their own thread. Cue some fairly complicated synchronisation code.&lt;/p&gt;&lt;p&gt;For barcode scanning I originally used a chunk of code that was, although slightly enhanced and made into a static library, some of the first code I wrote after graduating. Its main problem was that it only supported Symbol&amp;rsquo;s scanning APIs &amp;ndash; it would run on a non-Symbol device but barcode scanning would be disabled. Over December to February 2002 we came up with a more abstract API that we call the Scanner Hardware Abstraction Layer, or ScanHAL for short. We now support Intermec and HHP&amp;rsquo;s APIs as well as Symbol&amp;rsquo;s, and have a package that can detect what device it&amp;rsquo;s running on and therefore install the right ScanHAL (there&amp;rsquo;s a null stub for devices with no scanner). This code is all C++ and, due to an error that was overlooked when building the first few versions, is tricky to use from C as all the entry point names are type-decorated (i.e. using the C++ linkage naming convention &amp;ndash; we forgot to use &amp;lsquo;extern &amp;ldquo;C&amp;rdquo;&amp;rsquo;). We use this library, enhancing it as new features are required, in all our .NET Compact Framework applications too (if scanning is required). A colleague wrote the API and the initial version of the Symbol and Intermec HALs; I&amp;rsquo;ve enhanced both and wrote the HHP HAL, while &lt;a href="http://www.pure-virtual.org/ian/"&gt;Ian&lt;/a&gt;&amp;rsquo;s extended all the HALs at least once.&lt;/p&gt;&lt;p&gt;The New Look handheld software doesn&amp;rsquo;t just consist of Meteor Client though. There are a few other things too. Primary among them is support for firmware updates over-the-air (i.e. over the network). Symbol&amp;rsquo;s AirBEAM supports over-the-air upgrade but it doesn&amp;rsquo;t support scheduling an upgrade and for obvious reasons we didn&amp;rsquo;t want to push a firmware upgrade &amp;ndash; which since they&amp;rsquo;re using the colour terminal is over 30MB &amp;ndash; during work hours. Symbol &lt;em&gt;do&lt;/em&gt; have a tool intended for making an update image on an SD card which we&amp;rsquo;ve adapted. Meteor Server pushes a notification of a new version to Meteor Client, which schedules the upgrade to occur at a random time within an administrator-specified time window. When that time occurs the updater program I wrote downloads the required files over HTTP (using the WinInet library), checks that the files downloaded correctly using the CRC32 algorithm, then runs our unpacker for Meteor Client and the other software, then Symbol&amp;rsquo;s updater. When the updater finishes successfully it cold boots the device which causes the new software to install. The install-after-cold-boot mechanism is another tool that&amp;rsquo;s evolved over my four years with the company &amp;ndash; primarily my work.&lt;/p&gt;&lt;p&gt;To ensure that the update happens when the administrator wants it to, the device&amp;rsquo;s clock must be fairly accurate. Windows CE does supply a Simple Network Time Protocol client, but Symbol didn&amp;rsquo;t include that component in the MC3000 platform. We&amp;rsquo;d had trouble with its reliability on another device previously. I therefore wrote one myself, which took a couple of days &amp;ndash; it&amp;rsquo;s less than&amp;nbsp;750 lines of C++ code (including blanks and comments) which includes converting from UTC to the local time zone since this part of Windows CE is often unreliable &amp;ndash; it will tend not to take daylight saving into account, or do it twice. We therefore turn off the AutoDST setting in the registry &amp;ndash; we update the clock every few hours anyway so being slightly wrong at the start and end of daylight saving doesn&amp;rsquo;t matter. It&amp;rsquo;s somewhat simplified code &amp;ndash; the time is only computed to an accuracy of one second, which means no fixed point maths, and no roundtrip delay calculation is done. This provides plenty of accuracy for our purposes though.&lt;/p&gt;&lt;p&gt;The final part is the keyboard map. We do two things here: first, we map the two keys at the top of the MC3000&amp;rsquo;s keyboard which have, respectively, a green and a red surround so that they get key codes. The default keyboard map leaves them unmapped. These keys, being directly below the screen, are used as soft keys in the applications. Secondly, we found that since there&amp;rsquo;s no indicator light near the Alpha key, users could not tell when Alpha mode was active &amp;ndash; we had a few support calls in the trial deployment asking why the handheld was simply beeping when any key was pressed, which was simply because Alpha was on. New Look use the 28&amp;ndash;key keyboard. Style codes, colour codes and SKUs are all numeric, so there&amp;rsquo;s little need for alphabetic input, but the customer wanted to keep access to alphabetic characters for future applications. We therefore remap Alpha to a function key code and, in Meteor Client, toggle the on-screen keyboard when that key code is received.&lt;/p&gt;&lt;p&gt;That&amp;rsquo;s just the client side. This project, being the first to use multiple co-operating Meteor Servers to provide scale-out and failover capability, required some extensive work on the server side too.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-112527447862345439?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/112527447862345439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=112527447862345439' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/112527447862345439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/112527447862345439'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/08/answering-mail-anatomy-of-solution.html' title='Answering the mail - anatomy of a solution'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-112397758671817506</id><published>2005-08-14T00:59:00.000+01:00</published><updated>2005-08-14T00:59:46.760+01:00</updated><title type='text'>Aaarrgh!</title><content type='html'>&lt;p&gt;In my &lt;a href="http://mikedimmick.blogspot.com/2005/08/if-you-want-to-know-something-ask.html"&gt;last post&lt;/a&gt; I said Microsoft would be releasing some official information on a topic that had caused plenty of FUD on forums. They haven&amp;rsquo;t yet done so. This is kind of annoying. The guy I was talking to hasn&amp;rsquo;t responded to my query about where the statement would appear. So the world &amp;ndash; or at least, that part of the world that discusses these things on forums &amp;ndash; carries on consuming and spreading FUD.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.proudlyserving.com/archives/2005/08/alleged_monad_v.html"&gt;Some&lt;/a&gt; &lt;a href="http://www.leeholmes.com/blog/MonadAndTheFirstVistaVirus.aspx"&gt;parts&lt;/a&gt; of the Windows team reacted very quickly to the suggestion that Monad could allow the spread of viruses. This team needs a boot up the backside, IMO. &lt;a href="http://scoble.weblogs.com/"&gt;Scoble&lt;/a&gt;, are you listening?&lt;/p&gt;&lt;p&gt;OK, enough beating about the bush&amp;nbsp;&amp;ndash; I asked about OpenGL, and specifically &lt;a href="http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=12;t=000001"&gt;this topic&lt;/a&gt;. Now I come to re-read the topic, it&amp;rsquo;s clear &amp;ndash; if the app asks for accelerated pixel formats, and there is an Installable Client Driver available, Windows Vista will switch off the desktop compositor while the ICD is in use. What effect this will actually have I don&amp;rsquo;t know &amp;ndash; presumably it will temporarily revert to using software desktop rendering, i.e. directing each window to draw in turn, clipping the parts that are obscured, as Windows has done for&amp;nbsp;about 18 years (Windows 1.0 only allowed tiled, not overlapping windows). And of course you&amp;rsquo;ll only &lt;em&gt;notice&lt;/em&gt; this if you&amp;rsquo;re using a &lt;em&gt;windowed&lt;/em&gt; OpenGL app &amp;ndash; full-screen apps (like games) will no doubt &lt;em&gt;want&lt;/em&gt; the desktop compositor turned off!&lt;/p&gt;&lt;p&gt;The stuff about taking a 50% performance hit is simply FUD, IMO. The presumption is that translating OpenGL calls to Direct3D calls is expensive, but I don&amp;rsquo;t really see that. Numerous sites have had posters claiming that OpenGL is a more performant API than D3D, but without a&amp;nbsp;program released for both APIs with as much time spent on both implementations, benchmarked on a range of hardware to eliminate driver variability, there really is no way to tell. I think the basis for this is essentially iD fanboys &amp;ndash; since iD use OpenGL for their Quake, Return to Castle Wolfenstein&amp;nbsp;and Doom 3 engines, it must obviously be better, right? I honestly don&amp;rsquo;t know, except to say that the games I&amp;rsquo;ve played have always seemed &amp;lsquo;fast enough&amp;rsquo; if my system&amp;rsquo;s been within recommended spec, whatever API was used.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-112397758671817506?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/112397758671817506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=112397758671817506' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/112397758671817506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/112397758671817506'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/08/aaarrgh.html' title='Aaarrgh!'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-112370076643678815</id><published>2005-08-10T20:06:00.000+01:00</published><updated>2005-08-10T20:06:06.486+01:00</updated><title type='text'>If you want to know something, ask</title><content type='html'>&lt;p&gt;Conspiracy theorists: if you want to know why Microsoft are doing something, try asking them.&lt;/p&gt;&lt;p&gt;I recently saw some information on forums that seemed wrong, so I did a bit of research and found a presentation that seemed to apply. Microsoft presenters normally put their email addresses on the cover, and this was no exception, so I emailed the presenter asking him to clarify a few points. I got a nice reply back which covered what I was after.&lt;/p&gt;&lt;p&gt;Yes, I know that&amp;rsquo;s very wooly. I asked if I could blog the conversation and he said no. However, there should be some official information appearing later today. When it does, I&amp;rsquo;ll update (if I remember).&lt;/p&gt;&lt;p&gt;When in doubt, ask. If they can&amp;rsquo;t say, they&amp;rsquo;ll normally say so.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-112370076643678815?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/112370076643678815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=112370076643678815' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/112370076643678815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/112370076643678815'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/08/if-you-want-to-know-something-ask.html' title='If you want to know something, ask'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-112318998791336375</id><published>2005-08-04T22:13:00.000+01:00</published><updated>2005-08-04T22:13:07.966+01:00</updated><title type='text'>Where's the damn SDK?</title><content type='html'>&lt;p&gt;As I&amp;rsquo;m sure you&amp;rsquo;ve already seen, Windows Vista beta 1 was released about a week ago. This means I&amp;rsquo;m thinking about resurrecting my Changes to Win32 API in Longhorn series. Except, I can&amp;rsquo;t yet &amp;ndash;&amp;nbsp;because the SDK hasn&amp;rsquo;t been released yet!&lt;/p&gt;&lt;p&gt;Some kind of developer preview &lt;em&gt;this&lt;/em&gt; is&amp;hellip;&lt;/p&gt;&lt;p&gt;(Yeah, OK, the WinFX SDK has been released. But I&amp;rsquo;m still something of an unreconstructed Win32 guy.)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-112318998791336375?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/112318998791336375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=112318998791336375' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/112318998791336375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/112318998791336375'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/08/wheres-damn-sdk.html' title='Where&apos;s the damn SDK?'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-112318363796010629</id><published>2005-08-04T20:27:00.000+01:00</published><updated>2005-08-04T20:27:18.013+01:00</updated><title type='text'>Loving the new monitor</title><content type='html'>&lt;p&gt;I finally decided I needed more desktop space: both computer desktop, and the real desktop my monitor sits on &amp;ndash; and this computer sits under. So I decided it was time to replace my old faithful Iiyama VisionMaster Pro 400 17&amp;rdquo; CRT with a flat panel. I looked at a number of sites and picked the ViewSonic VP191b 19&amp;rdquo; panel. So I can now use 1280x1024 comfortably.&lt;/p&gt;&lt;p&gt;It took a little while to adjust it to how I like it &amp;ndash; colours seemed a little washed out &amp;ndash;&amp;nbsp;and it&amp;rsquo;s &lt;em&gt;very&lt;/em&gt; bright. For tips on adjusting your monitor, see Charles Poynton&amp;rsquo;s &lt;a href="http://www.poynton.com/notes/brightness_and_contrast/index.html"&gt;article on &amp;lsquo;Brightness&amp;rsquo; and &amp;lsquo;Contrast&amp;rsquo; controls&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;It cost a lot &amp;ndash; nearly &amp;pound;400 after VAT and delivery &amp;ndash;&amp;nbsp;but I reckon it&amp;rsquo;ll last. It&amp;rsquo;s got something to live up to &amp;ndash; the Iiyama lasted&amp;nbsp;seven years with me, and is still going strong.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-112318363796010629?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/112318363796010629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=112318363796010629' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/112318363796010629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/112318363796010629'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/08/loving-new-monitor.html' title='Loving the new monitor'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-112138013137152375</id><published>2005-07-14T23:28:00.000+01:00</published><updated>2005-07-14T23:28:51.400+01:00</updated><title type='text'>The Little Button That Could</title><content type='html'>&lt;p&gt;&lt;a href="http://thedailywtf.com/forums/38409/ShowPost.aspx"&gt;Good story today&lt;/a&gt; on &lt;a href="http://thedailywtf.com/"&gt;The Daily WTF&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;The reason I posted this, though, was this fantastic comment: &amp;ldquo;It's like he tried to reinvent the wheel and some how came up with a Platypus or something.&amp;rdquo;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-112138013137152375?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/112138013137152375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=112138013137152375' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/112138013137152375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/112138013137152375'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/07/little-button-that-could.html' title='The Little Button That Could'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-111938578698993316</id><published>2005-06-21T21:26:00.000+01:00</published><updated>2005-06-21T21:29:46.990+01:00</updated><title type='text'>No2ID Flair</title><content type='html'>Following &lt;a href="http://www.pure-virtual.org/ian/"&gt;Ian&lt;/a&gt;'s example, I've added the &lt;a href="http://www.pledgebank.com/refuse/"&gt;No2ID PledgeBank&lt;/a&gt; petition flair to this site. It looks like this: &lt;p&gt;&lt;a href="http://www.pledgebank.com/refuse"&gt;&lt;img height="119" alt="Click here to sign the no2id pledge" src="http://www-users.cs.york.ac.uk/~jack/refusepledge2.png" width="183" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;The counter updates with the number of people who have signed up.

Meta: I need to think about moving off Blogger. Republishing the whole site (e.g. when changing the template) takes an age.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-111938578698993316?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/111938578698993316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=111938578698993316' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111938578698993316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111938578698993316'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/06/no2id-flair.html' title='No2ID Flair'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-111877139001628325</id><published>2005-06-14T18:49:00.000+01:00</published><updated>2005-06-14T18:49:50.080+01:00</updated><title type='text'>Check your signatures and use precautions</title><content type='html'>&lt;p&gt;I&amp;rsquo;ve had 24 copies of the I-Worm/Mytob.HI worm since 1am today. Either they&amp;rsquo;re sending to spam lists or there&amp;rsquo;s a lot of infections out there.&lt;/p&gt;&lt;p&gt;This one&amp;rsquo;s&amp;nbsp;being sent with&amp;nbsp;faked &amp;lsquo;From&amp;rsquo; addresses, info@&amp;lt;domain&amp;gt;, admin@&amp;lt;domain&amp;gt;, service@&amp;lt;domain&amp;gt;, etc. Mostly&amp;nbsp;the message is&amp;nbsp;about account suspensions,&amp;nbsp;password updates, etc. Don&amp;rsquo;t be fooled. Don&amp;rsquo;t open the attachments.&amp;nbsp;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-111877139001628325?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/111877139001628325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=111877139001628325' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111877139001628325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111877139001628325'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/06/check-your-signatures-and-use.html' title='Check your signatures and use precautions'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-111853643151798318</id><published>2005-06-12T01:33:00.000+01:00</published><updated>2005-06-12T01:33:51.550+01:00</updated><title type='text'>Mac &amp; PC - will the performance comparisons end?</title><content type='html'>&lt;p&gt;From &lt;a href="http://www.internet-nexus.com/2005_06_05_archive.htm#111852664349360401"&gt;Paul Thurrott&lt;/a&gt;: a link to Java Rants, &amp;ldquo;&lt;a href="http://www.javarants.com/B1823453972/C1242049796/E1465276169/index.html"&gt;Will partnering with Intel give Apple a Mac faster than a PC?&lt;/a&gt;&amp;rdquo;&lt;/p&gt;&lt;p&gt;No.&lt;/p&gt;&lt;p&gt;Let me expand. The theory goes that the processor is laden down with years of backwards compatibility that costs performance &amp;ndash; starting afresh with a special customised &amp;lsquo;x86&amp;rsquo; with fewer instructions, without this backward compatibility, could improve performance. Apple&amp;rsquo;s &amp;lsquo;special&amp;rsquo; x86s could then beat &amp;lsquo;regular&amp;rsquo; x86s.&lt;/p&gt;&lt;p&gt;The trouble with this argument is that it&amp;rsquo;s bullshit.&lt;/p&gt;&lt;p&gt;The Pentium 4 does feature compatibility right back to the 8086. If the platform support is right, you can, it is believed, boot the original MS-DOS 1.0. But that doesn&amp;rsquo;t slow it down.&lt;/p&gt;&lt;p&gt;It&amp;rsquo;s correct that the core of the P4 is RISC-like, but only in the sense that the aim of RISC was to have very simple instructions that could be decoded by simple logic circuits which would execute on the core in one cycle. Modern &amp;lsquo;RISC&amp;rsquo; processors are the same, effectively, as the core of the P4 &amp;ndash; there are multiple execution units that can execute operations concurrently, in the same cycle. On the P4 there are two Arithmetic-Logic Units [ALUs] which can actually perform two operations per cycle &amp;ndash; one on the&amp;nbsp;first half&amp;nbsp;of the cycle, the other on the second. The key is in how the instructions are decoded.&lt;/p&gt;&lt;p&gt;Simple x86 instructions are decoded pretty much as a true RISC processor would &amp;ndash;&amp;nbsp;using logic&amp;nbsp;to directly decode an x86 instruction into a core-compatible micro-operation [&amp;micro;op]. The resulting &lt;em&gt;trace&lt;/em&gt; goes in the &lt;em&gt;trace cache&lt;/em&gt; &amp;ndash; the P4 attempts to only decode a stream of instructions once, performing loops directly from translated instructions. Anything more difficult than this &amp;ndash; say, indexed indirect memory loads with autoincrement &amp;ndash; goes to a microcode ROM which contains a &amp;lsquo;program&amp;rsquo; of &amp;micro;ops to implement that x86 instruction. If the microcode program is greater than 4 &amp;micro;ops in size, the execution core has to execute directly from the microcode ROM rather than the trace cache. I think that pretty much all of the clever out-of-order stuff is suppressed when this occurs. Hit a large&amp;nbsp;instruction from ROM and the processor slows to a crawl.&lt;/p&gt;&lt;p&gt;Anyway, after that brief technical interlude, let me explain why removing backwards compatibility won&amp;rsquo;t speed up the processor. &lt;em&gt;Because most of it&amp;rsquo;s implemented in the microcode ROM&lt;/em&gt;. I don&amp;rsquo;t know if you recall when the P4 first came out. A lot of commentators, running their tests on Windows 98, suggested that the P4 was actually slower clock-for-clock than the PIII. Guess why? Partly that code was optimised for the PIII which had different characteristics from the P4 &amp;ndash; but also that Windows 98 still contained a lot of 16&amp;ndash;bit code, which hit the microcode ROM.&lt;/p&gt;&lt;p&gt;If you don&amp;rsquo;t use the expensive instructions, you don&amp;rsquo;t incur any cost, particularly, for them being there. Presumably there&amp;rsquo;s a little more complexity in the decoder logic to determine that the instructions are in microcode.&lt;/p&gt;&lt;p&gt;People often make the same mistake with respect to Windows XP. They think that the existence of the DOS and Win16&amp;ndash;compatible subsystems slows it down. Nope. That code lives in NTVDM.EXE and WOWEXEC.EXE, which aren&amp;rsquo;t even loaded unless they&amp;rsquo;re being used. I also need to be clear that the console window &lt;em&gt;is not DOS&lt;/em&gt;. cmd.exe, the Command Prompt, is a 32&amp;ndash;bit Windows application that uses the console subsystem. The difference between a console app and a Windows app is that a console app has a console created for it if its parent was not running in a console. What is a console? It&amp;rsquo;s a window which is created and updated by the CSRSS process. There&amp;rsquo;s some code in there to handle back-compat graphics but again this almost certainly isn&amp;rsquo;t loaded unless it&amp;rsquo;s being used. A lot of this &lt;em&gt;has&lt;/em&gt; been ditched for Windows x64, but that&amp;rsquo;s because the processor doesn&amp;rsquo;t support virtual-8086 mode, necessary for this support, in so-called Long Mode (64&amp;ndash;bit mode).&lt;/p&gt;&lt;p&gt;cmd.exe supports (I believe) all of the DOS command interpreter, command.com&amp;rsquo;s feature set, and extends it greatly. This, plus the command-line environment, leads a lot of people to be confused. Particularly when some of the system utilities, like &lt;em&gt;more&lt;/em&gt;, exist as files named &lt;em&gt;more.com&lt;/em&gt;. If you look with &lt;em&gt;dumpbin&lt;/em&gt; or &lt;em&gt;depends&lt;/em&gt;, you&amp;rsquo;ll see that &lt;em&gt;more.com&lt;/em&gt; is in fact a Win32 console executable.&lt;/p&gt;&lt;p&gt;Speaking of x64, I note that Apple &lt;em&gt;aren&amp;rsquo;t&lt;/em&gt; going straight for x64. Their &lt;a href="http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary.pdf"&gt;Universal Binary Programming Guidelines&lt;/a&gt;&amp;nbsp;[PDF, 1.5MB]&amp;nbsp;talk about the 32&amp;ndash;bit register set, not the 64&amp;ndash;bit extended set. I expect that this decision is because the Pentium M with EM64T &amp;ndash; codename &amp;lsquo;Merom&amp;rsquo; &amp;ndash; isn&amp;rsquo;t due out until late 2006.&lt;/p&gt;&lt;p&gt;This whole argument presupposes that Intel will make Mac-specific processors. I think that&amp;rsquo;s highly unlikely. Apple haven&amp;rsquo;t told us their motivations, leading to a lot of speculation. My view is that they are trying to both save money, by using a more commodity processor, and enable quicker access to newer technologies, by using more commodity chipsets (oh, and save money). It took them years to get AGP in Mac hardware, and it looked like taking even more years to get PCI Express. I don&amp;rsquo;t therefore expect Intel to produce &amp;lsquo;special&amp;rsquo; processors for Apple &amp;ndash; it&amp;rsquo;ll be stock parts or nothing.&lt;/p&gt;&lt;p&gt;Another reason for using stock parts is so that stock software tools can be used. Apple can mostly wave goodbye to maintaining their own compiler. It&amp;rsquo;s no accident that their guidelines state they&amp;rsquo;re using the &lt;a href="http://www.caldera.com/developers/devspecs/abi386-4.pdf"&gt;System V i386 Application Binary Interface&lt;/a&gt;&amp;nbsp;[PDF, 1.0MB], with only minor modifications. Of course, that means that to begin with, Apple will be using the very compiler &amp;ndash; GCC &amp;ndash; which they used to &amp;lsquo;prove&amp;rsquo; that PowerPC G5s outperformed P4s, in that contentious set of benchmarks. Unless they&amp;rsquo;ve improved the optimiser, or learned how to use it properly, &amp;lsquo;PCs&amp;rsquo; may well still outperform Macs.&lt;/p&gt;&lt;p&gt;One tiny area in which Macs may have a temporary advantage is in exception handling. Today, on 32&amp;ndash;bit Windows, each use of an exception handler pushes a handler frame onto the stack, a cost incurred whether or not an exception actually occurs. I believe GCC uses a table-based scheme, which in general incurs that cost only when an exception occurs. However, Windows on x64 &amp;ndash; indeed on every&amp;nbsp;architecture other than 32&amp;ndash;bit x86 &amp;ndash; also uses a table-based scheme.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-111853643151798318?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/111853643151798318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=111853643151798318' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111853643151798318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111853643151798318'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/06/mac-pc-will-performance-comparisons.html' title='Mac &amp; PC - will the performance comparisons end?'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-111852841372926040</id><published>2005-06-11T23:20:00.000+01:00</published><updated>2005-06-11T23:20:13.786+01:00</updated><title type='text'>Passing the word</title><content type='html'>&lt;p&gt;Want to keep your right, as a UK citizen[*], to privacy? Sign up for the No2ID pledge &lt;a href="http://www.pledgebank.com/refuse"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pure-virtual.org/ian/PermaLink.aspx?guid=676f3234-b24a-404f-a604-a26f2281a617"&gt;Via Ian&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;[*]Not a subject, dammit. I do not recognise the Queen as my ruler. Rulers are things you draw straight lines with &amp;ndash; she&amp;rsquo;s a bit bumpy for that.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-111852841372926040?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/111852841372926040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=111852841372926040' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111852841372926040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111852841372926040'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/06/passing-word.html' title='Passing the word'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-111730923937478734</id><published>2005-05-28T20:40:00.000+01:00</published><updated>2005-05-28T20:40:39.426+01:00</updated><title type='text'>Watermark rendering bug in ListView</title><content type='html'>&lt;p&gt;Or at least, in the &amp;lsquo;My Pictures&amp;rsquo; folder in Windows XP Explorer. Try it yourself &amp;ndash; ensure the watermark is enabled. Then right click and select &amp;lsquo;New Text Document&amp;rsquo;. Click to remove the rename highlight. Then select it again and press Shift+Del. Hit Yes.&lt;/p&gt;&lt;p&gt;If this reproduces on your computer, you&amp;rsquo;ll see something like this:&lt;/p&gt;&lt;p&gt;&lt;img height="179" alt="" src="http://www.dimmick.demon.co.uk/blog/renderbug_small.jpg" width="163" border="0" /&gt;&lt;/p&gt;&lt;p&gt;I guess the ListView code simply calls &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/scrollbars/scrollbarreference/scrollbarfunctions/scrollwindowex.asp"&gt;ScrollWindowEx&lt;/a&gt;&amp;nbsp;to move any remaining lines up, but doesn&amp;rsquo;t take account of the watermark.&lt;/p&gt;&lt;p&gt;New technology plug: since Avalon is a &lt;em&gt;stored graph &lt;/em&gt;system, it should handle this kind of thing for you. That is, you tell it what components make up your rendering &amp;ndash; it renders the appropriate parts as required.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-111730923937478734?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/111730923937478734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=111730923937478734' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111730923937478734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111730923937478734'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/05/watermark-rendering-bug-in-listview.html' title='Watermark rendering bug in ListView'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-111729584295506081</id><published>2005-05-28T16:57:00.000+01:00</published><updated>2005-05-28T16:57:23.006+01:00</updated><title type='text'>More Mobile Developer Shafting: Compact Framework 2.0 won't run on CE 4.x</title><content type='html'>&lt;p&gt;I downloaded the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=033204C1-38AD-4FCE-B5AB-0E2EC2DFF565&amp;amp;displaylang=en"&gt;Compact Framework 2.0 Redistributable&lt;/a&gt; yesterday as well, planning to do a little testing with one of our CF 1.0 apps. (I need to discover how to force using 2.0 if both are installed). In doing so I discovered that CF 2.0 only supports Pocket PC 2003 and Smartphone 2003, Windows CE 5.0 custom platforms, and Windows Mobile 5.0 (for Pocket PC and Smartphone).&lt;/p&gt;&lt;p&gt;That means that new devices, &lt;em&gt;introduced this year&lt;/em&gt;, like &lt;a href="http://www.symbol.com/products/mobile_computers/MC3000/MC3000.html"&gt;Symbol&amp;rsquo;s MC3000&lt;/a&gt;&amp;nbsp;which runs a custom CE 4.2 platform, are not supported. Why aren&amp;rsquo;t Symbol using CE 5.0? Who knows. Maybe they didn&amp;rsquo;t want to revalidate all their components on the new OS yet.&lt;/p&gt;&lt;p&gt;Yesterday I was at the &lt;a href="http://www.ba-londoneye.com/"&gt;London Eye&lt;/a&gt;. They appear to use &lt;a href="http://www.symbol.com/products/mobile_computers/mobile_ppc_ppt2800.html"&gt;PPT 2800s&lt;/a&gt;&amp;nbsp;with the optional trigger handle to scan the barcoded tickets. This device runs Pocket PC 2002.&lt;/p&gt;&lt;p&gt;Customers often want upgrades and/or new applications to run on existing hardware. We&amp;rsquo;d like to be able to use the newer tools to implement those upgrades or new applications. But we can&amp;rsquo;t, because those tools won&amp;rsquo;t run on the old hardware.&lt;/p&gt;&lt;p&gt;The &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=7abd8c8f-287e-4c7e-9a4a-a4ecff40fc8e&amp;amp;DisplayLang=en"&gt;full framework&lt;/a&gt; is compatible back to Windows 98. We can&amp;rsquo;t get three years&amp;rsquo; worth of backwards compatibility in the mobile world.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-111729584295506081?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/111729584295506081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=111729584295506081' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111729584295506081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111729584295506081'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/05/more-mobile-developer-shafting-compact.html' title='More Mobile Developer Shafting: Compact Framework 2.0 won&apos;t run on CE 4.x'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-111728547801436035</id><published>2005-05-28T14:04:00.000+01:00</published><updated>2005-05-28T14:04:38.063+01:00</updated><title type='text'>.NET Framework 2.0 Compatibility</title><content type='html'>&lt;p&gt;Brad Abrams: &lt;a title="Brad Abrams" href="http://blogs.msdn.com/brada/archive/2005/05/26/422383.aspx"&gt;Take the .NET Framework 2.0 Compatibility Challenge&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;I was at a slightly loose end yesterday afternoon, so I took advantage of that time to check that &lt;a href="http://www.5d.co.uk/Meteor.htm"&gt;Meteor Server&lt;/a&gt;, and the price checking/stock availability&amp;nbsp;application we wrote for a large deployment at a UK retailer, still work correctly under .NET Framework 2.0 Beta 2.&lt;/p&gt;&lt;p&gt;Meteor Server &lt;em&gt;itself&lt;/em&gt; is mostly VB6 components &amp;ndash; a server executable, an application-host component executable (ActiveX EXE in VB6 terminology), a few application-interface components which have strict binary-compatibility requirements &amp;ndash; with a few bits of C++ where the VB6 environment really ran out of steam (TCP/IP printing, since TCP is a pain with the Winsock control, and a &amp;lsquo;callback&amp;rsquo; component which&amp;nbsp;replaces the use of&amp;nbsp;minimum-delay timers). Applications are written as COM components. Recently &amp;ndash; in the last couple of years &amp;ndash; we&amp;rsquo;ve been writing new applications in VB.NET or C#. We&amp;rsquo;ve generally found that more productive than VB6. To do this we&amp;rsquo;ve built &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/whypriinterop.asp"&gt;Primary Interop Assemblies&lt;/a&gt;&amp;nbsp;[PIAs] for the application-interface components.&lt;/p&gt;&lt;p&gt;Meteor Server isn&amp;rsquo;t really .NET-aware. We do ship configuration files for the server and application-host executables, to force the latest version of the PIAs to be used. This allows older applications to run on a newer version of the server, without having to distribute the PIAs with each app, or all versions that have ever existed with Meteor itself. Remember that .NET binds to a specific version of an assembly, not to the most recently installed. We did try using &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcreatingpublisherpolicyfile.asp"&gt;Publisher Policy&lt;/a&gt; but had problems with it &amp;ndash; sometimes the Framework would fail to load an application object, often crashing with an Access Violation in fusion.dll. Due to a misunderstanding in version numbers we had to ship multiple policy DLLs when using that scheme &amp;ndash; one for every &lt;em&gt;major.minor&lt;/em&gt; version of the PIAs we&amp;rsquo;d released.&lt;/p&gt;&lt;p&gt;Using explicit configuration reduces the frequency of this problem, but not to zero &amp;ndash; we still occasionally see this in deployment, with Framework 1.1 SP1. It&amp;rsquo;s something of a &lt;a href="http://catb.org/~esr/jargon/html/H/heisenbug.html"&gt;heisenbug&lt;/a&gt; &amp;ndash; it never happens when you&amp;rsquo;re looking for it. And a particular nightmare when dealing with VB6 code, because the VB6 debugger &lt;em&gt;does not run your code as it will be run in deployment&lt;/em&gt;. Instead it hosts it in-process in the VB6 environment. You&amp;rsquo;re not even running the compiled code, I believe it translates the code to p-code and interprets that. While you can turn on PDB generation and debug with VS.NET or another native code debugger such as WinDbg, the generated PDBs are poor quality and don&amp;rsquo;t, for example, often include your local variables or globals properly.&lt;/p&gt;&lt;p&gt;Since it&amp;rsquo;s not really .NET-aware, the default behaviour of the Framework when loading into an unmanaged host applies &amp;ndash; the most recent version of the Framework is loaded. We support loading alternate applications under application control in the newest versions of Meteor (I think the version currently available on our website is very out-of-date). The aforementioned price-checking application is actually implemented as four applications: a menu application which loads the others, the price-check application, the stock-availability application, and a head-office application which has testing features. This does mean that &lt;em&gt;all&lt;/em&gt; applications will need to support the latest version of Framework, or the admin will need to tweak the config files to force &lt;em&gt;all&lt;/em&gt; applications to bind to the older runtime.&lt;/p&gt;&lt;p&gt;Anyway, I&amp;rsquo;m pleased to report that there were no obvious problems using Framework 2.0 with any of these applications.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-111728547801436035?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/111728547801436035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=111728547801436035' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111728547801436035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111728547801436035'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/05/net-framework-20-compatibility.html' title='.NET Framework 2.0 Compatibility'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-111653984657915853</id><published>2005-05-19T22:57:00.000+01:00</published><updated>2005-05-19T22:57:26.633+01:00</updated><title type='text'>StarCraft: Ghost</title><content type='html'>&lt;p&gt;&lt;em&gt;How&lt;/em&gt;&amp;nbsp;long have we been waiting for &lt;a href="http://www.blizzard.com/"&gt;Blizzard&lt;/a&gt;&amp;rsquo;s &lt;a href="http://www.blizzard.com/ghost/"&gt;StarCraft: Ghost&lt;/a&gt;? I can&amp;rsquo;t recall &amp;ndash; I think they first announced it in &lt;em&gt;2001&lt;/em&gt;.&lt;/p&gt;&lt;p&gt;This week at E3 Blizzard have published &lt;a href="http://www.blizzard.com/ghost/movies/"&gt;new trailers and gameplay movies&lt;/a&gt;. I can&amp;rsquo;t help thinking it might be too little too late. What blew us away three or four years ago now looks a bit, well, ordinary. Halo 2 seriously raised the bar.&lt;/p&gt;&lt;p&gt;What&amp;rsquo;s been taking so long? I don&amp;rsquo;t know, but it looks like Blizzard have ditched their original partner &lt;a href="http://www.nihilistic.com/projects_starcraftghost.php"&gt;Nihilistic Software&lt;/a&gt;, &lt;a href="http://www.blizzard.com/press/acquisition.shtml"&gt;bought up a console developer&lt;/a&gt;, and brought the game back in-house.&lt;/p&gt;&lt;p&gt;The question for Blizzard: can they release this game before the next generation of hardware arrives and they look completely stupid?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-111653984657915853?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/111653984657915853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=111653984657915853' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111653984657915853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111653984657915853'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/05/starcraft-ghost.html' title='StarCraft: Ghost'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-111636359698489765</id><published>2005-05-17T21:59:00.000+01:00</published><updated>2005-05-17T21:59:57.030+01:00</updated><title type='text'>Xbox Backwards Compatibility</title><content type='html'>&lt;p&gt;&lt;a href="http://www.qbrundage.com/michaelb/pubs/essays/xbox360.html"&gt;Xbox Backwards Compatibility&lt;/a&gt;&lt;/p&gt;&lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;p&gt;&lt;em&gt;Now that it's been announced at E3, I can finally reveal that the Xbox 360 feature I work on is... &lt;b&gt;Xbox backwards compatibility&lt;/b&gt;!&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Yes, it's real. It's been fun to watch all the wild speculation over the past year or so as to whether the Xbox 360 would or wouldn't be backwards compatible. And all the wild ideas about how hard or easy it would be. It's clear that a lot of people have very little understanding of how these things work.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p dir="ltr"&gt;Were I forced to speculate, I&amp;rsquo;d expect some kind of JIT-compiler like the x86&amp;ndash;on-Itanium &lt;a href="http://www.microarch.org/micro36/html/pdf/goldenberg-IA32ExecutionLayer.pdf"&gt;IA32EL&lt;/a&gt; or the x86&amp;ndash;on-Alpha FX!32 is involved. I can&amp;rsquo;t remember the old rule-of-thumb for emulation &amp;ndash; was it that you should have a processor ten times as powerful as the emulated processor to reach parity? Of course that was for state-machine-based emulators, where essentially each instruction was executed in turn by emulating instruction fetch, decode, execute, retire.&lt;/p&gt;&lt;p dir="ltr"&gt;Whether&amp;nbsp;a particular&amp;nbsp;Xbox game runs on Xbox 360 will depend on just how closely the assumed-JIT and its library emulate the original processor and, of course, GPU. Hopefully the fact that Jet Set Radio Future was a launch title and was bundled with some consoles (e.g. mine!)&amp;nbsp;will be taken into consideration!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-111636359698489765?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/111636359698489765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=111636359698489765' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111636359698489765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111636359698489765'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/05/xbox-backwards-compatibility.html' title='Xbox Backwards Compatibility'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-111627199401335224</id><published>2005-05-16T20:33:00.000+01:00</published><updated>2005-05-16T20:33:14.070+01:00</updated><title type='text'>Dammit, more incompatibilities</title><content type='html'>&lt;p&gt;From &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/migration_developers_faq.asp"&gt;Windows Mobile Platform Migration FAQ for Developers&lt;/a&gt;:&lt;/p&gt;&lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;p&gt;&lt;em&gt;Starting with Windows Mobile 5.0, only one instance of the installer (wceload.exe) can be running at a time on Pocket PC devices. This restriction has always been in place on Smartphone. As a result, CAB files that start other CAB files from a custom setup DLL may not work on Windows Mobile 5.0. The workaround for this is to have a small executable in the CAB that a custom setup.dll starts in its &lt;b&gt;Install_Exit&lt;/b&gt; entry point. This executable can get a handle to the running wceload.exe process, wait for wceload.exe to exit, and then restart wceload.exe on the additional CABs.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p dir="ltr"&gt;We have a pretty clever (says he who wrote it) technique of packing multiple CABs into one wrapper CAB file, which enables us to install Compact Framework, SQL CE, our barcode scanner hardware abstraction layer (ScanHAL), our &lt;a href="http://www.handango.com/PlatformProductDetail.jsp?productType=2&amp;amp;platformId=2&amp;amp;siteId=1&amp;amp;productId=92315"&gt;simple large-key input method&lt;/a&gt;, and the application itself, all in one go. Looks like I&amp;rsquo;ll need to rewrite it slightly at the install-to-RAM stage.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-111627199401335224?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/111627199401335224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=111627199401335224' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111627199401335224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111627199401335224'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/05/dammit-more-incompatibilities.html' title='Dammit, more incompatibilities'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-111575823877052508</id><published>2005-05-10T21:50:00.000+01:00</published><updated>2005-05-10T21:50:39.103+01:00</updated><title type='text'>Well, I hope it takes a while before devices appear</title><content type='html'>&lt;p&gt;Today, Microsoft announced Windows Mobile 5.0 (codenamed &amp;lsquo;Magneto&amp;rsquo;). They&amp;rsquo;ve made two bone-headed decisions from a development perspective:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;ActiveSync 4.0 no longer supports TCP/IP synchronisation&lt;/li&gt;&lt;li&gt;According to &lt;a href="http://msdn.microsoft.com/mobility/windowsmobile/default.aspx?pull=/library/en-us/dnppcgen/html/devtoolsmobileapps.asp"&gt;this page&lt;/a&gt;, eVC 4.0 cannot be used to develop for Windows Mobile 5.0. You must use Visual Studio 2005.&lt;/li&gt;&lt;li&gt;Also, it seems you can&amp;rsquo;t use VS.NET 2003 to develop Compact Framework applications for WM5. Likewise, you must use VS2005.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The first can be worked around &amp;ndash; you don&amp;rsquo;t &lt;em&gt;need&lt;/em&gt; to use the ActiveSync transport or startup server&amp;nbsp;for Platform Manager, but it&amp;rsquo;s a heck of a lot more convenient than using the TCP/IP Transport with the Manual startup server. With that combination you need to enter a horribly long command line (example: &lt;em&gt;CEMGRC.EXE /T:TCPIPC.DLL /Q&amp;nbsp; /D:192.168.1.2:5913&lt;/em&gt;) on the device. VS.NET 2003 and 2005 do not use Platform Manager, though &amp;ndash; trying to get both hooked up to the same device &amp;ndash; as I tried to do today to actually view the contents of a memory block allocated in C# code, because opening the debugger memory window kills the debugging session &amp;ndash; is highly problematic.&lt;/p&gt;&lt;p&gt;The second and third are idiotic. Hint to MS: &lt;em&gt;VS2005 is not yet released!&lt;/em&gt; Yes, there&amp;rsquo;s a beta. No, I wouldn&amp;rsquo;t trust it for production development.&lt;/p&gt;&lt;p&gt;And there&amp;rsquo;s a new development. Mobile device development is &lt;a href="http://lab.msdn.microsoft.com/vs2005/productinfo/productline/default.aspx"&gt;a feature in the Standard Edition and above&lt;/a&gt;. It is &lt;em&gt;not&lt;/em&gt; a feature of the Express Editions. Microsoft &lt;a href="http://blogs.msdn.com/davidklinems/archive/2005/04/18/409532.aspx"&gt;claim that there will be a Compact Framework SDK&lt;/a&gt;. Previously eVC was &lt;em&gt;free&lt;/em&gt;. This made a big difference.&lt;/p&gt;&lt;p&gt;It&amp;rsquo;s not as if you can mix-and-match that well, either, because the current VS2005 beta apparently requires ActiveSync 4.0 &amp;ndash; not actually released yet &amp;ndash; in order&amp;nbsp;to deploy to a device. Gee, thanks &amp;lt;/sarcasm&amp;gt;.&lt;/p&gt;&lt;p&gt;Yup. Mobile developers get the shaft again. I&amp;rsquo;ve spent some time today trying to work out a way of avoiding getting blocked when calling InternetCloseHandle when a dial-up networking link has gone down. We seem to have the choice of either rebooting when blocked (enterprise app, so not completely&amp;nbsp;out-of-bounds but undesirable, especially when the hardware cold boots when it was supposed to warm boot) or leaking handles, or rewriting to use WinInet asynchronously. WinInet isn&amp;rsquo;t well documented for the synchronous case, for the async case it&amp;rsquo;s downright abysmal.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-111575823877052508?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/111575823877052508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=111575823877052508' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111575823877052508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111575823877052508'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/05/well-i-hope-it-takes-while-before.html' title='Well, I hope it takes a while before devices appear'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-111431071489873227</id><published>2005-04-24T03:45:00.000+01:00</published><updated>2005-04-24T03:45:14.896+01:00</updated><title type='text'>How does a New submenu Command know where to create the new item?</title><content type='html'>&lt;p&gt;On the command line, that&amp;rsquo;s how.&lt;/p&gt;&lt;p&gt;You must specify %1 in the command line somewhere, otherwise Explorer simply doesn&amp;rsquo;t do anything (it reports &amp;ldquo;Not enough storage to complete this operation&amp;rdquo;, an erroneous error message). The %1 is replaced by the full path to the file that would have been created.&lt;/p&gt;&lt;p&gt;Looking at Briefcase&amp;rsquo;s .bfc registry key shows that there&amp;rsquo;s also a second option passed to FormatMessage to create the command line, and it&amp;rsquo;s a number &amp;ndash; the command line includes %2!d! which is indicative of the use of FormatMessage. It&amp;rsquo;s not clear what this second option means, however.&lt;/p&gt;&lt;p&gt;So that&amp;rsquo;s a step towards building our Burn Folders. Since our shell extension will be a DLL, we&amp;rsquo;ll probably include the New command as an entry point and use &lt;a href="http://support.microsoft.com/kb/164787"&gt;rundll32&lt;/a&gt; to launch that. That keeps everything together.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-111431071489873227?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/111431071489873227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=111431071489873227' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111431071489873227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111431071489873227'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/04/how-does-new-submenu-command-know.html' title='How does a New submenu Command know where to create the new item?'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-111430870310066665</id><published>2005-04-24T03:11:00.000+01:00</published><updated>2005-04-24T03:27:43.460+01:00</updated><title type='text'>Musings: How to produce a Burn Folder in Windows?</title><content type='html'>&lt;p&gt;One of the new features in Apple&amp;rsquo;s Mac OS X &amp;lsquo;Tiger&amp;rsquo; is &amp;lsquo;Burn Folders&amp;rsquo; &amp;ndash; a folder which you can easily write to a CD by selecting the &amp;lsquo;Burn&amp;rsquo; option. It contains links to the files or folders to burn, not copies of the files. In other ways it&amp;rsquo;s just like any other folder. This allows the user to stage multiple CDs at once, and keep frequently-written CD data in an easy-to-write folder. How hard would it be to create one of these folders in Windows?&lt;/p&gt;&lt;p&gt;The Windows (Explorer) shell is extensible. One of the things you can extend is the shell namespace. The Recycle Bin is&amp;nbsp;a shell extension. So is My Documents. A Burn Folder might therefore be something like Recycle Bin. It&amp;rsquo;s even more like a Briefcase, a feature much touted back in Windows 95 &amp;ndash; it&amp;rsquo;s still there in XP, but its functionality is largely replaced by Offline Files for the situation where you&amp;rsquo;re taking your computer away from the office.&lt;/p&gt;&lt;p&gt;Let&amp;rsquo;s assume that when you create a Burn Folder, we actually create a real folder with that name with some special properties, and in it, when you drop an item, we store a Shell shortcut to the item you dropped. We should also support copy and paste, pasting links. By using shortcuts we should be able to leverage the Distributed Link Tracking service to keep track of where items are if you move the original file. I&amp;rsquo;m not sure what we do if the original file was removed &amp;ndash; presumably we have to try to resolve all the links before starting to burn, and if some are missing we need to report that.&lt;/p&gt;&lt;p&gt;So, we have a namespace extension, and it sounds like we&amp;rsquo;re probably going to &lt;a href="http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/shell_adv/namespaceextension/nse_junction.asp?frame=true#file"&gt;use a folder as the junction point&lt;/a&gt;. We&amp;rsquo;ll have to &lt;a href="http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/context.asp?frame=true#new"&gt;extend the New submenu&lt;/a&gt; to allow such a folder to be created (I guess we&amp;rsquo;ll have to use the Command option). We&amp;rsquo;ll have to &lt;a href="http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/shell_adv/namespaceextension/nse_folderview.asp?frame=true#unknown_39533"&gt;modify the Explorer toolbar&lt;/a&gt; to show the Burn button. To address &lt;a href="http://www.internet-nexus.com/2005_04_17_archive.htm#111404790991321402"&gt;a complaint Paul Thurrott made&lt;/a&gt; about &amp;lsquo;Tiger&amp;rsquo;s Burn Folders, we should probably also &lt;a href="http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/shell_adv/namespaceextension/nse_folderview.asp?frame=true#unknown_43582"&gt;modify the status bar&lt;/a&gt; to show the size of the linked files (i.e. how much space is required).&lt;/p&gt;&lt;p&gt;That covers the UI, then we have to be able to write to the disc. Here we&amp;rsquo;re pretty much stuck with just being able to handle CDs and writing them using the &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devio/base/image_mastering_api.asp"&gt;Image Mastering API&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;This might be a fun thing to do. Something to add to my stack.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-111430870310066665?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/111430870310066665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=111430870310066665' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111430870310066665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111430870310066665'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/04/musings-how-to-produce-burn-folder-in.html' title='Musings: How to produce a Burn Folder in Windows?'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-111421095892689344</id><published>2005-04-23T00:02:00.000+01:00</published><updated>2005-04-23T00:09:06.686+01:00</updated><title type='text'>Full-screen is a new feature??</title><content type='html'>&lt;p&gt;Paul Thurrott: &lt;a title="Paul Thurrott's Internet Nexus" href="http://www.internet-nexus.com/2005_04_17_archive.htm#111420829312179496"&gt;Tiger math 2: When a feature isn't a feature&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Apparently Apple are touting full-screen video playback as a new feature in QuickTime 7 in Mac OS X &amp;lsquo;Tiger&amp;rsquo;. Except that you actually don&amp;rsquo;t get it in &amp;lsquo;Tiger&amp;rsquo;, you have to pay for an upgrade to QuickTime Pro &amp;ndash; the upgrade to the Pro edition of 6.5 cost $29.99.&lt;/p&gt;&lt;p&gt;In contrast, Windows Media Player has full-screen support out-of-the-box. I seem to recall that it has done ever since Media Player 6.4 on Windows 2000. Certainly the version of Media Player 6.4 that ships with Windows XP (run mplayer2 from Program Files\Windows Media Player), version 6.4.09.1130 on my computer, has this feature.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-111421095892689344?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/111421095892689344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=111421095892689344' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111421095892689344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111421095892689344'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/04/full-screen-is-new-feature.html' title='Full-screen is a new feature??'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-111421088123032424</id><published>2005-04-23T00:01:00.000+01:00</published><updated>2005-04-23T00:01:21.230+01:00</updated><title type='text'>Scary...</title><content type='html'>&lt;p&gt;&lt;img alt="" src="http://www.einlanzer.net/pope.jpg" border="0" /&gt;&lt;/p&gt;&lt;p&gt;On top, Emperor Palpatine from the Star Wars trilogy. On the bottom, Pope Benedict XVI.&lt;/p&gt;&lt;p&gt;Or is it the other way around? &lt;img src="http://www.dimmick.demon.co.uk/blog/smile4.gif" /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-111421088123032424?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/111421088123032424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=111421088123032424' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111421088123032424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111421088123032424'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/04/scary.html' title='Scary...'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-111358657397689988</id><published>2005-04-15T18:36:00.000+01:00</published><updated>2005-04-15T18:36:13.976+01:00</updated><title type='text'>Tory posters defaced in Reading</title><content type='html'>&lt;p&gt;Seen on &lt;a href="http://www.microsoft.com/typography/links/NewsArchive.aspx?MTH=3&amp;amp;YR=2005"&gt;Microsoft Typography news&lt;/a&gt;: &lt;span class="bodyheading"&gt;&lt;a href="http://www.getreading.co.uk/story.asp?intid=11803"&gt;&lt;em&gt;Anger after Tory ads vandalised&lt;/em&gt;&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="bodyheading"&gt;It wasn&amp;rsquo;t me, but I can understand why they were vandalised. The Tories&amp;rsquo; whole campaign is based heavily on ignorance &amp;ndash; &lt;em&gt;xyz&lt;/em&gt; can&amp;rsquo;t be that hard, can it?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="bodyheading"&gt;Yes, usually it can. I&amp;rsquo;m surprised &amp;ndash; well, actually I&amp;rsquo;m not &amp;ndash; that Labour and the LibDems have not actually rebutted how hard it is to do &lt;em&gt;xyz&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-111358657397689988?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/111358657397689988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=111358657397689988' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111358657397689988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111358657397689988'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/04/tory-posters-defaced-in-reading.html' title='Tory posters defaced in Reading'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-111289779307227124</id><published>2005-04-07T19:16:00.000+01:00</published><updated>2005-04-07T19:16:33.073+01:00</updated><title type='text'>Bring Back Chris Brumme!</title><content type='html'>&lt;p&gt;&lt;a href="http://blogs.msdn.com/cbrumme/"&gt;Chris Brumme&amp;rsquo;s blog&lt;/a&gt; was one of the first I started to read, after &lt;a href="http://radio.weblogs.com/0001011/"&gt;Scoble&lt;/a&gt;, &lt;a href="http://www.sellsbrothers.com/"&gt;Chris Sells&lt;/a&gt; and &lt;a href="http://pluralsight.com/blogs/dbox/"&gt;Don Box&lt;/a&gt;. He&amp;rsquo;s managed a tricky task of explaining very complex subject matter (how the .NET CLR works) well.&lt;/p&gt;&lt;p&gt;Sadly he&amp;rsquo;s not posted in nearly a year, and the last entry was just announcing updates to existing articles.&lt;/p&gt;&lt;p&gt;So I&amp;rsquo;m joining &lt;a href="http://www.simplegeek.com/"&gt;Chris Anderson&lt;/a&gt; and &lt;a href="http://blogs.msdn.com/brada/default.aspx"&gt;Brad Abrams&lt;/a&gt; in saying:&lt;/p&gt;&lt;p&gt;&lt;img alt="" src="http://www.razorsoft.net/images/bbcbsmall.jpg" border="0" /&gt;&lt;a href="http://www.razorsoft.net/images/bbcbsmall.jpg"&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-111289779307227124?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/111289779307227124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=111289779307227124' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111289779307227124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111289779307227124'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/04/bring-back-chris-brumme.html' title='Bring Back Chris Brumme!'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-111056892910188888</id><published>2005-03-11T19:22:00.000Z</published><updated>2005-03-11T19:22:09.100Z</updated><title type='text'>Putting things in perspective</title><content type='html'>&lt;p&gt;Mozilla and all their fans, and FOSS people in general, are fond of saying that Firefox has had over 25 million downloads. Sounds like a lot, right?&lt;/p&gt;&lt;p&gt;I was on the &lt;a href="http://www.skype.com/"&gt;Skype&lt;/a&gt; site earlier today. We use it at work in preference to calling mobile phones. (I was on the site because users were having trouble logging in &amp;ndash; some kind of authentication server failure.) Skype are currently reporting 84 million downloads, and one million users using SkypeOut, the Skype-to-PSTN service.&lt;/p&gt;&lt;p&gt;Is Firefox really all that popular, then?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-111056892910188888?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/111056892910188888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=111056892910188888' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111056892910188888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/111056892910188888'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/03/putting-things-in-perspective.html' title='Putting things in perspective'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-110963259638982430</id><published>2005-02-28T23:16:00.000Z</published><updated>2005-02-28T23:16:36.390Z</updated><title type='text'>MS Press, what are you thinking?</title><content type='html'>&lt;p&gt;It looks like a couple of &lt;a href="http://www.wintellect.com/about/instructors/default.aspx#3"&gt;Jeffrey Richter&lt;/a&gt;&amp;rsquo;s classic and &lt;em&gt;essential&lt;/em&gt; Windows programming books have gone out of print:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.amazon.com/exec/obidos/tg/detail/-/1572319968/"&gt;Programming Applications for Microsoft Windows, 4th Ed.&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.amazon.com/exec/obidos/tg/detail/-/0735607532/"&gt;Programming Server-Side Applications for Microsoft Windows&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The .NET Framework and the C# programming language have huge productivity benefits, but there are times when you still need to get close to the metal. When you do, you need the best training possible. If you need to do it, those two books and &lt;a href="http://www.amazon.com/exec/obidos/tg/detail/-/0735619174/"&gt;Windows Internals, 4th Ed.&lt;/a&gt; are your best guide &amp;ndash; IMO &amp;ndash; to understanding what&amp;rsquo;s happening and how to make best use of the facilities at your disposal.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-110963259638982430?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/110963259638982430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=110963259638982430' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/110963259638982430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/110963259638982430'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/02/ms-press-what-are-you-thinking.html' title='MS Press, what are you thinking?'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-110955328786472347</id><published>2005-02-28T01:14:00.000Z</published><updated>2005-02-28T01:14:47.863Z</updated><title type='text'>How to set the owner of an object in Windows XP</title><content type='html'>&lt;p&gt;Normally, in Windows NT-family security, you cannot set the owner of a secured object (such as a file or folder, or a registry key) to someone else &amp;ndash; you can only take ownership for yourself or a group you&amp;rsquo;re a member of. If you&amp;rsquo;re unprivileged you can only take ownership if the Discretionary Access Control List (ACL) gives you permission to take ownership. There is also a privilege &amp;ndash; SE_TAKE_OWNERSHIP_NAME &amp;ndash; which allows you to take ownership even if you&amp;rsquo;re not permitted in the ACL. This privilege is normally and by default only assigned to the Administrators group.&lt;/p&gt;&lt;p&gt;This ability to take ownership is in marked contrast to Unix where administrators can set ownership, but users cannot take it.&lt;/p&gt;&lt;p&gt;But what if you want to set ownership to a different user? If you try to execute this without any additional privileges, under I think any security principal, you&amp;rsquo;ll get an error. If you (like me) were using ADsSecurityUtility, it&amp;rsquo;ll be encapsulated in an HRESULT, code -2147023589 (0x8007051b). Anyone familiar with HRESULTs will recognise the 0x8007 high word as representing SEVERITY_ERROR | FACILITY_WIN32, i.e. a Win32 error code encoded as an HRESULT, so we can look up 0x51b = 1307 in WinError.h which is ERROR_INVALID_OWNER, &amp;ldquo;This security ID may not be assigned as the owner of this object.&amp;rdquo;&lt;/p&gt;&lt;p&gt;Looking this error code up in a search engine reveals the problem, that other people have had this problem before, and the fix. If you have the SE_RESTORE_NAME privilege enabled you&amp;rsquo;re permitted to set the owner of a secured object. Which makes sense, really, as you want restored data to have the same owner as it did when it was backed up.&lt;/p&gt;&lt;p&gt;Privileges come in two types &amp;ndash; those which are enabled by default if they are permitted to a user (or a group of which the user is a member), and those which are disabled by default. Of the latter type, some Win32 APIs enable the privileges they require automatically. SE_RESTORE_NAME is not one; you must call AdjustTokenPrivileges to enable the privilege if not already enabled.&lt;/p&gt;&lt;p&gt;By default the Administrators and Backup Operators groups only&amp;nbsp;have the SE_BACKUP_NAME and SE_RESTORE_NAME privileges. You can modify this and other privileges through Group Policy &amp;ndash; for your own machine use the Local Security Policy shortcut in Administrative Tools. It&amp;rsquo;s really not recommended to modify these settings unless you&amp;rsquo;re absolutely certain you know what you&amp;rsquo;re doing. If you must, see under Security Settings &amp;gt; Local Policies &amp;gt; User Rights Assignment.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-110955328786472347?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/110955328786472347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=110955328786472347' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/110955328786472347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/110955328786472347'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/02/how-to-set-owner-of-object-in-windows.html' title='How to set the owner of an object in Windows XP'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-110770753020504233</id><published>2005-02-06T16:32:00.000Z</published><updated>2005-02-06T16:32:10.206Z</updated><title type='text'>What a lovely birthday present</title><content type='html'>&lt;p&gt;To whoever broke my driver&amp;rsquo;s door mirror, and didn&amp;rsquo;t leave a note:&lt;/p&gt;&lt;p&gt;Thanks for the wonderful birthday present. No, really. NOT!&lt;/p&gt;&lt;p&gt;I&amp;rsquo;m more annoyed because this time it&amp;rsquo;s not my fault.&lt;/p&gt;&lt;p&gt;My theory is that someone was going too fast down my road and got a bit close. It&amp;rsquo;s not as if they wouldn&amp;rsquo;t notice: the actual &lt;em&gt;mirror&lt;/em&gt; is fine &amp;ndash; still reflects the road behind me. It&amp;rsquo;s the fact that the only thing now holding it onto the &lt;em&gt;car&lt;/em&gt; is a single clip on the facing plate &amp;ndash; oh, and about two feet of gaffer tape. When I found it this morning it was basically hanging on by the three springs used to adjust the position. It might be possible to superglue it but I&amp;rsquo;ll try that at work tomorrow &amp;ndash; I&amp;rsquo;m not standing out in the road doing it now. In future I&amp;rsquo;ll have to remember to tuck the mirrors in when I leave it. No-one else in the road seems to.&lt;/p&gt;&lt;p&gt;Part of the problem is that the end of&amp;nbsp;what seems a&amp;nbsp;fairly major road, just before it turns into the very major road, is in fact a bus lane &amp;ndash;&amp;nbsp;for all of about 50m &amp;ndash;&amp;nbsp;and is closed off to regular traffic, and the only warning of this is the sign a couple of metres before telling people to turn into my road. As a result this road is much busier than it should be.&lt;/p&gt;&lt;p&gt;(I&amp;rsquo;m 27.)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-110770753020504233?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/110770753020504233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=110770753020504233' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/110770753020504233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/110770753020504233'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/02/what-lovely-birthday-present.html' title='What a lovely birthday present'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-110694738689921468</id><published>2005-01-28T21:23:00.000Z</published><updated>2005-01-28T21:23:06.900Z</updated><title type='text'>New Location</title><content type='html'>&lt;p&gt;Not for the blog, for me &lt;img src="http://www.dimmick.demon.co.uk/blog/smile3.gif"&gt;&lt;/p&gt;&lt;p&gt;After three and a half years living with my parents after graduation, I finally have my own flat. Well, I say my own - I'm renting. I could just barely afford to buy something around here, but only by completely bankrupting myself. It's furnished so I don't have that to worry about.&lt;/p&gt;&lt;p&gt;So far going OK but I'm back on the old modem again - my ADSL won't be connected until next Friday. I'd forgotten how &lt;em&gt;slow&lt;/em&gt; this is! Actually I'm getting better connection speeds than ever before with a modem (got 52kbps yesterday) but it's still terrible.&lt;/p&gt;&lt;p&gt;I would have ordered the DSL before moving, but for some reason best known to themselves, BT decided to give me a different number from the previous occupants', which didn't appear in the DSL providers' databases until Tuesday.&lt;/p&gt;&lt;p&gt;Like most things in my life, I prevaricated for ages then sorted itself out pretty quickly. I was fairly happy living with my parents until recently. I think the trip to Seattle and environs in September, followed by a certain amount of independent living when my parents or my sister were away (pet-sitting in the latter case), plus a few weeks off before Christmas, reminded me a) that I could live independently and b) that I actually wanted to - I was going a little stir-crazy over Christmas.&lt;/p&gt;&lt;p&gt;It helped that I knew this flat was going to become free. The couple who lived here before are good friends of mine - indeed, it was their wedding I attended in Toppenish, WA back in September. I've known David since secondary school. He's now gone out to Bangladesh for Ph.D. fieldwork. By taking over the flat (new tenancy) I've saved myself the hassle of finding a place, the landlady's found a tenant easily, and we've both saved agent fees.&lt;/p&gt;&lt;p&gt;A lot of stuff is still in boxes - I only took last Friday off work, before moving in on Saturday - but it's getting unpacked slowly. As and when I can be bothered, mostly!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-110694738689921468?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/110694738689921468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=110694738689921468' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/110694738689921468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/110694738689921468'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/01/new-location.html' title='New Location'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-110694664460306345</id><published>2005-01-28T21:10:00.000Z</published><updated>2005-01-28T21:10:44.603Z</updated><title type='text'>Reported Vulnerabilities in Pocket IE</title><content type='html'>&lt;p&gt;It's not too surprising that &lt;a href="http://www.watchguard.com/RSS/showarticle.aspx?pack=RSS.PocketIE.Flaws"&gt;Pocket IE suffers from some of the same flaws&lt;/a&gt; as the desktop Internet Explorer - it shares a certain amount of the same code.&lt;/p&gt;&lt;p&gt;One 'fix' that has made it into Pocket IE - at least for Windows Mobile 2003 Second Edition - that didn't in the end go into XP SP2 is patent-related. Yup, the Eolas patent workaround - if the page contains any scripted ActiveX controls, it pops up a dialog reading 'Press OK to continue loading this page.' Pretty annoying.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-110694664460306345?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/110694664460306345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=110694664460306345' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/110694664460306345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/110694664460306345'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2005/01/reported-vulnerabilities-in-pocket-ie.html' title='Reported Vulnerabilities in Pocket IE'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-110045427672482966</id><published>2004-11-14T17:44:00.000Z</published><updated>2004-11-14T17:44:36.723Z</updated><title type='text'>I've published myself</title><content type='html'>&lt;p&gt;I got fed up with the mess of time zones on Channel 9's forums, and wrote a C# wrapper class for the registry time zone information and some useful Win32 APIs for converting times between UTC.&lt;/p&gt;&lt;p&gt;As a test application and hopefully something useful, I also wrote a World Clock application. It's basic but I hope functional.&lt;/p&gt;&lt;p&gt;Now I just hope I got the conversion code right!&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.codeproject.com/useritems/WorldClock.asp"&gt;CodeProject article&lt;/a&gt;&amp;nbsp;(may move if it gets edited)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-110045427672482966?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/110045427672482966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=110045427672482966' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/110045427672482966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/110045427672482966'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2004/11/ive-published-myself.html' title='I&apos;ve published myself'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-109996114041166580</id><published>2004-11-09T00:45:00.000Z</published><updated>2004-11-09T00:45:40.410Z</updated><title type='text'>Inappropriate voting technology, part 2</title><content type='html'>&lt;p&gt;There are a number of &lt;a href="http://www.kuro5hin.org/story/2004/11/4/11425/1394"&gt;persistent&lt;/a&gt; &lt;a href="http://ustogether.org/Florida_Election.htm"&gt;claims&lt;/a&gt; that the recorded results for the US presidential election don't actually match the voters' intentions.&lt;/p&gt;&lt;p&gt;What's worrying me is the number of &lt;a href="http://www.dailykos.com/story/2004/11/8/11406/1935"&gt;people&lt;/a&gt;&amp;nbsp;(look at the comments)&amp;nbsp;talking about optical scanning machines. Sorry, but an optical scanning machine is just as open to fraud by its manufacturer or operators as a touch-screen voting machine. The counting needs to be as observable as the casting of the ballots. I can't see any way that a counting machine can be certified honest, on every day of the year, without actually checking the totals before and after scanning and confirming that the correct numbers are indicated, &lt;em&gt;on the actual day of the election&lt;/em&gt;&amp;nbsp;and &lt;em&gt;for every ballot&lt;/em&gt;.&lt;/p&gt;&lt;p&gt;You'll note that this amounts to hand-counting. Why not get rid of the expensive, corruptable machinery, in that case? Use hand-counting alone. As I said last time, it doesn't actually take that long. What's more, the actual counting can be observed - the correct&amp;nbsp;assignation of ballots to candidates can be verified, the correct number of ballots in a pile can be checked (normally ballots are placed in piles of 100 during a UK count), and the number of piles and the remainder can be easily counted. Also, the acceptance or otherwise of a voter's mark can be contested.&lt;/p&gt;&lt;p&gt;If you trust the machinery to give you not only the individual totals, but also the total number of papers counted, you have no true paper trail. You can only verify the results by counting the votes.&lt;/p&gt;&lt;p&gt;I've also seen the &lt;a href="http://www.openvotingconsortium.org/faq.html"&gt;Open Voting Consortium&lt;/a&gt; site. They propose a touch-screen system which produces a paper ballot which can then be machine counted. The touch-screen system does not produce totals, it merely prints a paper ballot with the choices.&lt;/p&gt;&lt;p&gt;Unfortunately it suffers from an even greater flaw than optical-scan - it uses barcodes for the machine counting. There is absolutely no guarantee that the barcode actually contains the&amp;nbsp;choices indicated on the human-readable face of the ballot. There's no guarantee that the barcode reader reports the correct information. There's no guarantee that the totalling machine records the right numbers.&lt;/p&gt;&lt;p&gt;In addition, there's way too much software and hardware to go wrong. Any time a &lt;a href="http://www.jetcafe.org/~npc/doc/ups-faq.html"&gt;UPS&lt;/a&gt;&amp;nbsp;is brought into the discussion, you have to cringe.&lt;/p&gt;&lt;p&gt;My Dad (a 34-year computing industry veteran) pointed out something obvious with even Open Source voting software. There's no guarantee that the code running on the system is in fact compiled from the provided source. There's also no guarantee, as some have already pointed out, that the tools used to compile the source have not been subverted. The &lt;em&gt;only&lt;/em&gt; way you could trust a compiled binary is to validate the &lt;em&gt;object code&lt;/em&gt;. I've unpicked compiled code and believe me, that's not fun. I'm not sure I trust the security credentials of any organisation that states:&lt;/p&gt;&lt;p&gt;"The companies that produce voting machines have poured gasoline onto the smoldering embers of concern.&amp;nbsp; Some of these products are built on Microsoft operating systems - operating systems that have a well earned reputation for being penetrable and insecure."&lt;/p&gt;&lt;p&gt;Yup, it's a bunch of ABMers.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-109996114041166580?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/109996114041166580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=109996114041166580' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/109996114041166580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/109996114041166580'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2004/11/inappropriate-voting-technology-part-2.html' title='Inappropriate voting technology, part 2'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-109910086262985613</id><published>2004-10-30T02:47:00.000+01:00</published><updated>2004-10-30T02:47:42.630+01:00</updated><title type='text'>Inappropriate uses of technology - voting machines</title><content type='html'>&lt;p&gt;I've been reading up on the US presidential election. For better or worse, we (the UK) are&amp;nbsp;now in Iraq and would find it difficult to leave, for humanitarian reasons. For that among many other reasons, it would be good to have a US government we (the people) could get along with. Just a note for Bush supporters - Bush is &lt;em&gt;not&lt;/em&gt; well-liked in the world. We generally do &lt;em&gt;not&lt;/em&gt; want to see him elected. Under his presidency the world's opinion has shifted &lt;em&gt;against&lt;/em&gt; the US. &lt;a href="http://www.pipa.org/OnlineReports/Pres_Election_04/html/new_10_21_04.html"&gt;According to the PIPA poll&lt;/a&gt;, a majority of Bush supporters believe that the world support or are indifferent to the Iraq war, and a majority believe that people in the world would like to see Bush elected. It's not true.&lt;/p&gt;&lt;p&gt;But anyway, this article is about inappropriate use of technology. I'm not going to claim I know about a US election - I've only visited the US once, about a month ago (must write that trip report). From what I've seen through my browsing, it seems as though every locality has its own rules, and a combination of technical means for automated vote counting. We all know about the 'hanging chads' of the 2000 election, where punched cards were used to indicate the candidate voted for. I understand some locations have mechanical 'voting machines' where the voter sets levers according to the candidates they want to vote for, then pulls a big lever to increment the totals. Other places use optical mark readers, where the voter fills in a bubble or &lt;a href="http://www-personal.umich.edu/~mlafler/ballot.jpg"&gt;completes an arrow&lt;/a&gt;&amp;nbsp;(JPEG, 1.6MB - seen on &lt;a href="http://broken.typepad.com/"&gt;This Is Broken&lt;/a&gt;, note that the counting machine only counts the arrow even though the presidential arrows are misplaced!) It seems very few places do it the British way, and you have to vote in all elections at the same time with a whacking great ballot paper.&lt;/p&gt;&lt;p&gt;The British way is very different. For a start, we have no elections for boards of education or drain commissioner. We simply elect a local council. I live in &lt;a href="http://en.wikipedia.org/wiki/Reading%2C_England"&gt;Reading&lt;/a&gt;, which is a unitary authority, so there's only one local council - no county council, and no parish council. We also have a &lt;a href="http://en.wikipedia.org/wiki/Parliamentary_system"&gt;Parliamentary System&lt;/a&gt;&amp;nbsp;- the head of government is (by convention) the leader of the largest (group of) parties - so no election for President, only for your local MP. We hold a local government election three out of every four years (back when Berkshire County Council existed, the fourth year was the county council election) and a general election whenever the Prime Minister feels like it. There's a mandatory five-year limit on a sitting Parliament (House of Commons, in fact, there is no democratic election to the House of Lords) but a Prime Minister can call it earlier. Normally they're every four years - waiting until the last possible moment, as John Major did in 1997, is a sign of weakness (which was duly punished). All of these elections are currently first-past-the-post systems.&lt;/p&gt;&lt;p&gt;Finally, every four years there are European Parliament elections. These are based on much larger multi-member constituencies and have proportional representation with the &lt;a href="http://en.wikipedia.org/wiki/D%27Hondt_method"&gt;D'Hondt method&lt;/a&gt;&amp;nbsp;on party slates - you vote for a party, the party decides what order their members will be elected in (a &lt;a href="http://en.wikipedia.org/wiki/Closed_list"&gt;closed list&lt;/a&gt;).&lt;/p&gt;&lt;p&gt;The tradition in Britain is that voting is performed by marking a cross on a ballot paper in the box alongside the candidate (or party for European elections) you want to vote for, you then place the paper, folded once,&amp;nbsp;in the ballot box. At the close of polls, the boxes are opened under the scrutiny of officials from each party, the returning officer (responsible for declaring the result, usually the &lt;a href="http://en.wikipedia.org/wiki/Mayors_in_the_United_Kingdom"&gt;Mayor&lt;/a&gt;&amp;nbsp;[largely a ceremonial post for most UK boroughs, although chairing full council meetings]) and local government officers. The ballots are counted &lt;em&gt;by hand&lt;/em&gt;, traditionally by bank tellers but they're a dying breed. Votes may be recounted upon request at the discretion of the Returning Officer. If there's a tie, the result is decided by drawing lots.&lt;/p&gt;&lt;p&gt;This year the local election was particularly odd here, because Reading's ward boundaries had been redrawn, and therefore all seats were up for re-election. There are now 15 three-member wards and one one-member ward; I don't live there so I could vote for up to three candidates on the same ballot paper. Interestingly two of the wards split two-to-one between two parties - either some voters had mixed minds or were not aware they could vote for more than one candidate. The European election was held concurrently. The candidates are indicated by their names, their party symbols (if they choose to use one) and the full name of their party affiliation. The European ballot showed the party name primarily but also the ten or so candidates from each party - that was a &lt;em&gt;long&lt;/em&gt; ballot paper.&lt;/p&gt;&lt;p&gt;Given the complicated counting required this year, the counts took place the day after the election. Well, normally each election's ballots can be formed into piles for each candidate and a pile for spoiled ballots, then the piles can be counted, as there's a maximum of one cross on each unspoiled ballot. This could be done with the European election but was complicated by the large constituencies and the vote distribution arithmetic. The locals required each ballot to be counted up to three times, not a simple task, although I think they started by dividing the votes into piles of three-Labour, three-Conservative, three-Liberal Democrat and Other, which reduces the complexity quite a bit.&lt;/p&gt;&lt;p&gt;The way the local election worked out, by the way, was that the candidate with most votes has greatest seniority (the seat becoming up for election in four years), then the next for election in three years, and the final one in two years.&lt;/p&gt;&lt;p&gt;General Election ballots&amp;nbsp;can be counted pretty quickly this way; the fastest in 2001 was &lt;a href="http://news.bbc.co.uk/hi/english/static/vote2001/results_constituencies/constituencies/558.stm"&gt;Sunderland South&lt;/a&gt; in &lt;strong&gt;44 minutes&lt;/strong&gt;. Their task was obviously simplified by the fact they were counting how large the Labour victory would be. The small parties and independents care that their votes are counted fairly accurately - it could mean that they will lose their deposit. In one of the oddities of standing for Parliament, a candidate must pay a Â£500 deposit. If they win 5% or more of the vote, the deposit is returned. Otherwise the government keeps it. If the intent is to reduce the number of crackpot candidates, it's a failure - by-elections (elections outside the normal polling schedule) often have 20 candidates or more.&lt;/p&gt;&lt;p&gt;It seems to me that the US use of technology in elections runs&amp;nbsp;a much stronger risk of tampering, incorrect recording of voter intent and inability to challenge results, with the benefits being solely in the cost of running the election and minor improvements in speed of result collation.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-109910086262985613?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/109910086262985613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=109910086262985613' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/109910086262985613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/109910086262985613'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2004/10/inappropriate-uses-of-technology.html' title='Inappropriate uses of technology - voting machines'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6142486.post-109779782064890685</id><published>2004-10-15T00:50:00.000+01:00</published><updated>2004-10-15T00:50:20.646+01:00</updated><title type='text'>Halo 2 leak</title><content type='html'>&lt;p&gt;&lt;a href="http://www.bungie.net/News/Story.aspx?link=CABA3088-9E1B-49A3-A74D-77A67E324180"&gt;Halo 2 Piracy&lt;/a&gt; (&lt;a href="http://www.bungie.net/"&gt;bungie.net&lt;/a&gt;)&lt;/p&gt;&lt;p&gt;I haven't gone looking for it. If you see a link, please report it.&lt;/p&gt;&lt;p&gt;Microsoft generally have a problem with leaked versions. I remember seeing leaked Windows 2000 betas (and I think even RTM) when I was at University. My suspicion is that it's not anyone at Microsoft leaking, but someone at the CD/DVD mastering houses. No evidence, just supposition.&lt;/p&gt;&lt;p&gt;I think you'd have to have hacked/modded your Xbox in order to play this, though, since a genuine&amp;nbsp;Xbox disc is dual layer, and it's pretty expensive to obtain a dual-layer burner (if a dual-layer DVD-R would even be Xbox compatible).&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6142486-109779782064890685?l=mikedimmick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mikedimmick.blogspot.com/feeds/109779782064890685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6142486&amp;postID=109779782064890685' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/109779782064890685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6142486/posts/default/109779782064890685'/><link rel='alternate' type='text/html' href='http://mikedimmick.blogspot.com/2004/10/halo-2-leak.html' title='Halo 2 leak'/><author><name>Mike Dimmick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://www.dimmick.demon.co.uk/blog/Me_20Avatar.jpg'/></author><thr:total>2</thr:total></entry></feed>
