Author: cgutman
Date: Mon Mar 26 23:33:49 2012
New Revision: 56241
URL:
http://svn.reactos.org/svn/reactos?rev=56241&view=rev
Log:
[NTOSKRNL]
- Set DN_DISABLEABLE if the device can be disabled
[NEWDEV]
- Remove a hack needed because DN_DISABLEABLE was never set
Modified:
trunk/reactos/dll/win32/newdev/wizard.c
trunk/reactos/ntoskrnl/io/pnpmgr/plugplay.c
Modified: trunk/reactos/dll/win32/newdev/wizard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/newdev/wizard.c?…
==============================================================================
--- trunk/reactos/dll/win32/newdev/wizard.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/newdev/wizard.c [iso-8859-1] Mon Mar 26 23:33:49 2012
@@ -55,31 +55,22 @@
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
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/plugplay.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/plugpla…
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/plugplay.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/plugplay.c [iso-8859-1] Mon Mar 26 23:33:49 2012
@@ -443,6 +443,9 @@
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 */