don't tell the user the device is working properly when the drivers
aren't even installed
Modified: trunk/reactos/lib/devmgr/En.rc
Modified: trunk/reactos/lib/devmgr/advprop.c
Modified: trunk/reactos/lib/devmgr/misc.c
Modified: trunk/reactos/lib/devmgr/resource.h
_____
Modified: trunk/reactos/lib/devmgr/En.rc
--- trunk/reactos/lib/devmgr/En.rc 2005-12-01 21:17:13 UTC (rev
19806)
+++ trunk/reactos/lib/devmgr/En.rc 2005-12-01 21:17:25 UTC (rev
19807)
@@ -15,6 +15,7 @@
IDS_ENABLEDEVICE "Use this device (enable)"
IDS_DISABLEDEVICE "Do not use this device (disable)"
IDS_UNKNOWNDEVICE "Unknown device"
+ IDS_NODRIVERLOADED "No drivers are installed for this device."
END
STRINGTABLE
_____
Modified: trunk/reactos/lib/devmgr/advprop.c
--- trunk/reactos/lib/devmgr/advprop.c 2005-12-01 21:17:13 UTC (rev
19806)
+++ trunk/reactos/lib/devmgr/advprop.c 2005-12-01 21:17:25 UTC (rev
19807)
@@ -30,8 +30,6 @@
#define NDEBUG
#include <debug.h>
-#define DPN_DEVICEUPDATE (WM_USER + 0x1000)
-
typedef INT_PTR (WINAPI *PPROPERTYSHEETW)(LPCPROPSHEETHEADERW);
typedef HPROPSHEETPAGE (WINAPI
*PCREATEPROPERTYSHEETPAGEW)(LPCPROPSHEETPAGEW);
typedef BOOL (WINAPI *PDESTROYPROPERTYSHEETPAGE)(HPROPSHEETPAGE);
@@ -437,21 +435,18 @@
dap->CanDisable = FALSE;
dap->DeviceEnabled = FALSE;
- if (dap->DeviceInfoSet != INVALID_HANDLE_VALUE)
+ if (CanDisableDevice(dap->DeviceInfoData.DevInst,
+ dap->hMachine,
+ &bFlag))
{
- if (CanDisableDevice(dap->DeviceInfoData.DevInst,
- dap->hMachine,
- &bFlag))
- {
- dap->CanDisable = bFlag;
- }
+ dap->CanDisable = bFlag;
+ }
- if (IsDeviceEnabled(dap->DeviceInfoData.DevInst,
- dap->hMachine,
- &bFlag))
- {
- dap->DeviceEnabled = bFlag;
- }
+ if (IsDeviceEnabled(dap->DeviceInfoData.DevInst,
+ dap->hMachine,
+ &bFlag))
+ {
+ dap->DeviceEnabled = bFlag;
}
/* enable/disable the device usage controls */
_____
Modified: trunk/reactos/lib/devmgr/misc.c
--- trunk/reactos/lib/devmgr/misc.c 2005-12-01 21:17:13 UTC (rev
19806)
+++ trunk/reactos/lib/devmgr/misc.c 2005-12-01 21:17:25 UTC (rev
19807)
@@ -452,6 +452,11 @@
szBuffer[0] = L'\0';
if (ProblemNumber == 0)
{
+ if (!(Status & DN_DRIVER_LOADED))
+ {
+ MessageId = IDS_NODRIVERLOADED;
+ }
+
goto UnknownProblem;
}
else
_____
Modified: trunk/reactos/lib/devmgr/resource.h
--- trunk/reactos/lib/devmgr/resource.h 2005-12-01 21:17:13 UTC (rev
19806)
+++ trunk/reactos/lib/devmgr/resource.h 2005-12-01 21:17:25 UTC (rev
19807)
@@ -36,6 +36,7 @@
#define IDS_ENABLEDEVICE 0x108
#define IDS_DISABLEDEVICE 0x109
#define IDS_UNKNOWNDEVICE 0x10A
+#define IDS_NODRIVERLOADED 0x10B
#define IDS_DEV_NO_PROBLEM 0x200
#define IDS_DEV_NOT_CONFIGURED 0x201
Show replies by date