 |
OpenSCManager ..msdn Add comment W32 Constants Translate this page |
 |
 |
The OpenSCManager function establishes a connection to the service control manager on the specified computer and opens the specified service control manager database.
|
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
SC_HANDLE OpenSCManager(
LPCTSTR lpMachineName,
LPCTSTR lpDatabaseName,
DWORD dwDesiredAccess
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER OpenSCManager IN advapi32;
STRING lpMachineName,;
STRING lpDatabaseName,;
LONG dwDesiredAccess
|
 |
 |
 |
| Parameters: |
 |
lpMachineName
[in] Pointer to a null-terminated string that specifies the name of the target computer.
lpDatabaseName
[in] Pointer to a null-terminated string that specifies the name of the service control manager database to open.
dwDesiredAccess
[in] Access to the service control manager. |
 |
 |
| Return value: |
 |
| If the function succeeds, the return value is a handle to the specified service control manager database. |
 |
 |
| My comment: |
 |
| The returned handle is only valid for the process that called the OpenSCManager function. It can be closed by calling the CloseServiceHandle function. |
 |
 |
| Word Index links for the OpenSCManager : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2004-12-13 21:43:21 | | Modified: | 2004-12-13 21:45:37 | Visited in last 7 days: 15 |