MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / GetDeviceRegistryPropertyString

Method GetDeviceRegistryPropertyString

WinSysCore/DeviceManager.cpp:94–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94std::wstring WinSys::DeviceManager::GetDeviceRegistryPropertyString(const DeviceInfo& di, DeviceRegistryPropertyType type) {
95 std::wstring result;
96 result.resize(256);
97
98 DWORD regType;
99 if (::SetupDiGetDeviceRegistryProperty(_hInfoSet.get(), (PSP_DEVINFO_DATA)&di.Data, static_cast<DWORD>(type), &regType,
100 (BYTE*)result.data(), DWORD(result.size() * sizeof(wchar_t)), nullptr)) {
101 assert(regType == REG_SZ);
102 return result;
103 }
104 return L"";
105}
106
107std::vector<std::wstring> WinSys::DeviceManager::GetDeviceRegistryPropertyMultiString(const DeviceInfo& di, DeviceRegistryPropertyType type) {
108 std::vector<std::wstring> result;

Callers 1

GetDevicePropertyMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected