A Windows service has a special ServiceMain function and must respond to Service Control Manager (SCM) commands properly in order to be functional as a service. On the other hand, a regular executable has a main
or WinMain
function and doesn't need to respond to any particular control commands.