This is an attempt to get a working C++ skeleton for a Windows Service. As a basis I use the following publications by Sergey Babkin:
https://blogs.msdn.microsoft.com/sergey_babkins_blog/2015/05/20/error-handling-part-5-an-error-infrastructure-for-windows/ https://blogs.msdn.microsoft.com/sergey_babkins_blog/2016/12/28/windows-service-wrapper-in-c/ https://blogs.msdn.microsoft.com/sergey_babkins_blog/2017/01/19/etw-and-logging-recipes/
This is a work in progress and is not ready for production.