Поделиться через


Activating a Service Programmatically (Windows Embedded CE 6.0)

1/6/2010

Services.exe can load a service based on the value located in the built-in registry key located under the HKEY_LOCAL_MACHINE\Services\<Service Name> registry key.

To load a service programmatically, you must call the ActivateService function. The following code example shows how to load the Telnet server using ActivateService.

ActivateService(L"TELNETD", 0);

A call to ActivateService will cause Services.exe to load the Telnet server based on the settings located under the HKEY_LOCAL_MACHINE\Services\TELNETD registry key. Upon completion of loading the service, ActivateService will load any super service sockets that are appropriate.

See Also

Reference

RegisterService
ActivateService

Concepts

Services.exe Application Development
Registering a Service Programmatically

Other Resources

Services.exe