[PATCH 0/1] MR9918: Add PNPDeviceId to Win32_PnPEntity
For PnPEntities, the PNPDeviceId is identical to the DeviceId. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9918
From: Stefan Brüns <stefan.bruens@rwth-aachen.de> For PnPEntities, the PNPDeviceId is identical to the DeviceId. --- dlls/wbemprox/builtin.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index ff208fc7953..5101f971b33 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -382,6 +382,7 @@ static const struct column col_pnpentity[] = { L"Manufacturer", CIM_STRING }, { L"Name", CIM_STRING|COL_FLAG_DYNAMIC }, { L"Service", CIM_STRING|COL_FLAG_DYNAMIC }, + { L"PNPDeviceId", CIM_STRING|COL_FLAG_DYNAMIC }, }; static const struct column col_printer[] = { @@ -962,6 +963,7 @@ struct record_pnpentity const WCHAR *manufacturer; const WCHAR *name; const WCHAR *service; + const WCHAR *pnpdevice_id; }; struct record_printer { @@ -3657,6 +3659,7 @@ static enum fill_status fill_pnpentity( struct table *table, const struct expr * rec->caption = entities[i].caption; rec->class_guid = entities[i].class_guid; rec->device_id = entities[i].device_id; + rec->pnpdevice_id = entities[i].device_id; rec->manufacturer = entities[i].manufacturer; rec->name = entities[i].name; rec->service = entities[i].service; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9918
Hans Leidekker (@hans) commented about dlls/wbemprox/builtin.c:
{ L"Manufacturer", CIM_STRING }, { L"Name", CIM_STRING|COL_FLAG_DYNAMIC }, { L"Service", CIM_STRING|COL_FLAG_DYNAMIC }, + { L"PNPDeviceId", CIM_STRING|COL_FLAG_DYNAMIC },
Please keep properties sorted here and elsewhere. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9918#note_127296
Hans Leidekker (@hans) commented about dlls/wbemprox/builtin.c:
rec->caption = entities[i].caption; rec->class_guid = entities[i].class_guid; rec->device_id = entities[i].device_id; + rec->pnpdevice_id = entities[i].device_id;
This will cause rec->device_id to be freed twice when the object is released. You need to handle pnpdevice_id the same as device_id in get_pnp_entities(). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9918#note_127297
participants (3)
-
Hans Leidekker (@hans) -
Stefan Brüns -
Stefan Brüns (@StefanBruens)