Browse code

Use the system GUID on Windows systems

Shawn Webb authored on 2013/11/01 04:48:02
Showing 1 changed files
... ...
@@ -13,6 +13,9 @@
13 13
 #if !defined(_WIN32)
14 14
 #include <sys/sysctl.h>
15 15
 #include <dlfcn.h>
16
+#else
17
+#include <Windows.h>
18
+#include <tchar.h>
16 19
 #endif
17 20
 
18 21
 #ifdef CL_THREAD_SAFE
... ...
@@ -374,7 +377,12 @@ size_t clamav_stats_get_size(void *cbdata)
374 374
 #if defined(_WIN32)
375 375
 char *clamav_stats_get_hostid(void *cbdata)
376 376
 {
377
-    return strdup(STATS_ANON_UUID);
377
+	HW_PROFILE_INFO HwProfInfo;
378
+
379
+	if (!GetCurrentHwProfile(&HwProfInfo))
380
+		return strdup(STATS_ANON_UUID);
381
+
382
+    return strdup(HwProfInfo.szHwProfileGuid);
378 383
 }
379 384
 #else
380 385
 char *clamav_stats_get_hostid(void *cbdata)