A detailed description of Windows Service

Source: Internet
Author: User

I. Introduction to Windows Services

Windows services are programs that can be opened automatically when the system starts (no one is required to log on to the computer).

1. A scenario for creating a Windows service:

[1] In the absence of user interaction operation in the case of running the program;

[2] Run the program under a user with greater privileges than the interactive user;

2. Examples of Windows services:

[1] WCF host (assuming that IIS is not available for some reason);

[2] A program that caches data from a network server;

[3] A program that organizes local disk data in the background.

3. Management of Windows Services:

Under Windows system: Control Panel → system and security → management tools → services, or search for "services" directly in search Web and Windows.

Second, the architecture of Windows services

There are three types of programs required to operate WINDOWS Services: Service programs, service control procedures, and service configurator.

1, Service procedures: to provide the actual functions required;

A service program requires three parts: the main function, the Service-main function, and the handler.

The Service Control Manager (MANAGER,SCM), which is very important to the service, can send a request to the service to start the service or stop the service. SCM is an integral part of the operating system, and its role is to communicate with the service.

[1] Main function

2. Service Control program: used to send control request to service, such as Start, stop, pause and continue.

3, service Configuration program: for the installation of services, which means not only to copy the service to the file system, but also to write the service information into the registry, the registration information is used by the Service Control Manager (SCM) to start and start the service.

[1]

  

A detailed description of Windows Service

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.