- /*
- * Now get the class GUID
- */
- Class.Length = 0;
- Class.MaximumLength = 40 * sizeof(WCHAR);
- Class.Buffer = ClassBuffer;
- QueryTable[0].QueryRoutine = NULL;
- QueryTable[0].Name = L"ClassGUID";
- QueryTable[0].EntryContext = &Class;
- QueryTable[0].Flags = RTL_QUERY_REGISTRY_REQUIRED | RTL_QUERY_REGISTRY_DIRECT;
-
- Status = RtlQueryRegistryValues(RTL_REGISTRY_HANDLE,
- (PWSTR)EnumSubKey,
- QueryTable,
- DeviceNode,
- NULL);
-
- /* If there is no class GUID, we're done */
- if (!NT_SUCCESS(Status))
- {
- return STATUS_SUCCESS;
- }
-
- /*
- * Load the class filter driver
- */
- Status = IopOpenRegistryKeyEx(&ControlKey,
- NULL,
- &ControlClass,
- KEY_READ);
- if (!NT_SUCCESS(Status))
- {
- DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
- &ControlClass, Status);
- return STATUS_SUCCESS;
- }
-
- /* Open subkey */
- Status = IopOpenRegistryKeyEx(&ClassKey,
- ControlKey,
- &Class,
- KEY_READ);
- if (!NT_SUCCESS(Status))
- {
- /* It's okay if there's no class key */
- DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
- &Class, Status);
- ZwClose(ControlKey);
- return STATUS_SUCCESS;
- }
-