MSDN Flash
UK MSDN Flash
06 February 2008
Editor's Intro

Hello

Following the announcement in the last issue, it took only a handful of days for the registration list of the UK 2008 Launch event to fill up and the waiting list is already as long as our collective arms!

As a reminder, the 3 products that Microsoft is launching are Visual Studio 2008 (RTM last November), SQL Server 2008 (expected to RTM in Q3 CY08) and Windows Server 2008 (RTM last Monday). Note that, since they share the same codebase, Windows Vista Service Pack 1 was also released at the same time as Windows Server 2008.

For the unlucky amongst you that couldn't register in time for the launch event, March is a busy month for other developer events too and you can register for those through the Horizon section further below. In particular, our entire team is delivering sessions at both DevWeek and QCon so I hope to see you at one of these.

Cheers
Daniel

MSDNMSDN EventsMSDN ScreencastsEvaluation CentreDeveloper CentresMSDN

Fresh Discoveries
Articles
Book
Articles
E-Book
Free Windows Server 2008 e-book from MS Press.
Excerpts on topics ranging from Virtualisation to PowerShell.
Downloads
MSDN Online
MSDN Code Gallery – a new community enabled portal.
Download sample apps and code, and even share your own.
Downloads
Screencast
Add Security to .NET Applications with the ProtectedData class.
Encrypt sensitive data using the System.Security.Cryptography namespace.
Downloads
Screencast
ADO.NET Data Services - Querying with LINQ.
Use LINQ to construct a query and it gets translated into a URI.
Articles
Case Study
Employees at U.K. Government Department Work Smarter with Shared Environment.
Defra uses MOSS 2007 enabling faster access to required information.
Downloads
Download
Microsoft Web Deployment Tool - Tech Preview 1.
Helps you deploy, sync or migrate sites and servers in your Web environment.
Downloads
Download
Visual Studio 2008 Web Deployment Projects – RTW.
This add-in provides a UI with functionality to build and deploy Web sites and apps.
Downloads
Download
Windows Vista SideShow Device SDK for .NET Micro Framework 1.4.
Target Windows SideShow devices using C#.
Downloads
Download
Game development Kit for Visual C++ 2008 Express Edition.
A 2D/3D game development library for C++.
Downloads
Podcast
NxtGenUG Show #51.
Part 2 of 2007 Year Review from Richie and Dave.
Articles
MSDN Magazine
What's New for WCF in Visual Studio 2008.
Juval Lowy covers the top new WCF v3.5 features.
Articles
MSDN Magazine
Building State Machines with Windows Workflow Foundation.
Discusses building and designing state machine workflows.
Articles
KB Article
Applications Using Older ATL Components May Experience Conflicts With DEP.
Workaround for conflict between ATL 7.1 or earlier components and DEP.

Register Now to Avoid Disappointment
Community event
Community event
Community event
Community event
Community event 
Community event
Community event
Community event
Community event
Community event
Community event

Feature Article

WMI Provider Extensions in .NET Framework v3.5

Windows Management Instrumentation (WMI) is the management infrastructure for Windows-based systems. Windows Vista ships with 100+ WMI providers to enable the management of various operating system components. Applications instrumented with WMI can be managed using tools like Microsoft Operations Manager (MOM), HP OpenView, Windows Script Host (WSH) and PowerShell. The WMI infrastructure provides a repository in which providers can install their management information. Consumers can query & analyze this management information and then using the providers can manage applications by reading/writing configuration settings and calling methods on managed entities. For more on WMI, please start on the "About" page.

In the .NET Framework v2.0 (in the System.Management.dll) the System.Management namespace provides the functionality for developing WMI consumer applications while the System.Management.Instrumentation namespace provides the classes to write WMI providers. The provider API in .NET Framework v2.0 had some limitations e.g. a managed WMI provider couldn't have writeable properties, and couldn't expose methods. To overcome these limitations and improve the overall provider development experience, .NET Framework v3.5 introduced extensions to the WMI Provider API. The new API/extensions can be found in the System.Management.Instrumentation namespace across two assemblies: System.Core.dll and System.Management.Insrumentation.dll. These new extensions enable a familiar attribute based programming model for writing custom WMI providers and exposes all of the features of the native COM based API to managed code. The new API allows you to create both coupled and decoupled WMI providers. Coupled providers are implemented as a dll which must be signed and installed in the GAC. The WMI service itself hosts coupled providers. Decoupled providers are hosted by your own application which must be up and running to enable consumers to access your management information.

So to turn a C# or VB class into a management class you apply the ManagementEntity attribute to the class itself. Methods in your class are exposed to WMI using the ManagementTask attribute while ManagementConfiguration and ManagementProbe attributes are used to expose read/write and read-only properties respectively. The hosting model of your provider (coupled or decoupled) is specified using the WmiConfiguration attribute. As always, these attributes are fully described in the documentation.

Once you have described your management classes and hosting model using the aforementioned attributes, you then create a custom installer class by deriving from the new DefaultManagementInstaller class. This installer class will be invoked when you run InstallUtil.exe against your assembly and will extract the management information from your management classes, creates a MOF (Managed Object Format) script, compiles it and persist it in WMI repository. This installation process is same regardless of the hosting model (coupled or decoupled) of your provider. After the installation, your WMI provider will be available to any WMI consumer application.

WMI is a great technology and by creating a WMI provider your applications can be managed by any management software and custom scripts in a standardized way. For examples of managed WMI providers visit the MSDN "How To" samples.

Zulfiqar Ahmed
Application Development Consultant (ADC)

Read Zulfiqar's blog

On the Horizon
Community event
05 - 07 March, Las Vegas: MIX 08 ($1295).
Community event
10 - 14 March, London: DevWeek 2008 (Register by 15 February for £1595 + VAT).
Community event
10 - 14 March, London: QCon London 2008 (Register by 22 February for £1792).



Contact Microsoft

Send your feedback and comments to ukmsdn@microsoft.com.
Find out more about the MSDN resources that are available to you.

Find out more about the Microsoft Contact Centre or call on 0870 60 10 100 (0800-1800 Monday to Friday)
Find out more about your MSDN support options or call 0800 0517 215

MSDNMSDN EventsMSDN ScreencastsEvaluation centreDeveloper CentresMSDN

To cancel your subscription to this newsletter, reply to this message with the word UNSUBSCRIBE in the Subject line. You can also unsubscribe at the Microsoft Profile Centre You can manage all your Microsoft.com communication preferences at this site.

Legal Information 

This newsletter was sent by Microsoft Ltd, Microsoft Campus, Thames Valley Park, Reading RG6 1WG.
Sign up for other newsletters | Contact Us | Unsubscribe | Update your profile | Legal information
© 2007 Microsoft Corporation  Terms of Use | Trademarks | Privacy Statement
Microsoft