- DisplayDevicePropertyText: Use full DWORD value, not just one byte of it (CID 1803).
[WINMM]
- MCI_Close: Use UINT instead of UINT16 for the device id (CID 1804).

svn path=/trunk/; revision=50080
This commit is contained in:
Roel Messiant 2010-12-21 14:58:13 +00:00
parent 018e160fdf
commit 2b69f5fa2c
2 changed files with 25 additions and 22 deletions

View file

@ -720,6 +720,7 @@ DisplayDevicePropertyText(IN PDEVADVPROP_INFO dap,
PSP_DEVINFO_DATA DeviceInfoData; PSP_DEVINFO_DATA DeviceInfoData;
DWORD dwType; DWORD dwType;
DWORD dwSize; DWORD dwSize;
DWORD dwValue;
LPBYTE lpBuffer; LPBYTE lpBuffer;
LPWSTR lpStr; LPWSTR lpStr;
INT len; INT len;
@ -791,58 +792,60 @@ DisplayDevicePropertyText(IN PDEVADVPROP_INFO dap,
} }
else if (dwType == REG_DWORD) else if (dwType == REG_DWORD)
{ {
dwValue = *(DWORD *) lpBuffer;
switch (dwProperty) switch (dwProperty)
{ {
case SPDRP_CAPABILITIES: case SPDRP_CAPABILITIES:
index = 0; index = 0;
if (*lpBuffer & CM_DEVCAP_LOCKSUPPORTED) if (dwValue & CM_DEVCAP_LOCKSUPPORTED)
SetListViewText(hwndListView, index++, L"CM_DEVCAP_LOCKSUPPORTED"); SetListViewText(hwndListView, index++, L"CM_DEVCAP_LOCKSUPPORTED");
if (*lpBuffer & CM_DEVCAP_EJECTSUPPORTED) if (dwValue & CM_DEVCAP_EJECTSUPPORTED)
SetListViewText(hwndListView, index++, L"CM_DEVCAP_EJECTSUPPORTED"); SetListViewText(hwndListView, index++, L"CM_DEVCAP_EJECTSUPPORTED");
if (*lpBuffer & CM_DEVCAP_REMOVABLE) if (dwValue & CM_DEVCAP_REMOVABLE)
SetListViewText(hwndListView, index++, L"CM_DEVCAP_REMOVABLE"); SetListViewText(hwndListView, index++, L"CM_DEVCAP_REMOVABLE");
if (*lpBuffer & CM_DEVCAP_DOCKDEVICE) if (dwValue & CM_DEVCAP_DOCKDEVICE)
SetListViewText(hwndListView, index++, L"CM_DEVCAP_DOCKDEVICE"); SetListViewText(hwndListView, index++, L"CM_DEVCAP_DOCKDEVICE");
if (*lpBuffer & CM_DEVCAP_UNIQUEID) if (dwValue & CM_DEVCAP_UNIQUEID)
SetListViewText(hwndListView, index++, L"CM_DEVCAP_UNIQUEID"); SetListViewText(hwndListView, index++, L"CM_DEVCAP_UNIQUEID");
if (*lpBuffer & CM_DEVCAP_SILENTINSTALL) if (dwValue & CM_DEVCAP_SILENTINSTALL)
SetListViewText(hwndListView, index++, L"CM_DEVCAP_SILENTINSTALL"); SetListViewText(hwndListView, index++, L"CM_DEVCAP_SILENTINSTALL");
if (*lpBuffer & CM_DEVCAP_RAWDEVICEOK) if (dwValue & CM_DEVCAP_RAWDEVICEOK)
SetListViewText(hwndListView, index++, L"CM_DEVCAP_RAWDEVICEOK"); SetListViewText(hwndListView, index++, L"CM_DEVCAP_RAWDEVICEOK");
if (*lpBuffer & CM_DEVCAP_SURPRISEREMOVALOK) if (dwValue & CM_DEVCAP_SURPRISEREMOVALOK)
SetListViewText(hwndListView, index++, L"CM_DEVCAP_SURPRISEREMOVALOK"); SetListViewText(hwndListView, index++, L"CM_DEVCAP_SURPRISEREMOVALOK");
if (*lpBuffer & CM_DEVCAP_HARDWAREDISABLED) if (dwValue & CM_DEVCAP_HARDWAREDISABLED)
SetListViewText(hwndListView, index++, L"CM_DEVCAP_HARDWAREDISABLED"); SetListViewText(hwndListView, index++, L"CM_DEVCAP_HARDWAREDISABLED");
if (*lpBuffer & CM_DEVCAP_NONDYNAMIC) if (dwValue & CM_DEVCAP_NONDYNAMIC)
SetListViewText(hwndListView, index++, L"CM_DEVCAP_NONDYNAMIC"); SetListViewText(hwndListView, index++, L"CM_DEVCAP_NONDYNAMIC");
break; break;
case SPDRP_CONFIGFLAGS: case SPDRP_CONFIGFLAGS:
index = 0; index = 0;
if (*lpBuffer & CONFIGFLAG_DISABLED) if (dwValue & CONFIGFLAG_DISABLED)
SetListViewText(hwndListView, index++, L"CONFIGFLAG_DISABLED"); SetListViewText(hwndListView, index++, L"CONFIGFLAG_DISABLED");
if (*lpBuffer & CONFIGFLAG_REMOVED) if (dwValue & CONFIGFLAG_REMOVED)
SetListViewText(hwndListView, index++, L"CONFIGFLAG_REMOVED"); SetListViewText(hwndListView, index++, L"CONFIGFLAG_REMOVED");
if (*lpBuffer & CONFIGFLAG_MANUAL_INSTALL) if (dwValue & CONFIGFLAG_MANUAL_INSTALL)
SetListViewText(hwndListView, index++, L"CONFIGFLAG_MANUAL_INSTALL"); SetListViewText(hwndListView, index++, L"CONFIGFLAG_MANUAL_INSTALL");
if (*lpBuffer & CONFIGFLAG_IGNORE_BOOT_LC) if (dwValue & CONFIGFLAG_IGNORE_BOOT_LC)
SetListViewText(hwndListView, index++, L"CONFIGFLAG_IGNORE_BOOT_LC"); SetListViewText(hwndListView, index++, L"CONFIGFLAG_IGNORE_BOOT_LC");
if (*lpBuffer & CONFIGFLAG_NET_BOOT) if (dwValue & CONFIGFLAG_NET_BOOT)
SetListViewText(hwndListView, index++, L"CONFIGFLAG_NET_BOOT"); SetListViewText(hwndListView, index++, L"CONFIGFLAG_NET_BOOT");
if (*lpBuffer & CONFIGFLAG_REINSTALL) if (dwValue & CONFIGFLAG_REINSTALL)
SetListViewText(hwndListView, index++, L"CONFIGFLAG_REINSTALL"); SetListViewText(hwndListView, index++, L"CONFIGFLAG_REINSTALL");
if (*lpBuffer & CONFIGFLAG_FAILEDINSTALL) if (dwValue & CONFIGFLAG_FAILEDINSTALL)
SetListViewText(hwndListView, index++, L"CONFIGFLAG_FAILEDINSTALL"); SetListViewText(hwndListView, index++, L"CONFIGFLAG_FAILEDINSTALL");
if (*lpBuffer & CONFIGFLAG_CANTSTOPACHILD) if (dwValue & CONFIGFLAG_CANTSTOPACHILD)
SetListViewText(hwndListView, index++, L"CONFIGFLAG_CANTSTOPACHILD"); SetListViewText(hwndListView, index++, L"CONFIGFLAG_CANTSTOPACHILD");
if (*lpBuffer & CONFIGFLAG_OKREMOVEROM) if (dwValue & CONFIGFLAG_OKREMOVEROM)
SetListViewText(hwndListView, index++, L"CONFIGFLAG_OKREMOVEROM"); SetListViewText(hwndListView, index++, L"CONFIGFLAG_OKREMOVEROM");
if (*lpBuffer & CONFIGFLAG_NOREMOVEEXIT) if (dwValue & CONFIGFLAG_NOREMOVEEXIT)
SetListViewText(hwndListView, index++, L"CONFIGFLAG_NOREMOVEEXIT"); SetListViewText(hwndListView, index++, L"CONFIGFLAG_NOREMOVEEXIT");
break; break;
default: default:
swprintf(dap->szTemp, L"0x%08x", *lpBuffer); swprintf(dap->szTemp, L"0x%08lx", dwValue);
SetListViewText(hwndListView, 0, dap->szTemp); SetListViewText(hwndListView, 0, dap->szTemp);
break; break;
} }

View file

@ -1669,7 +1669,7 @@ errCleanUp:
/************************************************************************** /**************************************************************************
* MCI_Close [internal] * MCI_Close [internal]
*/ */
static DWORD MCI_Close(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms) static DWORD MCI_Close(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
{ {
DWORD dwRet; DWORD dwRet;
LPWINE_MCIDRIVER wmd; LPWINE_MCIDRIVER wmd;