Shawn Cicoria - CedarLogic

Perspectives and Observations on Technology

Recent Posts

Sponsors

Tags

General





Community

Email Notifications

Blogs I Read

Archives

Other

Use OpenDNS

November 2006 - Posts

GDI+ Memory Leaks - When Dispose is not enough.

The CPU temperature monitor has been updated. 

http://www.cicoria.com/cs1/blogs/cedarlogic/archive/2006/11/29/404.aspx

I was seeing GDI exceptions and tracked it down to just not releasing GDI handles.

So, dispose is not enough.  Need to call DestroyIcon to ensure that any unused icons are actually destroyed.  I had a Dispose() being called on the Icon object, but it wasn't enough.  So, I put a little "swap" out the old and then call DestroyIcon in the Icon Handle.  That seems to solve it.  The GDI objects in Task manager are now constant and run around 50 or so with small variations.

The following is the PInvoke signature.

[System.Runtime.InteropServices.DllImport( "User32.dll" )]
private static extern int DestroyIcon( System.IntPtr hIcon );

I attempted to leverage some Code Profilers (ANTS and SciTech); the first didn't help.  SciTech might have been able to but I just couldn't get it running on Vista with VS 2005 etc.  So, went down the old comment out and watch path to see which code path was causing the issues.

Creating your own WorkflowLoaderService - and Why!

Jon Flanders has a nice post on why and how to create a simple workflow loader service....

http://www.masteringbiztalk.com/blogs/jon/PermaLink,guid,ffd20921-fb8b-42a2-98d1-8c8e1582a3fa.aspx

Workflow Designer in Javascript.

This example, as stated, is not the designer re-hosted.  It's a JS implementation.  Nonetheless cool

http://blogs.msdn.com/ghenap/archive/2006/10/25/netfxlive-js-based-workflow-designer.aspx

http://www.netfxlive.com/

Hibernate Command for Vista

With Vista, all efforts have been made that when you want to shutdown, the UX pushes you to a sleep state (S3).  That's evident by the single power button on the start menu that is wired to S3.

However, I'm a Hibernate kind of user.  I prefer to Hibernate whenever possible.

With the command line shutdown.exe command, they've added a new switch (along with a bunch of others) that allows a simple command to hibernate.

So, I've added to my desktop & quick launch a shortcut to the following command line:

shutdown /h

This puts the system into Hibernate with no questions asked.  No UAC, nothing.

Michael Crichton's Next - Viral marketing site.

Here's the associated site for Michael Crichton's new book Next.

http://www.nextgencode.com/

I've read just about every Michael Crichton book and been hooked on his writing since I first saw the Andromeda Strain back in the 70's.

His books have always weaved science into the fiction to make it believable and convincing. Always grabbing current science topics to make the plot ever more interesting and it's usually difficult to detect the real from the fiction.

My brother Ed, once told me a story, perhaps a tall tale, that his first wife lived in the same building with Michael Crichton and he had given her one of the Key's used in the Andromeda Strain film that was required to shut down the nuclear self destruct for the facility.  Not sure if that was a tall tale or not, but it sure had the "that's cool" aspect when your a kid, probably making me a Crichton fan ever since.

Good overview of IIS7 and working with it on Vista for Development, Differences, and some Gotchas.

http://www.code-magazine.com/Article.aspx?quickid=060103

Converting DVD to Files for Zune and Mobile

Tool that captures DVD output to file for later playback...

http://www.pocketdvdwizard.com/

Charting with .NET and NPlot

I'm building a simple utility that monitors CPU/GPU heat on Windows Systems.  Given that there are heat issues running Vista Glass Aero on Toshiba Tecra models (I'm using an M5) I wanted a simple System Tray utility that would monitor it and show status and temperature.  Eventually I'll add some alerting, but just needed something quick.

One feature that I added is showing the historical temperature in a graph.  I was writing something to convert the array of decimals into a line graph until I found NPlot.

NPlot is a small (160K) assembly that provides very nice Charting Capabilities.  It supports .NET 2.0, 1.1 and even mono (in fact it's built on Mono first).

http://netcontrols.org/nplot/wiki/

http://sourceforge.net/projects/nplot/

The heat issues that have been noted are impacting older systems to the point that it's burning out the GPU and ultimately requires a replacement motherboard in Tecra systems (M3, M4, M5, M7 models all seem impacted).

Targetting .NET 1.1 Runtime with Visual Studio 2005

Well, Vista is out. However, no official support for VS.NET 2003. So, what do you do if you need to build projects that target the 1.1 runtime? Well, MSBee is there to help. MSBee is a small tool from Microsoft that allows Visual Studio 2005 projects to target the v1.1 framework.

http://go.microsoft.com/fwlink/?LinkId=59384

http://www.codeplex.com/Wiki/View.aspx?ProjectName=MSBee

PowerShell Analyzer - Great too for building and testing PowerShell scripts....

This tool does the trick with helping you navigate the complex namespaces of PowerShell and getting productivie immediately.

http://www.PowerShellAnalyzer.com/

Motorola Q Wiki
This is cool. A Wiki for the Motorola Q Windows Mobile phone. I'm loving this device.... http://www.motoqwiki.com/