-/*\r
-* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
-*\r
-* This file is part of CasparCG (www.casparcg.com).\r
-*\r
-* CasparCG is free software: you can redistribute it and/or modify\r
-* it under the terms of the GNU General Public License as published by\r
-* the Free Software Foundation, either version 3 of the License, or\r
-* (at your option) any later version.\r
-*\r
-* CasparCG is distributed in the hope that it will be useful,\r
-* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-* GNU General Public License for more details.\r
-*\r
-* You should have received a copy of the GNU General Public License\r
-* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.\r
-*\r
-* Author: Robert Nagy, ronag89@gmail.com\r
-*/\r
-\r
-#pragma once\r
-\r
-#include "windows.h"\r
-\r
-#include <string>\r
-#include <sstream>\r
-\r
-namespace caspar {\r
- \r
-static std::wstring cpu_info()\r
-{\r
- std::wstring cpu_name = L"Unknown CPU";\r
- HKEY hkey; \r
- DWORD dwType, dwSize;\r
- if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0"), 0, KEY_QUERY_VALUE, &hkey) == ERROR_SUCCESS)\r
- {\r
- wchar_t p_name_str[1024];\r
-\r
- dwType = REG_SZ;\r
- dwSize = sizeof(p_name_str);\r
-\r
- if(RegQueryValueEx(hkey, TEXT("ProcessorNameString"), NULL, &dwType, (PBYTE)&p_name_str, &dwSize) == ERROR_SUCCESS) \r
- cpu_name = p_name_str; \r
- \r
- RegCloseKey(hkey);\r
- }\r
-\r
-\r
- SYSTEM_INFO sysinfo;\r
- GetSystemInfo(&sysinfo);\r
-\r
- std::wstringstream s;\r
-\r
- s << cpu_name << L" Physical Threads: " << sysinfo.dwNumberOfProcessors;\r
-\r
- return s.str();\r
-}\r
-\r
-static std::wstring system_product_name()\r
-{\r
- std::wstring system_product_name = L"Unknown System";\r
- HKEY hkey; \r
- DWORD dwType, dwSize;\r
- if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("HARDWARE\\DESCRIPTION\\System\\BIOS"), 0, KEY_QUERY_VALUE, &hkey) == ERROR_SUCCESS)\r
- {\r
- wchar_t p_name_str[1024];\r
-\r
- dwType = REG_SZ;\r
- dwSize = sizeof(p_name_str);\r
-\r
- if(RegQueryValueEx(hkey, TEXT("SystemProductName"), NULL, &dwType, (PBYTE)&p_name_str, &dwSize) == ERROR_SUCCESS) \r
- system_product_name = p_name_str; \r
- \r
- RegCloseKey(hkey);\r
- }\r
-\r
- return system_product_name;\r
-}\r
-\r
-\r
+/*
+* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>
+*
+* This file is part of CasparCG (www.casparcg.com).
+*
+* CasparCG is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* CasparCG is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
+*
+* Author: Robert Nagy, ronag89@gmail.com
+*/
+
+#pragma once
+
+#include "windows.h"
+
+#include <string>
+#include <sstream>
+
+namespace caspar {
+
+static std::wstring cpu_info()
+{
+ std::wstring cpu_name = L"Unknown CPU";
+ HKEY hkey;
+ DWORD dwType, dwSize;
+ if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0"), 0, KEY_QUERY_VALUE, &hkey) == ERROR_SUCCESS)
+ {
+ wchar_t p_name_str[1024];
+
+ dwType = REG_SZ;
+ dwSize = sizeof(p_name_str);
+
+ if(RegQueryValueEx(hkey, TEXT("ProcessorNameString"), NULL, &dwType, (PBYTE)&p_name_str, &dwSize) == ERROR_SUCCESS)
+ cpu_name = p_name_str;
+
+ RegCloseKey(hkey);
+ }
+
+
+ SYSTEM_INFO sysinfo;
+ GetSystemInfo(&sysinfo);
+
+ std::wstringstream s;
+
+ s << cpu_name << L" Physical Threads: " << sysinfo.dwNumberOfProcessors;
+
+ return s.str();
+}
+
+static std::wstring system_product_name()
+{
+ std::wstring system_product_name = L"Unknown System";
+ HKEY hkey;
+ DWORD dwType, dwSize;
+ if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("HARDWARE\\DESCRIPTION\\System\\BIOS"), 0, KEY_QUERY_VALUE, &hkey) == ERROR_SUCCESS)
+ {
+ wchar_t p_name_str[1024];
+
+ dwType = REG_SZ;
+ dwSize = sizeof(p_name_str);
+
+ if(RegQueryValueEx(hkey, TEXT("SystemProductName"), NULL, &dwType, (PBYTE)&p_name_str, &dwSize) == ERROR_SUCCESS)
+ system_product_name = p_name_str;
+
+ RegCloseKey(hkey);
+ }
+
+ return system_product_name;
+}
+
+
}
\ No newline at end of file