diff --git a/reactos/dll/win32/newdev/wizard.c b/reactos/dll/win32/newdev/wizard.c index b02920014c2..658d71da5af 100644 --- a/reactos/dll/win32/newdev/wizard.c +++ b/reactos/dll/win32/newdev/wizard.c @@ -55,31 +55,22 @@ CanDisableDevice( IN HMACHINE hMachine, OUT BOOL *CanDisable) { -#if 0 - /* hpoussin, Dec 2005. I've disabled this code because - * ntoskrnl never sets the DN_DISABLEABLE flag. - */ CONFIGRET cr; ULONG Status, ProblemNumber; BOOL Ret = FALSE; - cr = CM_Get_DevNode_Status_Ex( - &Status, - &ProblemNumber, - DevInst, - 0, - hMachine); + cr = CM_Get_DevNode_Status_Ex(&Status, + &ProblemNumber, + DevInst, + 0, + hMachine); if (cr == CR_SUCCESS) { *CanDisable = ((Status & DN_DISABLEABLE) != 0); - Ret = TRUE; + Ret = TRUE; } return Ret; -#else - *CanDisable = TRUE; - return TRUE; -#endif } static BOOL diff --git a/reactos/ntoskrnl/io/pnpmgr/plugplay.c b/reactos/ntoskrnl/io/pnpmgr/plugplay.c index a1d8053782e..ea2f8d77ce3 100644 --- a/reactos/ntoskrnl/io/pnpmgr/plugplay.c +++ b/reactos/ntoskrnl/io/pnpmgr/plugplay.c @@ -444,6 +444,9 @@ IopGetDeviceNodeStatus(PDEVICE_NODE DeviceNode) if (DeviceNode->UserFlags & DNUF_DONT_SHOW_IN_UI) Output |= DN_NO_SHOW_IN_DM; + if (!(DeviceNode->UserFlags & DNUF_NOT_DISABLEABLE)) + Output |= DN_DISABLEABLE; + /* FIXME: Implement the rest */ Output |= DN_NT_ENUMERATOR | DN_NT_DRIVER;