Services.exe is a process that supplements the Device.exe process. If a device driver crashes when running in Device.exe, it may corrupt other, unrelated device drivers that are currently running, and crash the entire system. Running services in Services.exe decreases the likelihood of a system failure in the event of a service crash. Services.exe also provides enhanced loading capabilities such as support for starting, pausing, and stopping services.

The programming model for writing services and writing device drivers is very similar in Windows CE. NET. You can develop a server that runs on Device.exe rather than on Services.exe, but has the identical code, provided your server does not require advanced features offered by Services.exe. However developing a server that runs on Device.exe instead of on Services.exe is done at the expense of the increased stability that Services.exe offers. If a driver does not need access to hardware or it does not need to use intra-process communication to another device driver, writing it as a service for Services.exe is highly recommended.

Services.exe can also be configured to wait on connections from multiple sockets for multiple services. Upon arrival of a connection request from a particular socket, Services.exe dispatches the request to the registered service.

Note   Services.exe helps prevent a device failure resulting from a service crash, but it does not prevent a resulting crash in another unrelated service. All services should be properly debugged prior to deployment.

Services.exe supports IPv6. For more information about IPv6, see Core Protocols of IPv6 and Internet Protocol version 6 Addressing.

Windows CE .NET includes source code for a sample Telnet server in %WINCEROOT%\Public\Servers\Sdk\Samples\Telnetd. This code demonstrates how to start, stop, and unload a service. It also shows how to implement a stream-based service, and how to implement a service as a stand-alone service or as part of a super server model.

See Also

Services.exe Registry Settings | Activating a Service Programmatically | Registering a Service Programmatically | Controlling a Running Service | Stopping a Running Service | Configuring Services.exe to Load a Standalone Service | Using Services.exe from the Command Line | Super Services | Services.exe Functions

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.