Click here to Skip to main content
15,892,927 members
Articles / Programming Languages / C#

Exposing Windows Service

Rate me:
Please Sign up or sign in to vote.
3.44/5 (7 votes)
8 Nov 20042 min read 44.1K   261   16  
This article is about exposing .NET Windows Service status information.
using System;
using System.Collections;
using System.ComponentModel;
using System.Configuration.Install;
using System.Management.Instrumentation;  
namespace MCPEService
{
	/// <summary>
	/// Summary description for InstrumentInstaller.
	/// </summary>
	[RunInstaller(true)]
	public class InstrumentInstaller : DefaultManagementProjectInstaller 
	{
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public InstrumentInstaller()
		{
			// This call is required by the Designer.
			InitializeComponent();
		}

		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}


		#region Component Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			components = new System.ComponentModel.Container();
		}
		#endregion
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
South Africa South Africa
I studied IT in 1987 and have been working ever since in on projects that range from coding animation in pascal and assembler to writing secure internet banking web sites.

I live in South Africa and I think because of it's size we're required to do more for less which makes highly skilled in a wide range of skills and technologies.

I have the bonus of living in a coastal town so time away from computers is spent around the sea and in sunshine and nature.

Comments and Discussions