- Display the 'Enumerator' property.

svn path=/trunk/; revision=44921
This commit is contained in:
Eric Kohl
2010-01-03 22:41:13 +00:00
parent 2f017b2356
commit c5577e9149
2 changed files with 40 additions and 5 deletions
+2 -2
View File
@@ -667,11 +667,11 @@ DWORD PNP_GetDeviceRegProp(
case CM_DRP_BUSNUMBER:
PlugPlayData.Property = DevicePropertyBusNumber;
break;
#endif
case CM_DRP_ENUMERATOR_NAME:
PlugPlayData.Property = DevicePropertyEnumeratorName;
PlugPlayData.Property = 15; //DevicePropertyEnumeratorName;
break;
#endif
default:
return CR_INVALID_PROPERTY;
+38 -3
View File
@@ -791,6 +791,39 @@ DisplayDevNodeFlags(IN PDEVADVPROP_INFO dap,
// SetListViewText(hwndListView, 0, dap->szTemp);
}
static VOID
DisplayDevNodeEnumerator(IN PDEVADVPROP_INFO dap,
IN HWND hwndListView)
{
HDEVINFO DeviceInfoSet;
PSP_DEVINFO_DATA DeviceInfoData;
DWORD dwType = 0;
WCHAR szBuffer[256];
DWORD dwSize = 256 * sizeof(WCHAR);
if (dap->CurrentDeviceInfoSet != INVALID_HANDLE_VALUE)
{
DeviceInfoSet = dap->CurrentDeviceInfoSet;
DeviceInfoData = &dap->CurrentDeviceInfoData;
}
else
{
DeviceInfoSet = dap->DeviceInfoSet;
DeviceInfoData = &dap->DeviceInfoData;
}
CM_Get_DevNode_Registry_Property_ExW(DeviceInfoData->DevInst,
CM_DRP_ENUMERATOR_NAME,
&dwType,
&szBuffer,
&dwSize,
0,
dap->hMachine);
SetListViewText(hwndListView, 0, szBuffer);
}
static VOID
@@ -840,9 +873,11 @@ DisplayDeviceProperties(IN PDEVADVPROP_INFO dap,
break;
case 5: /* Enumerator */
DisplayDevicePropertyText(dap,
hwndListView,
SPDRP_ENUMERATOR_NAME);
DisplayDevNodeEnumerator(dap,
hwndListView);
// DisplayDevicePropertyText(dap,
// hwndListView,
// SPDRP_ENUMERATOR_NAME);
break;
case 6: /* Capabilities */