Ken Brubaker

The ClavèCoder

<July 2008>
SuMoTuWeThFrSa
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789


Navigation

Subscriptions

News

Kenneth Brubaker
Senior Application Architect

Locations of visitors to this page

Post Categories



Monday, February 02, 2004 - Posts

Self Identifying Services

Once upon a time in C++-land I had a NT Service base class. Now that .NET has a fine base class, it's no longer needed. However, my old class had a nice feature that would run the app as a console app unless it was started by the SCM. It used the trick of having a command line parameter that the SCM was configured to send when it started the application. I'm wanting to add this kind of functionality to my .NET Windows Services. The command line option seems much harder with the new .NET Installer functionality so I thought I would Google Groups around for a more intrinsic solution.

Here's that less than 100% solution as Win32 code. It's SID code so it may be hard to P/Invoke.
As MS employee described
As C-code implemented

Here's a heuristic way

posted Monday, February 02, 2004 8:00 AM by kenbrubaker with 0 Comments




Powered by Dot Net Junkies, by Telligent Systems