Sunday, June 17, 2007

SSMS and win32k.sys Blue Screen

I recently came across each user’s nightmare. The Blue Screen Of Death (aka BSOD). The BSOD occurred while I was trying to open a table in SQL Server Management Studio (aka SSMS) which was installed with my brand new SQL Server 2005.
The symptoms where not that clear because the blue screen would appear either when SSMS was trying to open the table and some other times SSMS would open the table (I was lucky enough to see the actual contents of the table) and while I was editing the cell values, the Blue screen would appear showing the following error:
*** STOP: 0x0000008E (0xc0000005,0xbf8E270C,0A8E11868,0x00000000)
*** win32k.sys - Address BF8E270C base at BF800000
The error was the same in each case. Searching around the net I found a few references to this BSOD but the following SQLServer feedback had actually a few workarounds:
No one suggested why this could be happening although there are some things in common:
  1. In each and every reference I found, this screen would appear in a laptop with intel dual core
  2. Most of these laptops had intellipoint 6.1 or later driver for their mice.
The suggested workarounds were:
  1. Turn off multiple CPU core's in BIOS: which would be an unacceptable option for me. Why buy a dual core if I am going to use it as a single core!!!
  2. Disabling hardware acceleration in the advanced display properties : I did actually try this but when no hardware acceleration is active, many programs wont run and everything gets a little bit slower
  3. Disabling or uninstalling IntelliPoint 6.1 Software (also listed in the following url : This actually did the trick for me.
So after uninstalling the IntelliPoint 6.1 Software and installing the IntelliPoint 5.2 instead, the blue screens disappeared.

I hope some one might find this useful cause I was starting to believe that I will never again be able to edit the contents of my tables from SSMS...

Wednesday, June 13, 2007

Silverlight with Visual Studio .NET 2005 and

I just got back from Budapest's Remix 2007. It was an awesome conference where I got amazed by the new Silverlight 1.1 possibilities. Thus the first thing I did was to try build a simple ‘Hello world’ application using First of all, although the guys in Microsoft have Silverlight support in visual studio Orcas, there is no integration (at least as far as I know) with vs 2k5. Looking around on the net, I found a tip given by Scott Louvau to Bryant Likes on how to create a silverlight c# application with vs2k5.
Well, in VS2005 you can create a class library which will build against the Silverlight runtime, but it's a little work.
  1. Create a Class Library/
  2. Remove all references from it.
  3. Right-click on the Project and pick Properties.
  4. On the Build tab, click Advanced and check 'Do not reference mscorlib.dll'
  5. Manually add references to mscorlib, agclr, System,System.Core, System.Silverlight, and System.Xml.Core from the Silverlight install folder (\Program Files\Microsoft Silverlight\)

At this point your build outputs should be Silverlight consumable binaries. It looks
like the equivalent command line call to csc.exe (the C# compiler) should include the references to the mentioned binaries and the /nostdlib option but may require others as well.

The above mentioned solution could not be implemented on a VB project because there was no way I could tell the vb compiler to not reference mscorlib.dll as the compiler requires the Microsoft.VisualBasic.dll which refers to system.dll and finally we get a reference to mscorlib.dll. Thus I had to find a workaround for this…

The idea was to trick visual studio and use the silverlight framework instead of the normal .net 2.0. So I created a class library project based on the .NET Compact Framework 2.0 for Windows CE 5.0. Thus I got the compiler looking for the framework in the following path: "C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE\"

Since I am not currently developing any windows CE application I simply replaced the contents of that path with the ones from the silverlight framework (located at "C:\Program Files\Microsoft Silverlight\").

So, we have tricked the compiler to not use the regular .net framework. From now on the things are quite straight forward.

  1. Create a Class Library.

  2. Remove all references from it.

  3. Manually add references to mscorlib, agclr, System, System.Core, System.Silverlight, and System.Xml.Core from the Silverlight install folder (\Program Files\Microsoft Silverlight\)

Done. Create your xaml, html and js files and you are ready to experience the silverlight experience through visual studio 2005 and :)

Bryant Likes offers a c# example of the Hello world application on his blog .

Thus I converted the above example in to the following hello world example: