jump to navigation

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

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

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.

Advertisements

Comments»

1. Jaco - August 12, 2008

Hi Greg

I am trying to display a WPF Usercontrol in the result pane, rather than a WinForms UserControl.

At compile time, i get an error that I cannot convert from System.Windows.Forms.Control to my System.Windows.Controls

Any idea on how to get past this?

2. J - December 27, 2009

I am getting Help on item on help menu. Any idea how to handle this for MMC 3.0. I know this used to give MMCN_SNAPINHELP event to IComponentData. What needs to be done in MMC 3.0 to handle this.
Thx
J


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: