don't tell the user the device is working properly when the drivers aren't even installed

svn path=/trunk/; revision=19807
This commit is contained in:
Thomas Bluemel 2005-12-01 21:17:25 +00:00
parent 7ad7b11cd0
commit 3c3c3ff8f8
4 changed files with 17 additions and 15 deletions

View file

@ -15,6 +15,7 @@ BEGIN
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

View file

@ -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 @@ UpdateDevInfo(IN HWND hwndDlg,
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 */

View file

@ -452,6 +452,11 @@ GetDeviceStatusString(IN DEVINST DevInst,
szBuffer[0] = L'\0';
if (ProblemNumber == 0)
{
if (!(Status & DN_DRIVER_LOADED))
{
MessageId = IDS_NODRIVERLOADED;
}
goto UnknownProblem;
}
else

View file

@ -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