mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[UMPNPMGR] PNP_CreateDevInst: Create a device node for the device to be installed
This commit is contained in:
parent
969f950bf3
commit
74efe979a8
1 changed files with 14 additions and 1 deletions
|
@ -3056,8 +3056,10 @@ PNP_CreateDevInst(
|
|||
PNP_RPC_STRING_LEN ulLength,
|
||||
DWORD ulFlags)
|
||||
{
|
||||
PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA ControlData;
|
||||
HKEY hKey = NULL;
|
||||
DWORD dwSize, dwPhantom;
|
||||
NTSTATUS Status;
|
||||
CONFIGRET ret = CR_SUCCESS;
|
||||
|
||||
DPRINT("PNP_CreateDevInst(%p %S %S %lu 0x%08lx)\n",
|
||||
|
@ -3115,7 +3117,18 @@ PNP_CreateDevInst(
|
|||
RegOpenKeyEx(hEnumKey, pszDeviceID, 0, KEY_READ | KEY_WRITE, &hKey);
|
||||
}
|
||||
|
||||
/* If the device instance is a phantom, turn it into an non-phantom */
|
||||
/* Create a device node for the device */
|
||||
RtlInitUnicodeString(&ControlData.DeviceInstance, pszDeviceID);
|
||||
Status = NtPlugPlayControl(PlugPlayControlInitializeDevice,
|
||||
&ControlData,
|
||||
sizeof(ControlData));
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
ret = CR_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* If the device is a phantom device, turn it into a normal device */
|
||||
if (hKey != NULL)
|
||||
{
|
||||
dwPhantom = 0;
|
||||
|
|
Loading…
Reference in a new issue