Setting Service Status Stop Pending Message through .NET

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: flagrant99 (flagrant99_at_discussions.microsoft.com)
Date: 08/31/04


Date: Tue, 31 Aug 2004 10:05:02 -0700

Anybody know how to get the Service handle so I can call SetServiceStatus()
in the win32 API from C#?

It will take a long time for me to shutdown so I wanted to send STOP_PENDING
messages to SCM. Is this possible in .NET?