services: Add a ref count to the service entry in svcctl_CreateServiceW.
The ref count will be released by SC_RPC_HANDLE_destroy when the
returned handle is destroyed.
Change svcctl_OpenServiceW to use InterlockedIncrement to increment
the ref count since the service is in the database and therefore could
be shared and SC_RPC_HANDLE_destroy doesn't take the scmdatabase lock
when decrementing the ref count.
Showing
Please
register
or
sign in
to comment