| 105 | } |
| 106 | |
| 107 | std::vector<std::wstring> WinSys::DeviceManager::GetDeviceRegistryPropertyMultiString(const DeviceInfo& di, DeviceRegistryPropertyType type) { |
| 108 | std::vector<std::wstring> result; |
| 109 | WCHAR buffer[1 << 12]; |
| 110 | DWORD regType; |
| 111 | auto ok = ::SetupDiGetDeviceRegistryProperty(_hInfoSet.get(), (PSP_DEVINFO_DATA)&di.Data, |
| 112 | static_cast<DWORD>(type), ®Type, (BYTE*)buffer, sizeof(buffer), nullptr); |
| 113 | if (!ok) |
| 114 | return result; |
| 115 | |
| 116 | assert(regType == REG_MULTI_SZ); |
| 117 | for (auto p = buffer; *p;) { |
| 118 | result.push_back(p); |
| 119 | p += ::wcslen(p) + 1; |
| 120 | } |
| 121 | return result; |
| 122 | } |
| 123 | |
| 124 | std::wstring WinSys::DeviceManager::GetDeviceClassRegistryPropertyString(const GUID* guid, DeviceClassRegistryPropertyType type) { |
| 125 | DWORD regType; |
no test coverage detected