Add version number to telemetry event

use defines from version.h in .rc files and other places.
This commit is contained in:
Enrico Giordani
2019-10-14 19:22:14 +02:00
committed by GitHub
parent eb1ef65fac
commit f9be71eca5
14 changed files with 39 additions and 4 deletions

View File

@@ -4,6 +4,7 @@
#pragma comment(lib, "dwmapi.lib")
#include <strsafe.h>
#include <sddl.h>
#include "version.h"
std::optional<RECT> get_button_pos(HWND hwnd) {
RECT button;
@@ -290,3 +291,10 @@ std::wstring get_process_path(HWND window) noexcept {
}
return name;
}
std::wstring get_product_version() {
static std::wstring version = std::to_wstring(VERSION_MAJOR) +
L"." + std::to_wstring(VERSION_MINOR) +
L"." + std::to_wstring(VERSION_REVISION);
return version;
}