Platform SDK: DLLs, Processes, and Threads

Service Functions

The following functions are used by services and by programs that control or configure services.

Function Description
ChangeServiceConfig Changes the configuration parameters of a service.
ChangeServiceConfig2 Changes the optional configuration parameters of a service.
CloseServiceHandle Closes the specified handle to a service control manager object or a service object.
ControlService Sends a control code to a service.
CreateService Creates a service object and adds it to the specified service control manager database.
DeleteService Marks the specified service for deletion from the service control manager database.
EnumDependentServices Retrieves the name and status of each service that depends on the specified service.
EnumServicesStatus Enumerates services in the specified service control manager database.
EnumServicesStatusEx Enumerates services in the specified service control manager database based on the specified information level.
GetServiceDisplayName Retrieves the display name of the specified service.
GetServiceKeyName Retrieves the service name of the specified service.
Handler An application-defined callback function used with the RegisterServiceCtrlHandler function.
HandlerEx An application-defined callback function used with the RegisterServiceCtrlHandlerEx function.
LockServiceDatabase Requests ownership of the service control manager database lock.
NotifyBootConfigStatus Reports the boot status to the service control manager.
OpenSCManager Establishes a connection to the service control manager on the specified computer and opens the specified service control manager database.
OpenService Opens an existing service.
QueryServiceConfig Retrieves the configuration parameters of the specified service.
QueryServiceConfig2 Retrieves the optional configuration parameters of the specified service.
QueryServiceLockStatus Retrieves the lock status of the specified service control manager database.
QueryServiceObjectSecurity Retrieves a copy of the security descriptor associated with a service object.
QueryServiceStatus Retrieves the current status of the specified service.
QueryServiceStatusEx Retrieves the current status of the specified service based on the specified information level.
RegisterServiceCtrlHandler Register a function to handle service control requests for an application.
RegisterServiceCtrlHandlerEx Register a function to handle service control requests for an application.
ServiceMain An application-defined function that serves as the entry point for a service.
SetServiceBits Registers a service type with the service control manager and the Server service.
SetServiceObjectSecurity Sets the security descriptor of a service object.
SetServiceStatus Updates the service control manager's status information for the calling service.
StartService Starts a service.
StartServiceCtrlDispatcher Connects the main thread of a service process to the service control manager.
UnlockServiceDatabase Unlocks a service control manager database by releasing the specified lock.