| 16 | } |
| 17 | |
| 18 | std::unique_ptr<DeviceManager> DeviceManager::Create(const wchar_t* computerName /* = nullptr */, |
| 19 | const GUID* classGuid, |
| 20 | const wchar_t* enumerator /* = nullptr */, InfoSetOptions options /* = InfoSetOptions::Present | InfoSetOptions::AllClasses */) { |
| 21 | auto dm = new DeviceManager(computerName, classGuid, enumerator, options); |
| 22 | if (dm->_hInfoSet) |
| 23 | return std::unique_ptr<DeviceManager>(dm); |
| 24 | delete dm; |
| 25 | return nullptr; |
| 26 | } |
| 27 | |
| 28 | std::vector<DeviceInfo> DeviceManager::EnumDevices() { |
| 29 | std::vector<DeviceInfo> devices; |
no outgoing calls
no test coverage detected