/* Convert it to Unicode */
RtlInitEmptyUnicodeString(&KeyName, Buffer, sizeof(Buffer));
- RtlAnsiStringToUnicodeString(&KeyName, &TempString, FALSE);
+ Status = RtlAnsiStringToUnicodeString(&KeyName, &TempString, FALSE);
+ if (!NT_SUCCESS(Status))
+ {
+ NtClose(KeyHandle);
+ return Status;
+ }
/* Create the key */
ParentHandle = KeyHandle;
{
/* EISA */
case EisaAdapter:
-
+
/* Fixup information */
Interface = Eisa;
Bus = CmpTypeCount[EisaAdapter]++;
/* Turbo-channel */
case TcAdapter:
-
+
/* Fixup information */
Interface = TurboChannel;
Bus = CmpTypeCount[TurboChannel]++;
/* ISA, PCI, etc busses */
case MultiFunctionAdapter:
-
+
/* Check if we have an identifier */
if (Component->Identifier)
{
break;
}
}
-
+
/* Fix up information */
Interface = CmpMultifunctionTypes[i].InterfaceType;
Bus = CmpMultifunctionTypes[i].Count++;
/* SCSI Bus */
case ScsiAdapter:
-
+
/* Fix up */
Interface = Internal;
Bus = CmpTypeCount[ScsiAdapter]++;
break;
}
}
-
+
/* Dump information on the component */
/* Setup the hardware node */
Bus,
DeviceIndexTable);
if (!NT_SUCCESS(Status)) return Status;
-
+
/* Check for children */
if (CurrentEntry->Child)
{
return Status;
}
}
-
+
/* Get to the next entry */
NtClose(NewHandle);
CurrentEntry = CurrentEntry->Sibling;
}
-
+
/* We're done */
return STATUS_SUCCESS;
}