]> git.sesse.net Git - casparcg/blobdiff - common/os/windows/current_version.h
set svn:eol-style native on .h and .cpp files
[casparcg] / common / os / windows / current_version.h
index 94d65ef783890c77e4416b3ec5f730af98779169..14d3d6d1d62594ad6473721141eb924d76ab531f 100644 (file)
@@ -1,73 +1,73 @@
-/*\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
-#define NOMINMAX\r
-#define WIN32_LEAN_AND_MEAN\r
-\r
-#include "windows.h"\r
-\r
-#include <string>\r
-\r
-namespace caspar {\r
-\r
-static std::wstring win_product_name()\r
-{\r
-       std::wstring result = L"Unknown Windows Product Name.";\r
-       HKEY hkey; \r
-       DWORD dwType, dwSize;\r
-       if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"), 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("ProductName"), NULL, &dwType, (PBYTE)&p_name_str, &dwSize) == ERROR_SUCCESS)             \r
-                       result = p_name_str;            \r
-                \r
-               RegCloseKey(hkey);\r
-       }\r
-       return result;\r
-}\r
-\r
-static std::wstring win_sp_version()\r
-{\r
-       std::wstring result =  L"";\r
-       HKEY hkey; \r
-       DWORD dwType, dwSize;\r
-       if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"), 0, KEY_QUERY_VALUE, &hkey) == ERROR_SUCCESS)\r
-       {\r
-               wchar_t csd_ver_str[1024];\r
-\r
-               dwType = REG_SZ;\r
-               dwSize = sizeof(csd_ver_str);\r
-\r
-               if(RegQueryValueEx(hkey, TEXT("CSDVersion"), NULL, &dwType, (PBYTE)&csd_ver_str, &dwSize) == ERROR_SUCCESS)             \r
-                       result = csd_ver_str;\r
-                \r
-               RegCloseKey(hkey);\r
-       }\r
-       return result;\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
+
+#define NOMINMAX
+#define WIN32_LEAN_AND_MEAN
+
+#include "windows.h"
+
+#include <string>
+
+namespace caspar {
+
+static std::wstring win_product_name()
+{
+       std::wstring result = L"Unknown Windows Product Name.";
+       HKEY hkey; 
+       DWORD dwType, dwSize;
+       if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"), 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("ProductName"), NULL, &dwType, (PBYTE)&p_name_str, &dwSize) == ERROR_SUCCESS)             
+                       result = p_name_str;            
+                
+               RegCloseKey(hkey);
+       }
+       return result;
+}
+
+static std::wstring win_sp_version()
+{
+       std::wstring result =  L"";
+       HKEY hkey; 
+       DWORD dwType, dwSize;
+       if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"), 0, KEY_QUERY_VALUE, &hkey) == ERROR_SUCCESS)
+       {
+               wchar_t csd_ver_str[1024];
+
+               dwType = REG_SZ;
+               dwSize = sizeof(csd_ver_str);
+
+               if(RegQueryValueEx(hkey, TEXT("CSDVersion"), NULL, &dwType, (PBYTE)&csd_ver_str, &dwSize) == ERROR_SUCCESS)             
+                       result = csd_ver_str;
+                
+               RegCloseKey(hkey);
+       }
+       return result;
+}
+
 }
\ No newline at end of file