OpenSCManager()
The OpenSCManager() function can be used to retrieve a handle to the SCM. After you've retrieved a handle to the SCM, you can begin communicating with services through the internal API.
Note
You should only start, stop, pause, and unpause a service using the SCM APIs. If you want to send other requests to a service, the service should provide an IPC protocol that supports client requests. This is a guideline, not a rule.
Service Handles
The first thing you must do is call the OpenService() function to acquire a handle to a specific service. After you've acquired a handle to a specific service, you can start the service by calling the StartService() function. You can close the service handle with the CloseServiceHandle() function ...
Get COM+ Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.