display the "Reinstall Driver" button in case the installation previously failed
authorThomas Bluemel <thomas@reactsoft.com>
Mon, 5 Dec 2005 18:43:49 +0000 (18:43 +0000)
committerThomas Bluemel <thomas@reactsoft.com>
Mon, 5 Dec 2005 18:43:49 +0000 (18:43 +0000)
svn path=/trunk/; revision=19913

reactos/lib/devmgr/En.rc
reactos/lib/devmgr/advprop.c
reactos/lib/devmgr/devprblm.c
reactos/lib/devmgr/resource.h

index be57589..5fdf872 100644 (file)
@@ -19,6 +19,7 @@ BEGIN
     IDS_DEVONPARENT "on %1"
     IDS_TROUBLESHOOTDEV "&Troubleshoot..."
     IDS_ENABLEDEV "E&nable Device"
+    IDS_REINSTALLDRV "Re&install Driver"
 END
 
 STRINGTABLE
index 38f799d..e1de40f 100644 (file)
@@ -470,10 +470,18 @@ GetParentNode:
                                   DeviceInfoData->DevInst,
                                   0,
                                   dap->hMachine);
-    if (cr == CR_SUCCESS &&
-        (Status & DN_HAS_PROBLEM) && ProblemNumber == CM_PROB_DISABLED)
+    if (cr == CR_SUCCESS && (Status & DN_HAS_PROBLEM))
     {
-        TroubleShootStrId = IDS_ENABLEDEV;
+        switch (ProblemNumber)
+        {
+            case CM_PROB_DISABLED:
+                TroubleShootStrId = IDS_ENABLEDEV;
+                break;
+
+            case CM_PROB_FAILED_INSTALL:
+                TroubleShootStrId = IDS_REINSTALLDRV;
+                break;
+        }
     }
 
     if (LoadString(hDllInstance,
index 90186bc..a787c63 100644 (file)
@@ -56,6 +56,12 @@ ShowDeviceProblemWizard(IN HWND hWndParent  OPTIONAL,
                 break;
             }
 
+            case CM_PROB_FAILED_INSTALL:
+            {
+                /* FIXME - display the driver installation wizard */
+                break;
+            }
+
             default:
             {
                 /* FIXME - troubleshoot the device */
index 665c3a2..a97e8f3 100644 (file)
@@ -24,6 +24,7 @@
 #define IDC_PROPERTIES         0x58A
 #define IDC_DEVUSAGELABEL      0x58B
 #define IDC_DEVPROBLEM         0x58C
+#define IDS_REINSTALLDRV       0x58D
 
 #define IDS_NAME               0x100
 #define IDS_TYPE               0x101