<?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-808872874544054384</id><updated>2011-11-28T15:37:31.077Z</updated><category term='C#'/><category term='NHibernate'/><category term='ADODB'/><category term='C++/CLI'/><category term='MSBuild'/><category term='ActiveX'/><category term='Recordset'/><category term='Scrum'/><category term='Books'/><title type='text'>Colin's Corner</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://colins-corner.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://colins-corner.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Colin</name><uri>http://www.blogger.com/profile/16700062284295437769</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_hGR805fdFIc/SMfkAwTG2vI/AAAAAAAAAAM/K_wxxeR3Pyg/S220/IMG_1318.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-808872874544054384.post-1259142962140660921</id><published>2009-12-08T20:41:00.004Z</published><updated>2009-12-08T20:53:59.027Z</updated><title type='text'>Failed import of TFS 2008 to TFS 2010 Beta 2</title><content type='html'>We're running 2 Team Foundation Servers (TFS), one is our main legacy server (TFS 2008) and one is the new shiny, exciting TFS 2010 Beta 2 with it's go live license. We set up the 2010 one to play with but have become so impressed with it we (OK, I) decided to migrate the contents of the 2008 server into it.&lt;br /&gt;&lt;br /&gt;There is a capability that comes with TFS 2010 called TfsConfig that has a lovely option "import" that should take the contents of the 2008 databases and bring them into the 2010 databases. Type "TfsConfig help import" for the precise syntax.&lt;br /&gt;&lt;br /&gt;I tried this and it failed. During step 8 of 198.&lt;br /&gt;&lt;br /&gt;Fine, I thought, I'll just wait for the RTM version and we'll continue to use 2008 and 2010 in parallel in the meantime. But the failed import had broken by 2008 instance. The TfsVersionControl database in the 2008 SQL Server had gone. After a lot of faffing, I worked out that it was still attached but had been renamed to Tfs_ProjectX where ProjectX was the name of the new Team Project Collection in 2010.&lt;br /&gt;&lt;br /&gt;I detached it and reattached with the correct name. All was looking good, but the TFS 2008 was still completely dead. Turns out that there is a Guid hidden in each of the 2008 databases that tells them which TFS Instance they belong to. Unfortunately the TFS 2010 import attempt had changed the TfsVersionControl databases InstanceId. This meant I was seeing this kind of error in the App Layer event log&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;TF30046: The instance information does not match.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Solution to this is to reset the Instance Id across all of the various databases in the 2008 server. To do this, issue the following command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;“%TFSInstallDir%\Tools\InstanceInfo.exe" stamp /setup /install /rollback /d TFSWorkItemTracking,TFSBuild,TFSVersionControl,TFSIntegration,TfsWarehouse /s &lt;&lt;your new data tier&gt;&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Replacing %TFSInstallDir% with your C:\Program Files\.... where ever you have InstanceInfo.exe, part of TFS install. This command was taken from &lt;a href="http://blogs.msdn.com/buckh/archive/2006/10/17/creating-a-new-server-from-an-old-one-beware-of-the-instanceid.aspx"&gt;this link&lt;/a&gt;. The /rollback needs to be removed once you are happy that this works. Once the non-rolled back command has been issued, then all was well and TFS 2008 was working again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/808872874544054384-1259142962140660921?l=colins-corner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://colins-corner.blogspot.com/feeds/1259142962140660921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=808872874544054384&amp;postID=1259142962140660921' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/1259142962140660921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/1259142962140660921'/><link rel='alternate' type='text/html' href='http://colins-corner.blogspot.com/2009/12/failed-import-of-tfs-2008-to-tfs-2010.html' title='Failed import of TFS 2008 to TFS 2010 Beta 2'/><author><name>Colin</name><uri>http://www.blogger.com/profile/16700062284295437769</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_hGR805fdFIc/SMfkAwTG2vI/AAAAAAAAAAM/K_wxxeR3Pyg/S220/IMG_1318.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-808872874544054384.post-7883409678748238712</id><published>2009-08-10T23:00:00.015+01:00</published><updated>2009-08-10T23:36:46.250+01:00</updated><title type='text'>Caution : Static Events!</title><content type='html'>I have spent quite a lot of time recently tracking down memory leaks in our C++/CLI &amp; C# application. This has meant using a wide variety of tools and generally thinking far too hard! &lt;br /&gt;&lt;br /&gt;The tools we've been using include:&lt;br /&gt;&lt;br /&gt;* &lt;a href="http://msdn.microsoft.com/en-gb/magazine/cc164138.aspx"&gt;SOS &lt;/a&gt;- Son of Strike debugger, used inside WinDBG&lt;br /&gt;* &lt;a href="http://www.stevestechspot.com/SOSEXANewDebuggingExtensionForManagedCode.aspx"&gt;SOSEX &lt;/a&gt;- SOS extensions&lt;br /&gt;* IBM's Purify &amp; Quantify&lt;br /&gt;* &lt;a href="http://glowcode.com/"&gt;GlowCode&lt;/a&gt;&lt;br /&gt;* Excel&lt;br /&gt;* VS Debugger....&lt;br /&gt;&lt;br /&gt;The list goes on and on.&lt;br /&gt;&lt;br /&gt;Special note of thanks to GlowCode who actually provide a tool that can track unmanaged memory leaks in a mixed mode application. In the good old days before .Net, I used Rational (as it was then) Purify to track leaked memory in my C++ applications. It was fairly straight forward to use and between that and its sister product Quantify, I have had many a productive session plugging memory leaks. Since .Net came along, Purify is now all but useless, only tracking managed memory and not showing me where I am leaking unmanaged memory in a mixed application. I've been looking for a tool to do such a job for years and recently came across a link on &lt;a href="http://stackoverflow.com/"&gt;StackOverflow &lt;/a&gt;that pointed to &lt;a href="http://www.mozilla.org/performance/tools.html"&gt;this post&lt;/a&gt; which mentioned GlowCode. Having tried it, I love it. It tells me where I am leaking memory in both managed and native heaps in the same application!&lt;br /&gt;&lt;br /&gt;One of the biggest problems we've had is static events on a static event broker object holding on to large object graphs causing our application to run out of memory. The Event Broker is meant to act as a central point where classes can subscribe to (attach delegates to) events that other parts of the system can raise in blissful ignorance of each other. Everyone knows about the EventBroker but not about the source or sinks of the events. This has worked well for us as is used extensively throughout our application. &lt;br /&gt;&lt;br /&gt;What we hadn't realised (or at least, what we hadn't thought about too hard) is when an object subscribes to a static event, unless it explicitly unsubscribes from it, it will never be garbage collected. This might sound obvious, but most events that are subscribed to are not unsubscribed from explcitly, for example button handlers. When everything goes out of scope and is no longer 'rooted', the GC will collect the whole lot in one go. Unfortunately, this does not happen for static events because the static delegate is a root for the object that has subscribed to it. This means that when the GC trawls through all the heap objects in the thread during the collection, it will find a root for every subscribed object graph, so will never collect them.&lt;br /&gt;&lt;br /&gt;The best tool for finding such leaks (OK, not technically leaks in the C/C++ sense, but pure badness all the same) was the SOS debugger and WinDBG. SOS has the extremely helpful command "!dumpheap -type &lt;span style="font-style:italic;"&gt;fullyQualifiedTypeName&lt;/span&gt;" that will tell you how many objects of the specified type you currently have in memory, where they are (their address) and then using "!gcroot &lt;span style="font-style:italic;"&gt;address&lt;/span&gt;", will tell you what is causing the GC root to them. SOSEX also has the !refs command which does something very similar but in a prettier fashion.&lt;br /&gt;&lt;br /&gt;This lack of collection meant our application was eventually producing OutOfMemoryExceptions! We then discovered the &lt;a href="http://msdn.microsoft.com/en-us/library/system.runtime.memoryfailpoint.aspx"&gt;MemoryFailPoint &lt;/a&gt;class in the BCL (&lt;a href="http://stackoverflow.com/questions/1030811/system-outofmemoryexception"&gt;another StackOverflow&lt;/a&gt; article) and this has allowed us to degrade gracefully, rather than simply corrupt out heap (as an OOM exception is likely to do) and force the application to close. &lt;br /&gt;&lt;br /&gt;The idea behind the MemoryFailPoint is that before you allocate a chunk on memory, you ask whether there is a large enough piece of contiguous memory available on the managed heaps. If there is, then fine, your code carries on as normal, if there isn't then the MemoryFailPoint throws an InsufficientMemoryException exception. The key point is that an OOM will leave your application in an unstable state, whereas an InsufficientMemoryException won't. The trick is being able to estimate how much contiguous memory (in MB) you'll need. You want to do it at a fairly course level, as the performance of the code is decreased, but the up side is that the code protected by a MemoryFailPoint should not thrown an OOM exception.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");&lt;br /&gt;document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-5573771-2");&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/808872874544054384-7883409678748238712?l=colins-corner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://colins-corner.blogspot.com/feeds/7883409678748238712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=808872874544054384&amp;postID=7883409678748238712' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/7883409678748238712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/7883409678748238712'/><link rel='alternate' type='text/html' href='http://colins-corner.blogspot.com/2009/08/caution-static-events.html' title='Caution : Static Events!'/><author><name>Colin</name><uri>http://www.blogger.com/profile/16700062284295437769</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_hGR805fdFIc/SMfkAwTG2vI/AAAAAAAAAAM/K_wxxeR3Pyg/S220/IMG_1318.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-808872874544054384.post-5825121528168612613</id><published>2009-06-22T23:47:00.002+01:00</published><updated>2009-06-22T23:53:59.204+01:00</updated><title type='text'>Gallio &amp; NCover</title><content type='html'>There are a lot of posts around on the internet regarding how to gather coverage data from unit tests running in Gallio. I have spent all evening trying to get them working and have found that some of the command lines that appear to work for everyone else simply don't work for me, specifically they may run the tests but provide no coverage data or, more commonly, simply don't run the tests at all.&lt;br /&gt;&lt;br /&gt;But i have cracked it now, so in order that I don't forget, I'm going to record it here!&lt;br /&gt;&lt;br /&gt;To run the command line "Gallio.Echo.exe" to gather coverage data using NCover 1.5.8 simply use:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Gallio.Echo.exe /r:NCover TestAssembly.dll&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It really is that simple! You may/should be able to do it using NCover.Console.exe and passing in a few parameters, but this is by far the simplest and most reliable way of doing it! You should be able to use the &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;/runner_property:NCoverArguments='TestAssembly.dll'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;to tell NCover which assembly to provide coverage data for, as this command line will include coverage data for your tests and some of the Gallio code as well as the code under test, but I haven't got that bit working yet!&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");&lt;br /&gt;document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-5573771-2");&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/808872874544054384-5825121528168612613?l=colins-corner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://colins-corner.blogspot.com/feeds/5825121528168612613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=808872874544054384&amp;postID=5825121528168612613' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/5825121528168612613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/5825121528168612613'/><link rel='alternate' type='text/html' href='http://colins-corner.blogspot.com/2009/06/gallio-ncover.html' title='Gallio &amp; NCover'/><author><name>Colin</name><uri>http://www.blogger.com/profile/16700062284295437769</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_hGR805fdFIc/SMfkAwTG2vI/AAAAAAAAAAM/K_wxxeR3Pyg/S220/IMG_1318.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-808872874544054384.post-6920825616320478907</id><published>2009-03-03T20:31:00.008Z</published><updated>2009-06-22T23:53:35.915+01:00</updated><title type='text'>InternalsVisibleTo, C++/CLI and as_friend</title><content type='html'>We came across an interesting problem today that had an unexpected answer. The problem we had is we have an assembly we're trying to unit test. The classes we're interested in testing are internal to the assembly but implement public interfaces. We don't want to make them public just for the purposes of testing as this could lead to "accidental" use elsewhere in the code, breaking the encapsulation we're after.&lt;br /&gt;&lt;br /&gt;We know that there is an attribute [InternalsVisibleTo] that we can apply to the assembly under test giving the test assembly permission to see the internal classes. We have done this with C# test assemblies and all is fine, but it wasn't working for our C++/CLI test assembly.&lt;br /&gt;&lt;br /&gt;All of our assemblies are signed, so after an hour checking that all the public key tokens matched, we were stumped. Then after much Googling, we came across the "as_friend" option on the #using directive. This is the magic flag you need in the C++/CLI test assembly to allow it access to the internals of the assembly under test. There is no explaination (that I have found) in the MSDN documentation &lt;span style="font-style:italic;"&gt;why&lt;/span&gt; the C++/CLI test assembly needs this and a C# one doesn't!&lt;br /&gt;&lt;br /&gt;Now, in order to use this option you can't use the standard C++/CLI References mechanism in the project properties dialog as it ain't there. So you need to remove the reference to the assembly under test from there and use&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#using "AssemblyUnderTest.dll" as_friend&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;in the stdafx.h file of the test assembly. This should then fix the issue.&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");&lt;br /&gt;document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-5573771-2");&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/808872874544054384-6920825616320478907?l=colins-corner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://colins-corner.blogspot.com/feeds/6920825616320478907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=808872874544054384&amp;postID=6920825616320478907' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/6920825616320478907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/6920825616320478907'/><link rel='alternate' type='text/html' href='http://colins-corner.blogspot.com/2009/03/internalsvisibleto-ccli-and-asfriend.html' title='InternalsVisibleTo, C++/CLI and as_friend'/><author><name>Colin</name><uri>http://www.blogger.com/profile/16700062284295437769</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_hGR805fdFIc/SMfkAwTG2vI/AAAAAAAAAAM/K_wxxeR3Pyg/S220/IMG_1318.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-808872874544054384.post-4006638295300377949</id><published>2009-01-25T21:24:00.006Z</published><updated>2009-03-03T22:07:06.372Z</updated><title type='text'>Extension Methods in .Net 2.0</title><content type='html'>I was recently reading &lt;a href="http://www.amazon.co.uk/C-Depth-What-master-Master/dp/1933988363/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1224619456&amp;sr=8-1"&gt;C# in Depth&lt;/a&gt; by &lt;a href="http://msmvps.com/blogs/jon_skeet/Default.aspx"&gt;Jon Skeet&lt;/a&gt; and also playing with &lt;a href="http://ayende.com/projects/rhino-mocks.aspx"&gt;Rhino Mocks&lt;/a&gt; by Oren/Ayende and was struck by the power and simplicity of both Extension Methods and also Lambda expressions. These are both C# 3 compile time features which I thought would be very useful to me in my C# 2 application which sounds like a shame. Until that is I came across this blog by &lt;a href="http://www.danielmoth.com/Blog/2007/05/using-extension-methods-in-fx-20.html"&gt;Daniel Moth&lt;/a&gt; who describes how to use Extension Methods in C# 2.0. [Actually, as Jon Skeet has pointed out, I mean using C#3 in a .Net 2.0 assembly, see his comment for a link that explains the difference.]&lt;br /&gt;&lt;br /&gt;Once you realise that both of these features are purely compiler trickery then all you need to do is figure out how to get them to work in .Net 2 assemblies. Daniel describes how to get Extension Methods working, by defining an Attribute that is usually available to the C# compiler when building a .Net 3.0 assembly (ExtensionAttribute). The attribute needs to be defined in the System.Runtime.CompilerServices namespace rather than one of your own.&lt;br /&gt;&lt;br /&gt;This tricks the VS2008 C# compiler into thinking that it is compiling to .Net 3 rather than .Net 2, at least as far as Extension Methods are concerned, so now it is happy for you to add the &lt;span style="font-style:italic;"&gt;this&lt;/span&gt; keyword in the static methods parameter list.&lt;br /&gt;&lt;br /&gt;Next came lambda methods, this is also compiler tricks and simply compiles to .Net 2.0 delegate code underneath. Again you need to get the compiler to think that some things not normally available to it in C# 2 are indeed available. In this case, we need a more extensive Action&lt;&gt; delegate. .Net 2 provies Action&lt;T&gt; that allows for an action on a single class with no return value. For what I wanted, Lambdas, we needed the .Net 3 Action&lt;T1,T2&gt; class. This allows you to call delegates with return types.&lt;br /&gt;This class can be defined in any namespace.&lt;br /&gt;&lt;br /&gt;My reason for wanting these capabilities was to simplify some WinForm validation code we're writing. Imagine we have a ComboBox and want to perform validation everytime the SelectedItem changes. We want to turn the background colour to be Red if there is no selected item, and to green is something in the list has been selected. If we have 3 such combos on a form, we could capture the SelectedItemChanged event for each and perform the set of checks to see if there is a selected item and then colour the backgrounds. &lt;br /&gt;&lt;br /&gt;Or we could use an Extension Method. I now have a ComboBoxExtension class which has the following method signature &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public static void InitialiseValidation(this ComboBox combo, Color defaultColor, Action&lt;ComboBox, bool&gt; rule)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This is an Extension Method on ComboBox (first parameter), defines the default, not selected colour (second parameter) and an arbitary validation rule which returns bool and acts on a ComboBox (third parameter). This means I can write the following code in the WinForm code:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;someCombo.InitialiseValidation(MColourFactory.InvalidColour, c =&gt; c.SelectedItem != null);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This simply means that when the SelectedItem property on someCombo is null, it will colour the combo the InvalidColour from our colour factory (red in this case).&lt;br /&gt;&lt;br /&gt;There are also Extension Methods to add additional rules beyond this first one as well as explicit IsValid methods that use the same rule set. &lt;br /&gt;&lt;br /&gt;All of this runs quite happily in a C#, .Net 2.0 assembly using the VS2008 C# compiler to do it, if you're using VS2005 I suspect you're out of luck!&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");&lt;br /&gt;document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-5573771-2");&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/808872874544054384-4006638295300377949?l=colins-corner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://colins-corner.blogspot.com/feeds/4006638295300377949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=808872874544054384&amp;postID=4006638295300377949' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/4006638295300377949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/4006638295300377949'/><link rel='alternate' type='text/html' href='http://colins-corner.blogspot.com/2009/01/extension-methods-in-net-20.html' title='Extension Methods in .Net 2.0'/><author><name>Colin</name><uri>http://www.blogger.com/profile/16700062284295437769</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_hGR805fdFIc/SMfkAwTG2vI/AAAAAAAAAAM/K_wxxeR3Pyg/S220/IMG_1318.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-808872874544054384.post-8993964066034648440</id><published>2009-01-13T14:47:00.002Z</published><updated>2009-01-13T15:02:01.634Z</updated><title type='text'>Debugging Gallio tests in Visual Studio</title><content type='html'>We use the very useful &lt;a href="http://www.gallio.org"&gt;Gallio&lt;/a&gt; unit testing framework for both our C# and C++/CLI unit tests. We then use &lt;a href="http://www.jetbrains.com/resharper/"&gt;Resharper&lt;/a&gt; to execute the C# tests within Visual Studio [remember to reinstall Gallio &lt;span style="font-style:italic;"&gt;after&lt;/span&gt; you have installed Resharper].&lt;br /&gt;&lt;br /&gt;But ReSharper does not work with C++/CLI so it is more difficult to run the tests within Visual Studio. Obviously the test projects produce XXXTests.dll assemblies which cannot be run directly by selecting the projects to be the "Start Up" project and pressing F5. It is possible to set the debugging properties on the project to use Gallio.Echo.exe to be the program launched by VS when F5 is pressed, passing it the test assembly name as the command line argument. This now allows you to press F5 and see all of your tests run. There are two problems with this, firstly the Command window in which they run closes at the end of the run, making it more difficult to see what passed and failed. Secondly, even though you have asked it to run in the debugger, it won't stop on any breakpoints you have set!&lt;br /&gt;&lt;br /&gt;The way to overcome the first issue, if it is important to you, is to use the logging command line arguments and get it to log to file what has happened.&lt;br /&gt;&lt;br /&gt;The way to overcome the second issue, which is the main reason we want to run our tests in VS to begin with, it to add the following command line argument:&lt;br /&gt;&lt;br /&gt;/r:IsolatedAppDomain&lt;br /&gt;&lt;br /&gt;I have no idea what this does (other than run the test in it's own app domain?), but the upshot of it is that the breakpoints become enabled and you can now debug your tests in VS. I'd have thought having a command line option "/r:EnableDebugging" or similar would be more obvious, even if all it did was set the AppDomain flag internally?&lt;br /&gt;&lt;br /&gt;This also works well for C# projects where you do not have Resharper or TestDriven.Net.&lt;br /&gt;&lt;br /&gt;Example command line:&lt;br /&gt;&lt;br /&gt;"C:\Program Files\Gallio\bin\Gallio.Echo.exe" SomeUnitTests.dll /r:IsolatedAppDomain&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");&lt;br /&gt;document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-5573771-2");&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/808872874544054384-8993964066034648440?l=colins-corner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://colins-corner.blogspot.com/feeds/8993964066034648440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=808872874544054384&amp;postID=8993964066034648440' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/8993964066034648440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/8993964066034648440'/><link rel='alternate' type='text/html' href='http://colins-corner.blogspot.com/2009/01/debugging-gallio-tests-in-visual-studio.html' title='Debugging Gallio tests in Visual Studio'/><author><name>Colin</name><uri>http://www.blogger.com/profile/16700062284295437769</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_hGR805fdFIc/SMfkAwTG2vI/AAAAAAAAAAM/K_wxxeR3Pyg/S220/IMG_1318.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-808872874544054384.post-8010457638717455797</id><published>2009-01-11T20:50:00.004Z</published><updated>2009-01-11T20:55:27.822Z</updated><title type='text'>GPS at Airports</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hGR805fdFIc/SWpcu65SXVI/AAAAAAAAADE/BoHfB0HwE_M/s1600-h/Untitled.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 161px;" src="http://2.bp.blogspot.com/_hGR805fdFIc/SWpcu65SXVI/AAAAAAAAADE/BoHfB0HwE_M/s320/Untitled.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5290142673453342034" /&gt;&lt;/a&gt;&lt;br /&gt;During a recent visit to the States I flew into Washington Dullas airport. On the way home, it would appear that my Garmin 305 GPS watch became turned on in my bag, as you can see from this image, it seemed to have a fun trip around the airport before being loaded onto the aircraft!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");&lt;br /&gt;document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-5573771-2");&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/808872874544054384-8010457638717455797?l=colins-corner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://colins-corner.blogspot.com/feeds/8010457638717455797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=808872874544054384&amp;postID=8010457638717455797' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/8010457638717455797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/8010457638717455797'/><link rel='alternate' type='text/html' href='http://colins-corner.blogspot.com/2009/01/gps-at-airports.html' title='GPS at Airports'/><author><name>Colin</name><uri>http://www.blogger.com/profile/16700062284295437769</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_hGR805fdFIc/SMfkAwTG2vI/AAAAAAAAAAM/K_wxxeR3Pyg/S220/IMG_1318.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_hGR805fdFIc/SWpcu65SXVI/AAAAAAAAADE/BoHfB0HwE_M/s72-c/Untitled.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-808872874544054384.post-7848401377294238300</id><published>2008-10-21T19:48:00.011+01:00</published><updated>2009-01-11T20:52:38.238Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Books'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Spending time on the train</title><content type='html'>I have been spending a lot of time on the train this week commuting into London for a database training course. During the 2 hours of commuting I have been trying to make productive use of my time by reading on the way in and listening to podcasts on the way home (when my brain is too fried to read!).&lt;br /&gt;&lt;br /&gt;One of the &lt;a href="http://www.dotnetrocks.com/"&gt;.Net Rocks&lt;/a&gt; podcasts (episode 232) suggests blogging about some of the technical books you've read and trying to explain why they were of value to you so it might encourage others to read them too. So here goes:&lt;br /&gt;&lt;br /&gt;Currently reading (i.e. on the train) : &lt;a href="http://www.amazon.co.uk/C-Depth-What-master-Master/dp/1933988363/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1224619456&amp;amp;sr=8-1"&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.amazon.co.uk/C-Depth-What-master-Master/dp/1933988363/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1224619456&amp;amp;sr=8-1"&gt;C# in Depth&lt;/a&gt; by &lt;a href="http://msmvps.com/blogs/jon_skeet/Default.aspx"&gt;Jon Skeet&lt;/a&gt;. Bought it after hearing his DNR appearance (episode 383) and was intrigued to find a book that explains the detailed how and why of C#, not just the simple get stuff working level material. He really concentrates on the details of the language and how it has evolved through its three major versions.&lt;br /&gt;&lt;br /&gt;I have only read the first couple of chapters (lots to absorb and think about as I read), but have already learnt some interesting things about the language such as:&lt;ul&gt;&lt;li&gt;More about nullable types and that there is a &lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;null-&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 51); line-height: 15px; "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;coalescing &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;operator&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;?? used to detect nullness and return a default value instead&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;INullable&lt;int&gt;&lt;int&gt; i = null;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;int j = i ?? 10;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;i = 5;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;int k = i;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;At the end of this, j = 10 and k = 5.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;I have also learnt a lot about generics. I knew enough to be dangerous when using the System.Collections.Generic namespace before, but now I feel I could write a genric class with mulitple where statements.&lt;/li&gt;&lt;li&gt;I have also learnt (much to my surprise) that C# does not "pass everything by reference" - I'll let you read the book to see why!&lt;/li&gt;&lt;/ul&gt;This book fills the whole on my shelf that "Effective C#" would fill if I owned a copy. The Scott Meyers [More] Effective C++ books were two of the most important books I read when I was learning C++ in the days before Google. I am hoping this book will fill in some of the "hard-core" details of C# in the same kind of vain. I spend so much of my life with the C# compiler, it helps to know what it is doing on my behalf (and what it could do if only I knew how to ask!)&lt;br /&gt;&lt;br /&gt;I have also recently read (last year or so) :-&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.amazon.co.uk/Agile-Software-Development-Cooperative-Game/dp/0321482751/ref=sr_1_2?ie=UTF8&amp;amp;s=books&amp;amp;qid=1224620287&amp;amp;sr=1-2"&gt;Agile Software Development&lt;/a&gt; - Alaistair Cockburn - the book that managed to convince me that there is a reason why Agile software development seems to work. It explains some of the theory as to why people on your team behave the way they do and what can be done to influence them.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.amazon.co.uk/Enterprise-Application-Architecture-Addison-Wesley-signature/dp/0321127420/ref=sr_1_1?ie=UTF8&amp;amp;qid=1224620460&amp;amp;sr=1-1"&gt;Patterns of Enterprise Application Architecture&lt;/a&gt; - Martin Fowler - An extremely useful and interesting book describing a set of commonly used patterns when building larger scale enterprise applications. The big brother to the gang of four patterns which look at design in the small.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.amazon.co.uk/xUnit-Test-Patterns-Refactoring-Signature/dp/0131495054/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1224620543&amp;amp;sr=1-1"&gt;xUnit Test Patterns&lt;/a&gt; - Gerard Meszaros - a very thought provoking book on unit testing and its associated patterns. First third is some interesting theory and then the second part is a set of patterns for unit testing. Very useful book to have around in a team trying hard to adopt TTD.&lt;/int&gt;&lt;/int&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");&lt;br /&gt;document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-5573771-2");&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/808872874544054384-7848401377294238300?l=colins-corner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://colins-corner.blogspot.com/feeds/7848401377294238300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=808872874544054384&amp;postID=7848401377294238300' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/7848401377294238300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/7848401377294238300'/><link rel='alternate' type='text/html' href='http://colins-corner.blogspot.com/2008/10/spending-time-on-train.html' title='Spending time on the train'/><author><name>Colin</name><uri>http://www.blogger.com/profile/16700062284295437769</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_hGR805fdFIc/SMfkAwTG2vI/AAAAAAAAAAM/K_wxxeR3Pyg/S220/IMG_1318.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-808872874544054384.post-1872411514139573769</id><published>2008-10-04T22:37:00.004+01:00</published><updated>2008-10-04T22:41:23.802+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NHibernate'/><title type='text'>Definitive NHibernate Resources</title><content type='html'>At last I have found the definitive source of all things NHibernate, &lt;a href="http://www.nhforge.org"&gt;www.nhforge.org&lt;/a&gt;. Previously I had been using &lt;a href="http://www.hibernate.org/343.html"&gt;www.hibernate.org/343.html&lt;/a&gt; which seems to be a little out of date (latest version info is wrong as an example), but the new NHibernate community forge site seems to be bang up to date and contain a lot of very interesting community generated content.&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");&lt;br /&gt;document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-5573771-2");&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/808872874544054384-1872411514139573769?l=colins-corner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://colins-corner.blogspot.com/feeds/1872411514139573769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=808872874544054384&amp;postID=1872411514139573769' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/1872411514139573769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/1872411514139573769'/><link rel='alternate' type='text/html' href='http://colins-corner.blogspot.com/2008/10/definitive-nhibernate-resources.html' title='Definitive NHibernate Resources'/><author><name>Colin</name><uri>http://www.blogger.com/profile/16700062284295437769</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_hGR805fdFIc/SMfkAwTG2vI/AAAAAAAAAAM/K_wxxeR3Pyg/S220/IMG_1318.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-808872874544054384.post-5473968954913691911</id><published>2008-09-16T17:41:00.005+01:00</published><updated>2008-09-16T17:44:56.513+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActiveX'/><title type='text'>Windowless ActiveX controls are not supported</title><content type='html'>I recently started to see this intriguing exception message from a WinForm application that we write. After much googling, I came across a number of other blog entries suggesting a wide range of issues, none of which helped much. This is code that has worked for years, but had suddenly ceased to do so!&lt;br /&gt;&lt;br /&gt;In the end it turns out that the underlying ActiveX dll had become unregistered on the system, so it was failing the COM initialisation process. An interestingly obscure error message for this condition, but a quick regsvr32 call later and it all worked again!&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");&lt;br /&gt;document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-5573771-2");&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/808872874544054384-5473968954913691911?l=colins-corner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://colins-corner.blogspot.com/feeds/5473968954913691911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=808872874544054384&amp;postID=5473968954913691911' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/5473968954913691911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/5473968954913691911'/><link rel='alternate' type='text/html' href='http://colins-corner.blogspot.com/2008/09/windowless-activex-controls-are-not.html' title='Windowless ActiveX controls are not supported'/><author><name>Colin</name><uri>http://www.blogger.com/profile/16700062284295437769</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_hGR805fdFIc/SMfkAwTG2vI/AAAAAAAAAAM/K_wxxeR3Pyg/S220/IMG_1318.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-808872874544054384.post-8589976078894291279</id><published>2008-09-16T13:58:00.003+01:00</published><updated>2008-09-16T14:00:57.190+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Scrum'/><title type='text'>Certified ScrumMaster</title><content type='html'>I have just completed my Certified ScrumMaster training, provided by Danube, in London. An excellent course taught actually using Scrum as the delivery technique, a very efficient way of learning, i.e. by doing!&lt;br /&gt;&lt;br /&gt;Now looking forward to rolling Scrum out to my team at work and seeing how we improve quality and productivity at the same time!&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");&lt;br /&gt;document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-5573771-2");&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/808872874544054384-8589976078894291279?l=colins-corner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://colins-corner.blogspot.com/feeds/8589976078894291279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=808872874544054384&amp;postID=8589976078894291279' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/8589976078894291279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/8589976078894291279'/><link rel='alternate' type='text/html' href='http://colins-corner.blogspot.com/2008/09/certified-scrummaster.html' title='Certified ScrumMaster'/><author><name>Colin</name><uri>http://www.blogger.com/profile/16700062284295437769</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_hGR805fdFIc/SMfkAwTG2vI/AAAAAAAAAAM/K_wxxeR3Pyg/S220/IMG_1318.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-808872874544054384.post-8582895006810277260</id><published>2008-09-10T15:22:00.003+01:00</published><updated>2008-09-10T15:53:07.334+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MSBuild'/><title type='text'>CS1504 &amp; MSBuild</title><content type='html'>I have just spent half a day trying to reason why VS2008 is happy to build a solution in a particular configuration, but MSBuild 2008 is not prepared to build exactly the same solution in the same configuration!&lt;br /&gt;&lt;br /&gt;First a bit of background, we use a AssemblyInfoCommon.cs file to contain all of the common bits of the assembly information, such as copyright, dates, build numbers etc. This is included into each of our C# projects as a link. It then appears in the VS Solution Explorer and all is well. &lt;br /&gt;&lt;br /&gt;When I was getting this strange error code of CS1504 and complaining of not being able to find the common file in the project folder, I was a little bemused because the file doesn't live there, but in the parent folder. After &lt;span style="font-style:italic;"&gt;much &lt;/span&gt;faffing, I discovered that the project file had been hand edited (&lt;span style="font-style:italic;"&gt;always &lt;/span&gt;a warning sign) and the link to ..\AssemblyInfoCommon.cs was actually ../AssemblyInfoCommon.cs. The incorrect /, rather than \, was the culprit, looks like MSBuild cannot handle it and bails, where as VS2008 just ignores it, so in this case it didn't appear in the solution explorer!&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");&lt;br /&gt;document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-5573771-2");&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/808872874544054384-8582895006810277260?l=colins-corner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://colins-corner.blogspot.com/feeds/8582895006810277260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=808872874544054384&amp;postID=8582895006810277260' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/8582895006810277260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/8582895006810277260'/><link rel='alternate' type='text/html' href='http://colins-corner.blogspot.com/2008/09/cx.html' title='CS1504 &amp; MSBuild'/><author><name>Colin</name><uri>http://www.blogger.com/profile/16700062284295437769</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_hGR805fdFIc/SMfkAwTG2vI/AAAAAAAAAAM/K_wxxeR3Pyg/S220/IMG_1318.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-808872874544054384.post-3870800457102075789</id><published>2008-08-08T13:40:00.004+01:00</published><updated>2008-09-10T15:53:17.463+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++/CLI'/><title type='text'>String to Enumeration</title><content type='html'>This brief post concerns converting the string form of an enumeration back into the enum class version in C++/CLI.&lt;br /&gt;&lt;br /&gt;There are plenty of sites around the internet that tell you how to convert the string form on an enumeration value back into the enum value in C#, but I couldn't find one in C++/CLI. The C# is as follows:&lt;br /&gt;&lt;br /&gt;status.State = (State)Enum.Parse(GetType(State), "State String", &lt;span style="font-style:italic;"&gt;bool ignoreCase&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;The C++/CLI equivalent is &lt;br /&gt;&lt;br /&gt;status-&gt;State = (States)Enum::Parse(States::typeid, gcnew String(cacheItem-&gt;state));&lt;br /&gt;&lt;br /&gt;As you can see, cacheItem-&gt;state is a CString, not a System::String, so we need to quickly create a System::String for it.&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");&lt;br /&gt;document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-5573771-2");&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/808872874544054384-3870800457102075789?l=colins-corner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://colins-corner.blogspot.com/feeds/3870800457102075789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=808872874544054384&amp;postID=3870800457102075789' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/3870800457102075789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/3870800457102075789'/><link rel='alternate' type='text/html' href='http://colins-corner.blogspot.com/2008/08/string-to-enumeration.html' title='String to Enumeration'/><author><name>Colin</name><uri>http://www.blogger.com/profile/16700062284295437769</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_hGR805fdFIc/SMfkAwTG2vI/AAAAAAAAAAM/K_wxxeR3Pyg/S220/IMG_1318.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-808872874544054384.post-599778668931513362</id><published>2008-08-07T19:43:00.018+01:00</published><updated>2008-09-10T15:53:32.355+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++/CLI'/><category scheme='http://www.blogger.com/atom/ns#' term='Recordset'/><category scheme='http://www.blogger.com/atom/ns#' term='ADODB'/><title type='text'>Logging ADODB Recordsets</title><content type='html'>The first real post on my blog is the solution to a problem I have had recently. We use ADO (not ADO.Net) recordsets to communicate with our database (Access, yes sorry I know).&lt;br /&gt;&lt;br /&gt;These recordsets are generated from the database tables, populated in memory by the software and then we use&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;recordset-&gt;UpdateBatch(ADODB::adAffectAll);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to push the changes back to Access.&lt;br /&gt;&lt;br /&gt;We have been having problems with this and getting the very helpful "External component has thrown an exception" error.&lt;br /&gt;&lt;br /&gt;Given that the VS debugger can't debug into the COM recordsets, it is not simple to find out what the recordset contains. The solution we settled on is to dump the contents of the recordset to the Output window using the System::Diagnostics::Trace class.&lt;br /&gt;&lt;br /&gt;Compared to a similar operation using an ADO dataset, it is rather tedious to write out the contents of any recordset, rather than coding for a specific one.&lt;br /&gt;&lt;br /&gt;The following code extract shows how we achived it. This code first checks to see if there are any rows in the recordset, then gets the FieldsPtr for the recordset and iterates through each field, getting the name of each.&lt;br /&gt;&lt;br /&gt;Once this has been done, we reset the cursor back to the first row and get each field in the row. The values in the "cells" of the recordset are the good old OleVariants,so you need to determine which of the various variant type the field is, then convert it to something that .Net understands.&lt;br /&gt;&lt;br /&gt;Finally, I have used the "|" character to separate the fields and "#" to end each line, just to be sure!&lt;br /&gt;&lt;!--&lt;br /&gt;{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;??\red0\green0\blue0;\red255\green255\blue255;\red0\green0\blue255;\red163\green21\blue21;}??\fs20 aRecordset-&amp;gt;MoveFirst();\par ??\tab FieldPtr pField;\par ??\tab \par ??\tab \par ??\tab FieldsPtr pFields = aRecordset-&amp;gt;GetFields();\par ??\tab \cf3 long\cf0  numberOfColumns = pFields-&amp;gt;GetCount();\par ??\tab System::Diagnostics::Trace::WriteLine(\cf4 "Number of columns in set: "\cf0  + numberOfColumns + \cf4 ";"\cf0 );\par ??\tab System::Diagnostics::Trace::WriteLine(\cf4 "Number of records in set: "\cf0  + aRecordset-&amp;gt;GetRecordCount() + \cf4 ";"\cf0 );\par ??\par ??\tab \cf3 if\cf0  (aRecordset-&amp;gt;GetRecordCount() &amp;gt; 0)\par ??\tab \{\par ??\tab \tab \cf3 for\cf0 (\cf3 int\cf0  i = 0 ; i &amp;lt; numberOfColumns; i++)\par ??\tab \tab \{\par ??\tab \tab \tab variant_t index;\par ??\tab \tab \tab index.intVal = i;\par ??\tab \tab \tab index.vt = VT_I4;\par ??\tab \tab \tab pFields-&amp;gt;get_Item(index, &amp;amp;pField);\par ??\tab \tab \tab BSTR bstr = pField-&amp;gt;GetName();\par ??\tab \tab \tab System::Diagnostics::Trace::Write(\cf3 gcnew\cf0  String(bstr));\par ??\tab \tab \tab System::Diagnostics::Trace::Write(\cf4 "|"\cf0 );\par ??\tab \tab \}\par ??\tab \tab System::Diagnostics::Trace::WriteLine(\cf4 ""\cf0 );\par ??\tab \tab \par ??\tab \tab aRecordset-&amp;gt;MoveFirst();\par ??\par ??\tab \tab \cf3 while\cf0 (!aRecordset-&amp;gt;adoEOF)\par ??\tab \tab \{\par ??\par ??\tab \tab \tab \cf3 for\cf0 (\cf3 int\cf0  count = 1; count &amp;lt; numberOfColumns; count++)\par ??\tab \tab \tab \{\par ??\tab \tab \tab \tab variant_t index;\par ??\tab \tab \tab \tab index.intVal = count;\par ??\tab \tab \tab \tab index.vt = VT_I4;\par ??\tab \tab \tab \tab pFields-&amp;gt;get_Item(index, &amp;amp;pField);\par ??\tab \tab \tab \tab variant_t var = pField-&amp;gt;GetValue();\par ??\par ??\tab \tab \tab \tab \cf3 if\cf0  (var.vt == VT_R8)\par ??\tab \tab \tab \tab \{\par ??\tab \tab \tab \tab \tab System::Diagnostics::Trace::Write(var.dblVal);\par ??\tab \tab \tab \tab \}\par ??\tab \tab \tab \tab \cf3 else\cf0  \cf3 if\cf0  (var.vt == VT_R4)\par ??\tab \tab \tab \tab \{\par ??\tab \tab \tab \tab \tab System::Diagnostics::Trace::Write(var.fltVal);\par ??\tab \tab \tab \tab \}\par ??\tab \tab \tab \tab \cf3 else\cf0  \cf3 if\cf0  (var.vt == VT_I4)\par ??\tab \tab \tab \tab \{\par ??\tab \tab \tab \tab \tab System::Diagnostics::Trace::Write(var.lVal);\par ??\tab \tab \tab \tab \}\par ??\tab \tab \tab \tab \cf3 else\cf0  \cf3 if\cf0  (var.vt == VT_BSTR)\par ??\tab \tab \tab \tab \{\par ??\tab \tab \tab \tab \tab System::Diagnostics::Trace::Write(\cf3 gcnew\cf0  String(var.bstrVal));\par ??\tab \tab \tab \tab \}\par ??\tab \tab \tab \tab \cf3 else\cf0  \cf3 if\cf0  (var.vt == VT_DATE)\par ??\tab \tab \tab \tab \{\par ??\tab \tab \tab \tab \tab COleDateTime DateInfo(var);\par ??\tab \tab \tab \tab \tab System::Diagnostics::Trace::Write(\cf3 gcnew\cf0  String(DateInfo.Format()));\par ??\tab \tab \tab \tab \}\par ??\tab \tab \tab \tab \cf3 else\cf0  \cf3 if\cf0  (var.vt == VT_NULL)\par ??\tab \tab \tab \tab \{\par ??\tab \tab \tab \tab \tab System::Diagnostics::Trace::Write(\cf4 "NULL"\cf0 );\par ??\tab \tab \tab \tab \}\par ??\tab \tab \tab \tab \cf3 else\cf0  \cf3 if\cf0  (var.vt == VT_BOOL)\par ??\tab \tab \tab \tab \{\par ??\tab \tab \tab \tab \tab \cf3 if\cf0  (var.boolVal == \cf3 true\cf0 )\par ??\tab \tab \tab \tab \tab \{\par ??\tab \tab \tab \tab \tab \tab System::Diagnostics::Trace::Write(\cf4 "true"\cf0 );\par ??\tab \tab \tab \tab \tab \}\par ??\tab \tab \tab \tab \tab \cf3 else\par ??\cf0 \tab \tab \tab \tab \tab \{\par ??\tab \tab \tab \tab \tab \tab System::Diagnostics::Trace::Write(\cf4 "false"\cf0 );\par ??\tab \tab \tab \tab \tab \}\par ??\tab \tab \tab \tab \}\par ??\tab \tab \tab \tab \cf3 else\par ??\cf0 \tab \tab \tab \tab \{\par ??\tab \tab \tab \tab \tab System::Diagnostics::Trace::Write(\cf4 "UKNOWN VALUE TYPE"\cf0 );\par ??\tab \tab \tab \tab \}\par ??\par ??\tab \tab \tab \tab System::Diagnostics::Trace::Write(\cf4 "|"\cf0 );\par ??\tab \tab \tab \}\par ??\tab \tab \tab System::Diagnostics::Trace::WriteLine(\cf4 "###"\cf0 );\par ??\par ??\tab \tab \tab aRecordset-&amp;gt;MoveNext();\par ??\tab \tab \}\par ??\tab \}}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;div style="font-family: Courier New; font-size: 10pt; color: black; background: white;"&gt;&lt;p style="margin: 0px;"&gt;aRecordset-&amp;gt;MoveFirst();&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FieldPtr pField;&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FieldsPtr pFields = aRecordset-&amp;gt;GetFields();&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;long&lt;/span&gt; numberOfColumns = pFields-&amp;gt;GetCount();&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System::Diagnostics::Trace::WriteLine(&lt;span style="color: #a31515;"&gt;"Number of columns in set: "&lt;/span&gt; + numberOfColumns + &lt;span style="color: #a31515;"&gt;";"&lt;/span&gt;);&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System::Diagnostics::Trace::WriteLine(&lt;span style="color: #a31515;"&gt;"Number of records in set: "&lt;/span&gt; + aRecordset-&amp;gt;GetRecordCount() + &lt;span style="color: #a31515;"&gt;";"&lt;/span&gt;);&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (aRecordset-&amp;gt;GetRecordCount() &amp;gt; 0)&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;for&lt;/span&gt;(&lt;span style="color: blue;"&gt;int&lt;/span&gt; i = 0 ; i &amp;lt; numberOfColumns; i++)&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; variant_t index;&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; index.intVal = i;&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; index.vt = VT_I4;&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; pFields-&amp;gt;get_Item(index, &amp;amp;pField);&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; BSTR bstr = pField-&amp;gt;GetName();&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System::Diagnostics::Trace::Write(&lt;span style="color: blue;"&gt;gcnew&lt;/span&gt; String(bstr));&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System::Diagnostics::Trace::Write(&lt;span style="color: #a31515;"&gt;"|"&lt;/span&gt;);&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System::Diagnostics::Trace::WriteLine(&lt;span style="color: #a31515;"&gt;""&lt;/span&gt;);&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; aRecordset-&amp;gt;MoveFirst();&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;while&lt;/span&gt;(!aRecordset-&amp;gt;adoEOF)&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;for&lt;/span&gt;(&lt;span style="color: blue;"&gt;int&lt;/span&gt; count = 1; count &amp;lt; numberOfColumns; count++)&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; variant_t index;&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; index.intVal = count;&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; index.vt = VT_I4;&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; pFields-&amp;gt;get_Item(index, &amp;amp;pField);&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; variant_t var = pField-&amp;gt;GetValue();&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (var.vt == VT_R8)&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System::Diagnostics::Trace::Write(var.dblVal);&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;else&lt;/span&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (var.vt == VT_R4)&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System::Diagnostics::Trace::Write(var.fltVal);&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;else&lt;/span&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (var.vt == VT_I4)&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System::Diagnostics::Trace::Write(var.lVal);&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;else&lt;/span&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (var.vt == VT_BSTR)&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System::Diagnostics::Trace::Write(&lt;span style="color: blue;"&gt;gcnew&lt;/span&gt; String(var.bstrVal));&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;else&lt;/span&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (var.vt == VT_DATE)&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; COleDateTime DateInfo(var);&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System::Diagnostics::Trace::Write(&lt;span style="color: blue;"&gt;gcnew&lt;/span&gt; String(DateInfo.Format()));&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;else&lt;/span&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (var.vt == VT_NULL)&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System::Diagnostics::Trace::Write(&lt;span style="color: #a31515;"&gt;"NULL"&lt;/span&gt;);&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;else&lt;/span&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (var.vt == VT_BOOL)&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (var.boolVal == &lt;span style="color: blue;"&gt;true&lt;/span&gt;)&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System::Diagnostics::Trace::Write(&lt;span style="color: #a31515;"&gt;"true"&lt;/span&gt;);&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;else&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System::Diagnostics::Trace::Write(&lt;span style="color: #a31515;"&gt;"false"&lt;/span&gt;);&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;else&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System::Diagnostics::Trace::Write(&lt;span style="color: #a31515;"&gt;"UKNOWN VALUE TYPE"&lt;/span&gt;);&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System::Diagnostics::Trace::Write(&lt;span style="color: #a31515;"&gt;"|"&lt;/span&gt;);&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System::Diagnostics::Trace::WriteLine(&lt;span style="color: #a31515;"&gt;"#"&lt;/span&gt;);&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; aRecordset-&amp;gt;MoveNext();&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I'd like to thank Phil for writing the first version of this code :)&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");&lt;br /&gt;document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-5573771-2");&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/808872874544054384-599778668931513362?l=colins-corner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://colins-corner.blogspot.com/feeds/599778668931513362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=808872874544054384&amp;postID=599778668931513362' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/599778668931513362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/599778668931513362'/><link rel='alternate' type='text/html' href='http://colins-corner.blogspot.com/2008/08/logging-adodb-recordsets.html' title='Logging ADODB Recordsets'/><author><name>Colin</name><uri>http://www.blogger.com/profile/16700062284295437769</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_hGR805fdFIc/SMfkAwTG2vI/AAAAAAAAAAM/K_wxxeR3Pyg/S220/IMG_1318.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-808872874544054384.post-7561943529043393589</id><published>2008-08-07T19:36:00.006+01:00</published><updated>2008-09-10T15:53:49.983+01:00</updated><title type='text'>Welcome!</title><content type='html'>Welcome to Colin's Corner, my new blog now that I have decided to join the 21st Century!&lt;br /&gt;&lt;br /&gt;I am professional software developer working mainly with VC++, C++/CLI and C# for .Net 2.0, and just starting to use Spring and NHibernate. Our main product is a older MFC application we have dragged into the .Net age by extensive use of C++/CLI. This has led me to develop a reasonable understanding of some of the more knarly problems involved in working with "mixed" code on Windows.&lt;br /&gt;&lt;br /&gt;This blog is (hopefully) going to be some of the more difficult/interesting tit-bits of knowledge I pick up through my development activities.&lt;br /&gt;&lt;br /&gt;Enjoy and I hope you find it useful!&lt;br /&gt;&lt;br /&gt;Colin&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");&lt;br /&gt;document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-5573771-2");&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/808872874544054384-7561943529043393589?l=colins-corner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://colins-corner.blogspot.com/feeds/7561943529043393589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=808872874544054384&amp;postID=7561943529043393589' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/7561943529043393589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/808872874544054384/posts/default/7561943529043393589'/><link rel='alternate' type='text/html' href='http://colins-corner.blogspot.com/2008/08/welcome-to-colins-corner-my-new-blog.html' title='Welcome!'/><author><name>Colin</name><uri>http://www.blogger.com/profile/16700062284295437769</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_hGR805fdFIc/SMfkAwTG2vI/AAAAAAAAAAM/K_wxxeR3Pyg/S220/IMG_1318.jpg'/></author><thr:total>0</thr:total></entry></feed>
