[ros-diffs] [ekohl] 44813: [umpnpmgr] Move device instance action constants into the idf file and use them instead of hardcoded values.

ekohl at svn.reactos.org ekohl at svn.reactos.org
Wed Dec 30 14:57:47 CET 2009


Author: ekohl
Date: Wed Dec 30 14:57:47 2009
New Revision: 44813

URL: http://svn.reactos.org/svn/reactos?rev=44813&view=rev
Log:
[umpnpmgr]
Move device instance action constants into the idf file and use them instead of hardcoded values.

Modified:
    trunk/reactos/base/services/umpnpmgr/umpnpmgr.c
    trunk/reactos/dll/win32/setupapi/cfgmgr.c
    trunk/reactos/include/reactos/idl/pnp.idl

Modified: trunk/reactos/base/services/umpnpmgr/umpnpmgr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/umpnpmgr/umpnpmgr.c?rev=44813&r1=44812&r2=44813&view=diff
==============================================================================
--- trunk/reactos/base/services/umpnpmgr/umpnpmgr.c [iso-8859-1] (original)
+++ trunk/reactos/base/services/umpnpmgr/umpnpmgr.c [iso-8859-1] Wed Dec 30 14:57:47 2009
@@ -1086,9 +1086,6 @@
 
 
 /* Function 29 */
-#define PNP_DEVINST_SETUP       0x3
-#define PNP_DEVINST_ENABLE      0x4
-#define PNP_DEVINST_REENUMERATE 0x7
 DWORD PNP_DeviceInstanceAction(
     handle_t hBinding,
     DWORD ulMajorAction,

Modified: trunk/reactos/dll/win32/setupapi/cfgmgr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/cfgmgr.c?rev=44813&r1=44812&r2=44813&view=diff
==============================================================================
--- trunk/reactos/dll/win32/setupapi/cfgmgr.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/cfgmgr.c [iso-8859-1] Wed Dec 30 14:57:47 2009
@@ -745,7 +745,7 @@
     RpcTryExcept
     {
         ret = PNP_DeviceInstanceAction(BindingHandle,
-                                       5,
+                                       PNP_DEVINST_DISABLE,
                                        ulFlags,
                                        lpDevInst,
                                        NULL);
@@ -844,7 +844,7 @@
     RpcTryExcept
     {
         ret = PNP_DeviceInstanceAction(BindingHandle,
-                                       4,
+                                       PNP_DEVINST_ENABLE,
                                        ulFlags,
                                        lpDevInst,
                                        NULL);
@@ -3044,7 +3044,7 @@
     RpcTryExcept
     {
         ret = PNP_DeviceInstanceAction(BindingHandle,
-                                       2,
+                                       PNP_DEVINST_MOVE,
                                        ulFlags,
                                        lpFromDevInst,
                                        lpToDevInst);
@@ -3301,7 +3301,7 @@
     RpcTryExcept
     {
         ret = PNP_DeviceInstanceAction(BindingHandle,
-                                       7,
+                                       PNP_DEVINST_REENUMERATE,
                                        ulFlags,
                                        lpDevInst,
                                        NULL);
@@ -3935,7 +3935,7 @@
     RpcTryExcept
     {
         ret = PNP_DeviceInstanceAction(BindingHandle,
-                                       3,
+                                       PNP_DEVINST_SETUP,
                                        ulFlags,
                                        lpDevInst,
                                        NULL);

Modified: trunk/reactos/include/reactos/idl/pnp.idl
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/pnp.idl?rev=44813&r1=44812&r2=44813&view=diff
==============================================================================
--- trunk/reactos/include/reactos/idl/pnp.idl [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/idl/pnp.idl [iso-8859-1] Wed Dec 30 14:57:47 2009
@@ -482,6 +482,11 @@
         [in] DWORD ulFlags);
 
     /* Function 29 */
+    cpp_quote("#define PNP_DEVINST_MOVE        0x2")
+    cpp_quote("#define PNP_DEVINST_SETUP       0x3")
+    cpp_quote("#define PNP_DEVINST_ENABLE      0x4")
+    cpp_quote("#define PNP_DEVINST_DISABLE     0x5")
+    cpp_quote("#define PNP_DEVINST_REENUMERATE 0x7")
     DWORD PNP_DeviceInstanceAction(
         [in] handle_t hBinding,
         [in] DWORD ulMajorAction,




More information about the Ros-diffs mailing list