Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » General » Downloads
 
Add your own
alternative version
Go to top

Self installing .NET service using the Win32 API

, 28 Oct 2005
Sometimes the service classes provided by Visual Studio don't give you the control you need, so why not build your own? And while you're at it, why not make it self-installing? The base class provided gives you full control of the Win32 Services API from a convenient base class and attribute.
hoytsoft_servicebase_src.zip
HoytSoft.ServiceBase.csproj.user
Attributes
Base
bin
Debug
HoytSoft.Service.exe
obj
Debug
SmartClicks.Service.dll
SmartClicks.Service.exe
temp
TempPE
hoytsoft_serviceprocess_src.zip
Example
bin
Debug
HoytSoft.ServiceProcess.dll
Release
HoytSoft.Example.csproj.user
Service Base
Attributes
bin
Debug
Release
HoytSoft.ServiceProcess.csproj.user
HoytSoft.snk
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HoytSoft.ServiceProcess", "Service Base\HoytSoft.ServiceProcess.csproj", "{7818CC36-4D2E-4F20-AC36-1818D5CADF50}"
	ProjectSection(ProjectDependencies) = postProject
	EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HoytSoft.Example", "Example\HoytSoft.Example.csproj", "{0B485A44-C9B7-468F-B06B-AF648846F7D4}"
	ProjectSection(ProjectDependencies) = postProject
	EndProjectSection
EndProject
Global
	GlobalSection(SolutionConfiguration) = preSolution
		Debug = Debug
		Release = Release
	EndGlobalSection
	GlobalSection(ProjectConfiguration) = postSolution
		{7818CC36-4D2E-4F20-AC36-1818D5CADF50}.Debug.ActiveCfg = Debug|.NET
		{7818CC36-4D2E-4F20-AC36-1818D5CADF50}.Debug.Build.0 = Debug|.NET
		{7818CC36-4D2E-4F20-AC36-1818D5CADF50}.Release.ActiveCfg = Release|.NET
		{7818CC36-4D2E-4F20-AC36-1818D5CADF50}.Release.Build.0 = Release|.NET
		{0B485A44-C9B7-468F-B06B-AF648846F7D4}.Debug.ActiveCfg = Debug|.NET
		{0B485A44-C9B7-468F-B06B-AF648846F7D4}.Debug.Build.0 = Debug|.NET
		{0B485A44-C9B7-468F-B06B-AF648846F7D4}.Release.ActiveCfg = Release|.NET
		{0B485A44-C9B7-468F-B06B-AF648846F7D4}.Release.Build.0 = Release|.NET
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
		XCSharpSolutionEnabled = True
	EndGlobalSection
	GlobalSection(ExtensibilityAddIns) = postSolution
	EndGlobalSection
EndGlobal

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

DavidHoyt
Software Developer (Senior) Lawrence Livermore National Laboratories
United States United States
I'm a recent graduate of Brigham Young University in Provo, UT and now working for Lawrence Livermore National Laboratories (LLNL). I've been programming since I was 14 and did the amazing Hoyt family website with an animated gif of a spinning globe. I've come a long way since then and now actually use pictures of people.
 
I've been interested in website development and Windows programming since and I haven't stopped except for two years spent in El Salvador as a religious representative for my church.
 
I've done lots of work with C#/C/C++/Java/Python/JavaScript/Scheme/T-SQL/PL-SQL/Visual Basic/etc., web services, windows apps, services, and web apps. It's been a lot of fun!

| Advertise | Privacy | Mobile
Web02 | 2.8.140926.1 | Last Updated 28 Oct 2005
Article Copyright 2005 by DavidHoyt
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid