Share via


Shutting down a Standalone Service (Windows Embedded CE 6.0)

1/6/2010

Use the DeregisterService function 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 ServicesexeCallbackFunctions structure. This structure contains the pfnServiceShutdown callback functions.

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

See Also

Tasks

Configuring Services.exe to Load a Standalone Service

Reference

xxx_IOControl (Services.exe)
ServicesexeCallbackFunctions
DeregisterService