OLD | NEW |
1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
2 | 2 |
3 #include <Wbemidl.h> | 3 #include <Wbemidl.h> |
4 #include <time.h> | 4 #include <time.h> |
5 #include "PluginSettings.h" | 5 #include "PluginSettings.h" |
6 #include "PluginClient.h" | 6 #include "PluginClient.h" |
7 #include "PluginSystem.h" | 7 #include "PluginSystem.h" |
8 #include "PluginFilter.h" | 8 #include "PluginFilter.h" |
9 #include "PluginMutex.h" | 9 #include "PluginMutex.h" |
10 #include "../shared/Utils.h" | 10 #include "../shared/Utils.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 ReadWhitelist(true); | 224 ReadWhitelist(true); |
225 } | 225 } |
226 | 226 |
227 return true; | 227 return true; |
228 } | 228 } |
229 | 229 |
230 DWORD CPluginSettings::GetWindowsBuildNumber() | 230 DWORD CPluginSettings::GetWindowsBuildNumber() |
231 { | 231 { |
232 if (m_WindowsBuildNumber == 0) | 232 if (m_WindowsBuildNumber == 0) |
233 { | 233 { |
234 OSVERSIONINFOEX osvi; | 234 OSVERSIONINFOEX osvi = {}; |
235 SYSTEM_INFO si; | 235 osvi.dwOSVersionInfoSize = sizeof(osvi); |
236 BOOL bOsVersionInfoEx; | 236 if (GetVersionExW(reinterpret_cast<OSVERSIONINFO*>(&osvi)) != 0) |
237 | 237 { |
238 ZeroMemory(&si, sizeof(SYSTEM_INFO)); | 238 m_WindowsBuildNumber = osvi.dwBuildNumber; |
239 ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); | 239 } |
240 | |
241 osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); | |
242 bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO*) &osvi); | |
243 | |
244 m_WindowsBuildNumber = osvi.dwBuildNumber; | |
245 } | 240 } |
246 | 241 |
247 return m_WindowsBuildNumber; | 242 return m_WindowsBuildNumber; |
248 } | 243 } |
249 | 244 |
250 void CPluginSettings::SetSubscription(const std::wstring& url) | 245 void CPluginSettings::SetSubscription(const std::wstring& url) |
251 { | 246 { |
252 CPluginClient::GetInstance()->SetSubscription(url); | 247 CPluginClient::GetInstance()->SetSubscription(url); |
253 RefreshWhitelist(); | 248 RefreshWhitelist(); |
254 } | 249 } |
(...skipping 15 matching lines...) Expand all Loading... |
270 | 265 |
271 CString CPluginSettings::GetAppLocale() | 266 CString CPluginSettings::GetAppLocale() |
272 { | 267 { |
273 return to_CString(GetBrowserLanguage()); | 268 return to_CString(GetBrowserLanguage()); |
274 } | 269 } |
275 | 270 |
276 CString CPluginSettings::GetDocumentationLink() | 271 CString CPluginSettings::GetDocumentationLink() |
277 { | 272 { |
278 return CString(CPluginClient::GetInstance()->GetDocumentationLink().c_str()); | 273 return CString(CPluginClient::GetInstance()->GetDocumentationLink().c_str()); |
279 } | 274 } |
OLD | NEW |