138{
149 DWORD dwPreviousState;
150
151 DPRINT1(
"ScmGetDriverStatus() called\n");
152
153
154 if (lpServiceStatus !=
NULL)
155 {
157 }
158
159
161 {
163 }
164 else
165 {
168 }
169
172 0,
175
176
181 {
182 DPRINT1(
"NtOpenDirectoryObject() failed\n");
184 }
185
186
192
193
196 {
198 DirInfo,
204
206 {
207 DPRINT(
"No more services\n");
208 break;
209 }
210
211
213 break;
214
216
217
219 {
220
224
225 break;
226 }
227 }
228
229
231 0,
232 DirInfo);
234
235
236
237
238
239
241 {
244 }
245
246
247
248
249
250 if (bFound)
251 {
252
253
255
256
258
260 {
261
267 }
268
271 }
272 else
273 {
274
275
277 {
278
284 }
286 {
287
288 }
289 else
290 {
296 }
297 }
298
299
300 if (lpServiceStatus !=
NULL)
301 {
305 }
306
307 DPRINT1(
"ScmGetDriverStatus() done (Error: %lu)\n", dwError);
308
310}
_In_ PFCB _In_ PCD_NAME DirName
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID _In_ size_t _Out_ size_t * DataLength
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
#define HeapFree(x, y, z)
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
#define InitializeObjectAttributes(p, n, a, r, s)
struct _OBJECT_DIRECTORY_INFORMATION OBJECT_DIRECTORY_INFORMATION
#define DIRECTORY_TRAVERSE
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
#define STATUS_NO_MORE_ENTRIES
NTSTATUS NTAPI NtOpenDirectoryObject(OUT PHANDLE DirectoryHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
NTSTATUS NTAPI NtQueryDirectoryObject(IN HANDLE DirectoryHandle, OUT PVOID Buffer, IN ULONG BufferLength, IN BOOLEAN ReturnSingleEntry, IN BOOLEAN RestartScan, IN OUT PULONG Context, OUT PULONG ReturnLength OPTIONAL)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
DWORD dwServiceSpecificExitCode
#define RtlCopyMemory(Destination, Source, Length)
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
#define ERROR_SERVICE_NEVER_STARTED
#define ERROR_GEN_FAILURE
#define SERVICE_ACCEPT_STOP
#define SERVICE_KERNEL_DRIVER
#define SERVICE_FILE_SYSTEM_DRIVER