jump to navigation

MMC 3.0 – Build Snap-ins with C# and.Net September 23, 2007

Posted by gcorbin in C#.
Tags: , , ,

Microsoft Management Console no longer belongs in the realm of C++ developers only. Microsoft has released a new version of the popular MMC framework. This version fully supports managed and unmanaged code. The new MMC 3.0 SDK finally gives .NET developers the ability to create snap-ins. In prior versions of MMC, we were able to use some of the .NET framework, but all that code needed to be embedded into a C++ framework that provided a sort of communication bridge between MMC and .NET. With that architecture there was plenty of cases where .NET coding was limited in what could be done. The way it worked was the C++ snap-in hosted the .NET program in an ActiveX container. This is would cause all the .NET code to be in a sort of island that could not easily communicate with the outside MMC framework. All that is now behind us. Now that we have an MMC framework that is fully .NET compliant, we can ditch all the old C++ hacks in favor for the simplicity and power of C#.

To get started with writing snap-ins using C#, you will need 2 items. First you will need the MMC 3.0 console. Next you will need the .NET 3.0 framework. If you are working on windows Vista, you will already have these. The operating systems supported by this are Windows XP, Windows 2003, and Windows Vista. If you want your snap-in to work on anything older than that, then you’re out of luck. Once you get these pieces installed, I would recommend visiting the MSDN. There are several good samples that show how to write snap-ins using C#. There are samples that are as simple as a “Hello World” and there are some that are as complex as some of the Microsoft snap-ins.

Regardless to how you choose to use this, it is a great new technology that I would recommend you add to you portfolio. One last side note that I discovered is that this framework is even flexible enough to allow us to scrap winforms and use all the cool animation that WPF gives us. This is a great framework for creating any desktop administrative tool.