Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Notes on Managed Debugging, ICorDebug, and random .NET stuff
Does C# intellisense read you mind?
It's cool that VS has intellisense for C# (the feature where in the middle of typing an expression,...
Author: Mike Stall - MSFT Date: 01/11/2007
You don't want to write an interop debugger.
I've had a growing number of people inquire about how to write an interop-debugger with ICorDebug....
Author: Mike Stall - MSFT Date: 01/10/2007
I've been tagged.
Tess tagged me. This seems like a good excuse to diverge from my consistent policy of work-related...
Author: Mike Stall - MSFT Date: 01/08/2007
Type-safe Managed wrappers for kernel32!GetProcAddress
Pinvoke is cool in managed code, but sometimes you need to get straight at kernel32!GetProcAddress....
Author: Mike Stall - MSFT Date: 01/06/2007
Fake attach event ordering
When you attach to a managed debuggee (via ICorDebug::DebugActiveProcess), ICorDebug generates a set...
Author: Mike Stall - MSFT Date: 12/28/2006
C# app to count #ifdef usage
Here's a little tool I wrote to count #ifdef usage in a project. It provides a summary of the...
Author: Mike Stall - MSFT Date: 12/23/2006
Embed Macros in Help?
Having to meticulously follow detailed instructions is just an accident waiting to happen. Instead...
Author: Mike Stall - MSFT Date: 12/20/2006
Measuring language complexity: Do you need a debugger?
When people are asking for a debugger for language X, practically it means that the usage of...
Author: Mike Stall - MSFT Date: 12/13/2006
Your feedback: How many types do you ref.emit into a module?
I'm looking for feedback about Ref.Emit usage patterns. When using Ref.Emit, how many types do you...
Author: Mike Stall - MSFT Date: 12/08/2006
Interview Tip: Writing test cases
If during a dev interview, you're asked to write a set of test cases for some function you wrote, be...
Author: Mike Stall - MSFT Date: 12/07/2006
What I'm reading now: "C++ Template Metaprogramming"
I'm currently reading "C++ Template Metaprogramming". It's off to a great start. The basic idea (so...
Author: Mike Stall - MSFT Date: 12/05/2006
Patrick Dussud is blogging!
Patrick Dussud, lead architect of the CLR, is blogging (as other CLR members are already pointing...
Author: Mike Stall - MSFT Date: 12/04/2006
Random comments about Sytem.Convert class
The System.Convert class is a neat little class in the BCL (mscorlib) for converting between types....
Author: Mike Stall - MSFT Date: 12/02/2006
Table of Cool .NET Tools
Here are some cool .NET tools from MSDN / codeplex, complete with Download and tutorial links. Tool...
Author: Mike Stall - MSFT Date: 11/29/2006
Marshal opaque structs as IntPtr instead of Byte[]
If you have an opaque native structure that you want to pass through managed code, consider using...
Author: Mike Stall - MSFT Date: 11/29/2006
Creative usage
I picked up a sketchpad and a 64-pack of colored pencils at a local hobby store to do so random...
Author: Mike Stall - MSFT Date: 11/28/2006
AppDomain.ProcessExit is not guaranteed to be called
The AppDomain.ProcessExit is not guaranteed to be called. It's pretty resilient and will deal with...
Author: Mike Stall - MSFT Date: 11/26/2006
Mdbg (C# debugger in C#) source sample updated
We've just updated the MDbg sample! This is a full source sample for building a managed debugger in...
Author: Mike Stall - MSFT Date: 11/22/2006
Thoughts on Vista from a non-computer person
Previously, I installed Vista on my home computer. Here are some comments from my wife. I found her...
Author: Mike Stall - MSFT Date: 11/22/2006
Viewing types with Reflection-Only
It's natural for a tool to use Reflection-Only loading to load an assembly and view the types in it....
Author: Mike Stall - MSFT Date: 11/22/2006
Hit 300 mark
I hit the 300 post mark. (I hit the 200 mark back in Feb). Some days I feel like I'm still going...
Author: Mike Stall - MSFT Date: 11/17/2006
LCG + Debuggability, and your feedback
I mentioned earlier that you can debug Reflection.Emit code. Unfortunately, Ref.Emit code can't be...
Author: Mike Stall - MSFT Date: 11/14/2006
Rename Mdbg forum to "Building Development and Diagnostic Tools for .Net"
We've renamed the ICorDebug / Mdbg forum to "Building Development and Diagnostic Tools for .Net",...
Author: Mike Stall - MSFT Date: 11/13/2006
Binary Patching tools (mspatcha, mspatchc)
Microsoft has some great binary patching tools. In my simple tests they're over twice as size...
Author: Mike Stall - MSFT Date: 11/07/2006
The Tester's dilemma: proving you can count to a million
How would you prove to a skeptic that you can count to a million (and pronounce each of the...
Author: Mike Stall - MSFT Date: 11/03/2006
Unit testing databases
Here's a cool tool on CodePlex that Tim pointed me to for anyone who needs to write unit tests on...
Author: Mike Stall - MSFT Date: 10/25/2006
Writing an RTF to HTML converter, posting code in blogs.
Visual Studio's IDE will copy code as RTF (Rich Text Format). Web browsers like HTML. So posting...
Author: Mike Stall - MSFT Date: 10/20/2006
Using Foo(...) instead of Foo(System.Type, ...)
Whenever you're passing in a parameter of System.Type that is usually determined at compile-time,...
Author: Mike Stall - MSFT Date: 10/10/2006
GCHandle.ToIntPtr vs. GCHandle.AddrOfPinnedObject
Both GCHandle's ToIntPtr and AddrOrPinnedObject take in a GCHandle and return an IntPtr. I had to do...
Author: Mike Stall - MSFT Date: 10/09/2006
Pop quiz: Who wins in finally vs. return?:
Question 1) What's the return value from this C# function: static int Test() { int val = 1; try {...
Author: Mike Stall - MSFT Date: 10/05/2006
Debugging Ngen code
You can debug ngen (aka prejitted) code from VS2005 and also have the VS2005 IDE launch ngenned...
Author: Mike Stall - MSFT Date: 10/04/2006
ICorDebugValue vs. System.Object
System.Object represents a managed object within a process. ICorDebugValue is the debugger's...
Author: Mike Stall - MSFT Date: 10/01/2006
Using CreateRemoteThread from C#
If you want to create a new thread in your process in C#, you can use Thread.Start. But things are a...
Author: Mike Stall - MSFT Date: 09/28/2006
Sample code for CreateRemoteThread in C#.
// Sample for CreateRemoteThread in C# using System; using System.Collections.Generic; using...
Author: Mike Stall - MSFT Date: 09/28/2006
How to start a console app in a new window, the parent's window, or no window
The ProcessStartInfo.CreateNoWindow property says "Gets or sets a value indicating whether to start...
Author: Mike Stall - MSFT Date: 09/28/2006
What I learned this morning...
... Don't run your disk defragmentor on your laptop when it's not plugged in. My battery went down...
Author: Mike Stall - MSFT Date: 09/14/2006
My baby, the finite state machine.
My 19-month old daughter was quite the finite state machine today. She's recently become mobile and...
Author: Mike Stall - MSFT Date: 09/13/2006
LoadClass events are usually meaningless
ICorDebug notifies a debugger when a managed class is loaded via LoadClass debug event. For...
Author: Mike Stall - MSFT Date: 09/11/2006
Iron Python 1.0 is released
You probably already read this 100 times, but Iron Python 1.0 is released. Check out Jim Hugunin's...
Author: Mike Stall - MSFT Date: 09/06/2006
How can you force clients to use your APIs properly?
It's tough to make a client use your API correctly. It's especially tough to get clients to not do...
Author: Mike Stall - MSFT Date: 09/01/2006
An example of an API versioning problem.
Here's an example of an API versioning problem. In general:Anytime you take two separate concepts...
Author: Mike Stall - MSFT Date: 08/30/2006
Fixing the MDbg / Iron Python extension...
A while ago, we had a sample of Mdbg-Python extension that let you use python to script MDbg. It was...
Author: Mike Stall - MSFT Date: 08/25/2006
Asking questions on the forums
With the new ICorDebug / MDbg forum, I've decided to temporarily disable the "Contact Me" link on my...
Author: Mike Stall - MSFT Date: 08/11/2006
Cool tool: NDepend
I just saw a free cool tool, NDepend, which analyzes .NET assemblies and lets you get neet metrics....
Author: Mike Stall - MSFT Date: 08/09/2006