diff options
| -rw-r--r-- | windows/windns/src/windns/netconfighelpers.cpp | 7 | ||||
| -rw-r--r-- | windows/windns/src/windns/netconfighelpers.h | 5 |
2 files changed, 2 insertions, 10 deletions
diff --git a/windows/windns/src/windns/netconfighelpers.cpp b/windows/windns/src/windns/netconfighelpers.cpp index 701cfcce6f..a793ff2484 100644 --- a/windows/windns/src/windns/netconfighelpers.cpp +++ b/windows/windns/src/windns/netconfighelpers.cpp @@ -9,11 +9,6 @@ namespace nchelpers { -std::wstring GetConfigId(CComPtr<IWbemClassObject> instance) -{ - return ComConvertString(V_BSTR(&ComGetPropertyAlways(instance, L"SettingID"))); -} - OptionalStringList GetDnsServers(CComPtr<IWbemClassObject> instance) { OptionalStringList result; @@ -25,7 +20,7 @@ OptionalStringList GetDnsServers(CComPtr<IWbemClassObject> instance) return result; } - result = std::make_unique<std::vector<std::wstring> >( + result = std::make_shared<std::vector<std::wstring> >( ComConvertStringArray(V_ARRAY(&servers))); return result; diff --git a/windows/windns/src/windns/netconfighelpers.h b/windows/windns/src/windns/netconfighelpers.h index 6949eced7e..42602b1b9f 100644 --- a/windows/windns/src/windns/netconfighelpers.h +++ b/windows/windns/src/windns/netconfighelpers.h @@ -10,10 +10,7 @@ namespace nchelpers { -// instance = Win32_NetworkAdapterConfiguration -std::wstring GetConfigId(CComPtr<IWbemClassObject> instance); - -using OptionalStringList = std::unique_ptr<std::vector<std::wstring> >; +using OptionalStringList = std::shared_ptr<std::vector<std::wstring> >; // instance = Win32_NetworkAdapterConfiguration OptionalStringList GetDnsServers(CComPtr<IWbemClassObject> instance); |
