 |
OpenService ..msdn Add comment W32 Constants Translate this page |
 |
 |
The OpenService function opens an existing service.
|
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
SC_HANDLE OpenService(
SC_HANDLE hSCManager,
LPCTSTR lpServiceName,
DWORD dwDesiredAccess
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER OpenService IN advapi32;
INTEGER hSCManager,;
STRING lpServiceName,;
LONG dwDesiredAccess
|
 |
 |
 |
| Parameters: |
 |
hSCManager
[in] Handle to the service control manager database. The OpenSCManager function returns this handle.
lpServiceName
[in] Pointer to a null-terminated string that specifies the name of the service to open.
dwDesiredAccess
[in] Access to the service. |
 |
 |
| Return value: |
 |
If the function succeeds, the return value is a handle to the service.
|
 |
 |
| My comment: |
 |
Unicode: Implemented as OpenServiceW (Unicode) and OpenServiceA (ANSI).
The returned handle is only valid for the process that called OpenService. It can be closed by calling the CloseServiceHandle function.
See also: StartService, ControlService. |
 |
 |
| Word Index links for the OpenService : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2004-12-15 12:05:11 | | Modified: | 2004-12-15 12:07:51 | Visited in last 7 days: 19 |