Go to the source code of this file.
◆ QueryDescription()
Definition at line 12 of file description.c.
13{
14 SC_HANDLE hManager =
NULL;
15 SC_HANDLE hService =
NULL;
17 DWORD cbBytesNeeded = 0;
19
20#ifdef SCDBG
22#endif
23
28 {
31 goto done;
32 }
33
36 {
39 goto done;
40 }
41
45 0,
46 &cbBytesNeeded))
47 {
48 if (cbBytesNeeded == 0)
49 {
52 goto done;
53 }
54 }
55
57 if (pServiceDescription ==
NULL)
58 {
62 goto done;
63 }
64
67 (
LPBYTE)pServiceDescription,
68 cbBytesNeeded,
69 &cbBytesNeeded))
70 {
73 goto done;
74 }
75
76 _tprintf(
_T(
"[SC] QueryServiceConfig2 SUCCESS\n\n"));
77
80 (pServiceDescription->lpDescription) ? pServiceDescription->lpDescription :
_T(
""));
81
82done:
85
86 if (pServiceDescription !=
NULL)
88
89 if (hService)
91
92 if (hManager)
94
95 return bResult;
96}
static WCHAR ServiceName[]
#define HeapFree(x, y, z)
DWORD ReportLastError(void)
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
DWORD WINAPI GetLastError(void)
#define SERVICE_CONFIG_DESCRIPTION
#define SC_MANAGER_CONNECT
#define QueryServiceConfig2
#define SERVICE_QUERY_CONFIG
Referenced by ScControl().
◆ SetDescription()
Definition at line 99 of file description.c.
100{
101 SC_HANDLE hManager =
NULL;
102 SC_HANDLE hService =
NULL;
105
106#ifdef SCDBG
108#endif
109
113 if (hManager ==
NULL)
114 {
117 goto done;
118 }
119
121 if (hService ==
NULL)
122 {
125 goto done;
126 }
127
129
132 (
LPBYTE)&ServiceDescription))
133 {
136 goto done;
137 }
138
139 _tprintf(
_T(
"[SC] ChangeServiceConfig2 SUCCESS\n\n"));
140
141done:
142 if (bResult ==
FALSE)
144
145 if (hService)
147
148 if (hManager)
150
151 return bResult;
152}
static const WCHAR Description[]
#define ChangeServiceConfig2
#define SERVICE_CHANGE_CONFIG
Referenced by ScControl().