 |
LockServiceDatabase ..msdn Add comment W32 Constants Translate this page |
 |
 |
The LockServiceDatabase function requests ownership of the service control manager database lock. Only one process can own the lock at any given time.
|
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
SC_LOCK LockServiceDatabase(
SC_HANDLE hSCManager
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER LockServiceDatabase IN advapi32;
INTEGER hSCManager
|
 |
 |
 |
| Parameters: |
 |
hSCManager
[in] Handle to the service control manager database. |
 |
 |
| Return value: |
 |
| If the function succeeds, the return value is a lock to the specified service control manager database. |
 |
 |
| My comment: |
 |
The hSCManager handle is returned by the OpenSCManager function, and must have the SC_MANAGER_LOCK access right.
A call to the StartService function to start a service in a locked database fails. No other service control manager functions are affected by a lock.
See also: UnlockServiceDatabase, OpenSCManager. |
 |
 |
| Word Index links for the LockServiceDatabase : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2004-12-14 21:53:12 | | Modified: | 2004-12-15 12:12:01 | Visited in last 7 days: 8 |