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 osvi.dwOSVersionInfoSize = sizeof(osvi); | 235 SYSTEM_INFO si; |
236 if (GetVersionExW(reinterpret_cast<OSVERSIONINFO*>(&osvi)) != 0) | 236 BOOL bOsVersionInfoEx; |
237 { | 237 |
238 m_WindowsBuildNumber = osvi.dwBuildNumber; | 238 ZeroMemory(&si, sizeof(SYSTEM_INFO)); |
239 } | 239 ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); |
| 240 |
| 241 osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); |
| 242 bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO*) &osvi); |
| 243 |
| 244 m_WindowsBuildNumber = osvi.dwBuildNumber; |
240 } | 245 } |
241 | 246 |
242 return m_WindowsBuildNumber; | 247 return m_WindowsBuildNumber; |
243 } | 248 } |
244 | 249 |
245 void CPluginSettings::SetSubscription(const std::wstring& url) | 250 void CPluginSettings::SetSubscription(const std::wstring& url) |
246 { | 251 { |
247 CPluginClient::GetInstance()->SetSubscription(url); | 252 CPluginClient::GetInstance()->SetSubscription(url); |
248 RefreshWhitelist(); | 253 RefreshWhitelist(); |
249 } | 254 } |
(...skipping 15 matching lines...) Expand all Loading... |
265 | 270 |
266 CString CPluginSettings::GetAppLocale() | 271 CString CPluginSettings::GetAppLocale() |
267 { | 272 { |
268 return to_CString(GetBrowserLanguage()); | 273 return to_CString(GetBrowserLanguage()); |
269 } | 274 } |
270 | 275 |
271 CString CPluginSettings::GetDocumentationLink() | 276 CString CPluginSettings::GetDocumentationLink() |
272 { | 277 { |
273 return CString(CPluginClient::GetInstance()->GetDocumentationLink().c_str()); | 278 return CString(CPluginClient::GetInstance()->GetDocumentationLink().c_str()); |
274 } | 279 } |
OLD | NEW |