How does a Windows service differ from a standard exe?

后端 未结 5 754
梦毁少年i
梦毁少年i 2021-01-31 02:52

What\'s the difference between a Windows service and a standard exe?

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-31 03:07

    From the perspective of the EXE Binary and from the perspective of the Compiler's C Library, a Windows service looks exactly like a standard Unix program or a Windows console program. i.e with main() entry point. What makes a service different is how it is loaded / invoked by Microsoft Windows (from the registry, usually at boot). A service can (and should) tell the SC.exe application [Service Control Manager] via Windows API calls, that the service is started, stopped, suspended, etc.

提交回复
热议问题