January 2000
Intermediate to advanced
672 pages
21h 46m
English
Once you
have a handle to the SCM, open a specific service using the function
win32service.OpenService()
, which has the following signature.
handle = win32service.OpenService(schandle,serviceName,desiredAccess)
schandle
A handle to the SCM, as obtained from
win32service.OpenSCManager().
serviceName
The name of the service to open.
desiredAccess
A bitmask of flags defining the desired access.
win32service.SERVICE_ALL_ACCESS provides all
access.
Now that you’re connected to the SCM, you can obtain a handle to the messenger service with the following code:
>>> hs=win32service.OpenService(hscm, "Messenger", ... win32service.SERVICE_ALL_ACCESS) >>> hs 1375960 >>>
Read now
Unlock full access