Be sure to have Windows ATL and MFC support enabled for your compiler 
(they are available for Visual Studio Community 2017 but absent for MS Build Tools 2017)

 
The file atlbase.h needs to be patched in order to compile the program.
Just comments the three rows from 4565 to 4567:

/* altbase patch */
...
// data members
public:
	TCHAR m_szServiceName[256];
// SERVICE_STATUS_HANDLE m_hServiceStatus; <= this
// SERVICE_STATUS m_status;                <= this
// BOOL m_bService;                        <= this
...