Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

Use the DeregisterServicefunction to shut down services that are run in a non-standalone mode. Because you cannot access a standalone service through the functions exposed by Services.exe, this approach will not work on standalone services.

A standalone service can terminate by notifying Services.exe that it is ready to shut down. To facilitate the termination process, on the startup of standalone services, Services.exe calls the service's xxx_IOControl (Services.exe)function and passes the ServicesexeCallbackFunctionsstructure. This structure contains the pfnServiceShutdowncallback functions.

When the service calls pfnServiceShutdown, Services.exe completes the same shutdown routine as it completes when DeregisterServiceis called on a service. After the service has completed the shutdown process, the host copy of Services.exe will terminate.

See Also