OpenService() fails on a service marked for deletion on Windows 10, Version 1703 (OS build 15063)

OpenService() fails with error code 1060 or ERROR_SERVICE_DOES_NOT_EXIST when a service is marked for deletion (DeleteService).

This is a known bug.

It should be fixed in Windows 10 Fall Creators Update.


Windows 10 1703 with Cumulative Update February 22, 2018—KB4077528 (OS Build 15063.936) or later the problem has been fixed.