tweak windows pingback
authorRobin Gareus <robin@gareus.org>
Sat, 11 Jul 2015 20:35:59 +0000 (22:35 +0200)
committerRobin Gareus <robin@gareus.org>
Sat, 11 Jul 2015 20:35:59 +0000 (22:35 +0200)
gtk2_ardour/pingback.cc

index 21e1b1210910cc9cc5b6b6776715fc2f8d8b9675..223497cbffcfcdb1522d72dfaf2fa750ef832b7b 100644 (file)
@@ -25,6 +25,7 @@
 
 #ifdef PLATFORM_WINDOWS
 #include <windows.h>
+#include <glibmm.h>
 #else
 #include <sys/utsname.h>
 #endif
@@ -145,8 +146,9 @@ _pingback (void *arg)
        HKEY key;
        DWORD size = PATH_MAX;
        char tmp[PATH_MAX+1];
-       if (   (ERROR_SUCCESS == RegOpenKeyExA (HKEY_LOCAL_MACHINE, "Hardware\\Description\\System\\CentralProcessor", 0, KEY_READ, &key))
-           && (ERROR_SUCCESS == RegQueryValueExA (key, "0", 0, NULL, reinterpret_cast<LPBYTE>(tmp), &size))
+       if (   (ERROR_SUCCESS == RegOpenKeyExA (HKEY_LOCAL_MACHINE, "Hardware\\Description\\System\\CentralProcessor\\0", 0, KEY_READ, &key))
+           && (ERROR_SUCCESS == RegQueryValueExA (key, "Identifier", 0, NULL, reinterpret_cast<LPBYTE>(tmp), &size))
+                       // or "ProcessorNameString"
                 )
        {
                string s = Glib::locale_to_utf8 (tmp);
@@ -167,7 +169,7 @@ _pingback (void *arg)
 # endif
 
 #ifndef NDEBUG
-       cerr << "Pingback: " << url << endl;
+       std::cerr << "Pingback: " << url << std::endl;
 #endif
 
 #endif /* PLATFORM_WINDOWS */