16. Windows API Service

Source: Internet
Author: User

I. Basic Concepts

1. A service is in the systemResidentProgramThe service can be automatically started at system startup (prior to user logon ). When an application needs to be resident in the system or provide services to other applications at any time, you can use the service application. Generally, you need to use the service when writing network server programs.. For example, IIS is a common Web Application Server (Web, FTP, mail, etc.) in windows.

In Windows, a service controller (SCM) is used to control services. Service Installation, deletion, start, stop, control, and I/O are all implemented through the service controller.

Windows Services include service applications and kernel driver services. service applications run in the System user State, and kernel driver services run in the system kernel state. User-mode service programs must comply with SCM interface specifications.

SC .exe

2. The service controller manages all the services in the system. SCM manages the database of installed service programs and device drivers in the system. The information stored in the database includes the services installed by the system, each service includes how to start each service, the security attributes of each service, and control interfaces.

The functions provided by SCM are used to design service programs, service configuration programs, and service control programs.

3. A service program is an executable program required to run the service. SCM starts and stops the service by running and terminating the service program.

4. Starting, terminating, or controlling the running of service programs is implemented by sending requests to SCM. The procedure for starting, stopping, and modifying properties of a service program is the service control management program.

5. A service has several attributes, including the service name, display name, service type, description, executable file path, Startup type, service status, startup parameters, and dependency.

Ii. Related APIs

This part is not involved for the time being. For more information, see [1, 2].

[1] proficient in Windows API functions, interfaces, and programming instances

[2] http://msdn.microsoft.com/en-us/library/ms685141%28VS.85%29.aspx

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.