用c语言编写windows服务器(Using C language to write Windows Server).docVIP

  • 8
  • 0
  • 约9.24千字
  • 约 9页
  • 2017-10-07 发布于河南
  • 举报

用c语言编写windows服务器(Using C language to write Windows Server).doc

用c语言编写windows服务器(Using C language to write Windows Server)

用c语言编写windows服务器(Using C language to write Windows Server) Some time ago I wrote an article written by the form of service to achieve the purpose of some inspectionprograms articles, as to how to write service I have introduced in the windows today, lets take a look at how to write the service program. Windows services are designed for applications that need to run in the background, and for tasks that do not interact with the user. In order to learn the basics of this console application, C (not C++) is the best choice. This article will establish and implement a simple service program that is designed to query the amount of physical memory available in the system, and then write the results to a text file. Finally, you can write your own Windows service using what youve learned. When I was writing my first NT service, I went to MSDN to look for examples. There I found an article written by Nigel Thompson: Creating a Simple Win32 Service in C++. This article is accompanied by a C++ example. Although this article explains the service development process very well, I still feel the lack of important information I need. I want to understand what framework, what functions to call, and when to call, but C++ doesnt make me so relaxed about it. The object-oriented approach is convenient, but it is not conducive to learning the basic knowledge of the service program because it encapsulates the underlying Win32 function calls. Thats why I think C is better suited for writing primary services or services for simple background tasks. After you have a thorough understanding of the service process, you can write it with C++. When I left my former job and had to transfer my knowledge to another person, it was very easy to explain the NT service by using the examples I wrote with C. A service is a console program that runs in the background and implements tasks that do not require user interaction. The Windows NT/2000/XP operating system provides specialized support for service p

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档