Go to the source code of this file.
◆ Control()
Definition at line 13 of file control.c.
17{
19 SC_HANDLE hService =
NULL;
21 DWORD dwDesiredAccess = 0;
24
25#ifdef SCDBG
27 INT TmpCnt = ArgCount;
31 while (TmpCnt)
32 {
34 TmpArgs++;
35 TmpCnt--;
36 }
38#endif
39
41 {
44 break;
45
54 break;
55
58 break;
59
60 default:
63 else
64 dwDesiredAccess = 0;
65 break;
66 }
67
72 {
75 goto done;
76 }
77
80 dwDesiredAccess);
82 {
85 goto done;
86 }
87
91 {
94 goto done;
95 }
96
97
101
104 &StatusEx,
106
107done:
108 if (!bResult)
110
111 if (hService)
113
116
117 return bResult;
118}
VOID PrintService(LPCTSTR lpServiceName, LPCTSTR lpDisplayName, LPSERVICE_STATUS_PROCESS pStatus, BOOL bExtended)
static WCHAR ServiceName[]
DWORD ReportLastError(void)
BOOL WINAPI ControlService(SC_HANDLE hService, DWORD dwControl, LPSERVICE_STATUS lpServiceStatus)
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
_In_ WDF_WMI_PROVIDER_CONTROL Control
DWORD WINAPI GetLastError(void)
#define SERVICE_CONTROL_PARAMCHANGE
#define SERVICE_CONTROL_NETBINDREMOVE
#define SERVICE_CONTROL_NETBINDADD
#define SERVICE_USER_DEFINED_CONTROL
#define SC_MANAGER_CONNECT
#define SERVICE_CONTROL_NETBINDDISABLE
#define SERVICE_PAUSE_CONTINUE
#define SERVICE_CONTROL_NETBINDENABLE
#define SERVICE_INTERROGATE
#define SERVICE_CONTROL_CONTINUE
#define SERVICE_CONTROL_STOP
#define SERVICE_CONTROL_PAUSE
#define SERVICE_CONTROL_INTERROGATE