Monday, August 22, 2005

Wednesday, August 17, 2005

Magic Numbers for Debugging Memory troubles

I got tired of searching for this each time I needed to so here it is -- the magic memory values when using the debug heap in Microsoft Visual C++ 6.0, 2003 and presumably 2005.

Culled from here and here.

0xBAADF00D -- Allocated by HeapAlloc, not yet used by malloc
0xCDCDCDCD -- Allocated but uninitialized
0xFDFDFDFD -- No mans land. Surrounds allocated block
0xABABABAB -- 2 words following allocated block's no mans land
0xDDDDDDDD -- In the process of being freed.
0xFEEEFEEE -- Freed

[Listening to: Kittie - Suck (Live)]

Windows Message Hooking in .NET

You just never know when you have to get down to the metal and observe/tweak/ambush the windows messages directly. Ben Wu
shows us how with SpyWindowFinalizer. This also gives us a means to detect controls that are not being properly Dispose'd.

[Listening to: Tripping Daisy - Piranha]

Monday, August 15, 2005

Xml Performance Checklist

Atsushi Eno gives an Xml perf checklist.

Don't know how valid/relevent these all are but I've blogged it here for future reference.

[Listening to: Crazy Town - Only When I'm Drunk]

Wednesday, August 10, 2005

Rico Mariani's Performance Tidbits : LogDump: CLRProfiler Log analysis tool

Performance guru Rico Mariani shares his CLRProfiler log post-processor which produces a very useful summary of perf stats.. In case you want to bypass the article (lazy lazy) you can jump to the source code directly.

[Listening to: Led Zeppelin - What Is And What Should Never Be]

.Net Security Blog : The Simple Sandboxing API

It's been a while since I've scooped referred to a post by Shawn Farkas, but here goes.
The Simple Sandboxing API - A simpler way to set up a sandboxed AppDomain. In a nutshell he is updating his .NET v1.x method which I blogged about here, using a new .NET v2.0 overload of AppDomain.CreateDomain.

[Listening to: Whitesnake - Give Me All Your Love]

Friday, August 05, 2005

[De]Serialization withToByteArray and ToStructure

More snippets... I love snippets.

From eicar (sorry, don't know his/her actual name)
Home-grown [de]serialization: ToByteArray and ToStructure

[Listening to: Janis Joplin - Piece of my Heart]

Omiting the Xml Declaration and the XSD and XSI namespaces

Scott Hanselman of The Ultimate Tools List fame posts together a useful snippet of code to Serialize an object while omiting the Xml Declaration and the XSD and XSI namespaces -- The XmlFragmentWriter.

This snippet was cobbled together from Sairama, a platform engineer at Corillian and Daniel Cazzulino and, I'm sure, Scott too.

I've always kinda' disliked the extra "baggage" but was waaay too lazy to do anything about it.

[Listening to: Stone Temple Pilots - Where the River Goes]

Thursday, August 04, 2005

Simple harness to print exceptions in an app

A nice little example from Mike Stall on building a
simple harness to print exceptions in an app.

Don't know if this will be useful, but it's definitely something I want to remember. So here it is.

[Listening to: Elastica - Love Like Ours]

101 Samples for Visual Studio 2005

A bunch of samples on MSDN for both C# and VB.NET.

Can't remember who I got this from. My apologies.

[Listening to: Led Zeppelin - Rock and Roll]