[FancyZones][Tool]Monitor id tool (#18589)

* tool

* log ccd and wmi/cimv2

* rename

* spell

* clean up

* spellcheck
This commit is contained in:
Seraphima Zykova 2022-06-13 16:37:52 +02:00 committed by GitHub
parent 55f38016d7
commit b5531a1f6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 882 additions and 0 deletions

View File

@ -117,6 +117,7 @@ aumid
Aut
Authenticode
AUTHN
AUTHZ
autogenerate
autogenerated
AUTOHIDE
@ -230,6 +231,7 @@ Chukotka
Chuuk
cielab
ciexyz
cim
CImage
cinttypes
cla
@ -292,6 +294,9 @@ companding
Compat
COMPOSITIONFULL
comsupp
comsuppw
comsuppwd
comutil
Concat
concrt
configs
@ -447,6 +452,7 @@ DISABLEASACTIONKEY
dispid
DISPIDAMBIENTDLCONTROL
DISPLAYCHANGE
DISPLAYCONFIG
displayname
divyan
DLACTIVEXCTLS
@ -510,6 +516,7 @@ dxgiformat
dxguid
ecount
EData
Edid
EDITKEYBOARD
editkeyboardwindow
editorconfig
@ -730,6 +737,7 @@ HKPD
HKU
HLOCAL
HLSL
HMD
hmenu
hmodule
hmonitor
@ -981,6 +989,7 @@ IValue
IVector
IView
IVirtual
IWbem
IWeb
IWIC
iwindow
@ -1124,6 +1133,7 @@ LPMINMAXINFO
LPOSVERSIONINFOEXW
lprc
LPRECT
LPSAFEARRAY
LPSTR
lpsz
lpt
@ -1613,6 +1623,7 @@ pwsh
PWSTR
pwsz
pwtd
QDC
qianlifeng
qit
QITAB
@ -2225,6 +2236,8 @@ VSTHRD
VSTT
vtable
Vtbl
wbem
wbemuuid
WBounds
wca
wcautil
@ -2315,6 +2328,8 @@ WKSG
Wlkr
wmain
Wman
wmi
WMICIM
WMKEYDOWN
WMKEYUP
wmp
@ -2338,6 +2353,7 @@ wpf
wpr
wprintf
wprp
WQL
wregex
WResize
writefile

View File

@ -0,0 +1,26 @@
#pragma once
#include <optional>
#include <string>
#include <system_error>
#include <Windows.h>
inline std::optional<std::wstring> get_last_error_message(const DWORD dw)
{
std::optional<std::wstring> message;
try
{
const auto msg = std::system_category().message(dw);
message.emplace(begin(msg), end(msg));
}
catch (...)
{
}
return message;
}
inline std::wstring get_last_error_or_default(const DWORD dw)
{
auto message = get_last_error_message(dw);
return message.has_value() ? message.value() : L"";
}

View File

@ -0,0 +1,45 @@
#pragma once
#include <fstream>
#include <filesystem>
#include <shlobj.h>
std::filesystem::path get_desktop_path()
{
wchar_t* p;
if (S_OK != SHGetKnownFolderPath(FOLDERID_Desktop, 0, NULL, &p)) return "";
std::filesystem::path result = p;
CoTaskMemFree(p);
return result;
}
class Logger
{
private:
inline static std::wofstream logger;
public:
~Logger()
{
logger.close();
}
static void init(std::string loggerName)
{
std::filesystem::path rootFolder(get_desktop_path());
auto logsPath = rootFolder;
logsPath.append(L"monitor_ids.txt");
logger.open(logsPath.string(), std::ios_base::out | std::ios_base::app);
}
template<typename FormatString, typename... Args>
static void log(FormatString fmt, Args&&... args)
{
logger << std::vformat(fmt, std::make_wformat_args(args...)) << std::endl;
}
};

View File

@ -0,0 +1,477 @@
#include "pch.h"
#include "MonitorReportTool.h"
#include <WbemCli.h>
#include <dwmapi.h>
#include <comutil.h>
#include <unordered_map>
#include "ErrorMessage.h"
#include "Logger.h"
namespace FancyZonesUtils
{
template<RECT MONITORINFO::* member>
std::vector<std::pair<HMONITOR, MONITORINFOEX>> GetAllMonitorInfo()
{
using result_t = std::vector<std::pair<HMONITOR, MONITORINFOEX>>;
result_t result;
auto enumMonitors = [](HMONITOR monitor, HDC, LPRECT, LPARAM param) -> BOOL {
MONITORINFOEX mi;
mi.cbSize = sizeof(mi);
result_t& result = *reinterpret_cast<result_t*>(param);
if (GetMonitorInfo(monitor, &mi))
{
result.push_back({ monitor, mi });
}
return TRUE;
};
EnumDisplayMonitors(NULL, NULL, enumMonitors, reinterpret_cast<LPARAM>(&result));
return result;
}
}
void LogEnumDisplayMonitors()
{
Logger::log(L" ---- EnumDisplayMonitors ---- ");
auto allMonitors = FancyZonesUtils::GetAllMonitorInfo<&MONITORINFOEX::rcWork>();
std::unordered_map<std::wstring, DWORD> displayDeviceIdxMap;
for (auto& monitorData : allMonitors)
{
auto monitorInfo = monitorData.second;
DISPLAY_DEVICE displayDevice{ .cb = sizeof(displayDevice) };
std::wstring deviceId;
auto enumRes = EnumDisplayDevicesW(monitorInfo.szDevice, displayDeviceIdxMap[monitorInfo.szDevice], &displayDevice, EDD_GET_DEVICE_INTERFACE_NAME);
if (enumRes == 0)
{
Logger::log(get_last_error_or_default(GetLastError()));
}
else
{
Logger::log(L"DeviceId: {}", std::wstring(displayDevice.DeviceID));
Logger::log(L"DeviceKey: {}", std::wstring(displayDevice.DeviceKey));
Logger::log(L"DeviceName: {}", std::wstring(displayDevice.DeviceName));
Logger::log(L"DeviceString: {}", std::wstring(displayDevice.DeviceString));
Logger::log(L"");
}
}
Logger::log(L"");
}
void LogWMIProp(IWbemClassObject* wbemClassObj, std::wstring_view prop)
{
if (!wbemClassObj)
{
return;
}
VARIANT vtProp{};
// Get the value of the Name property
auto hres = wbemClassObj->Get(prop.data(), 0, &vtProp, 0, 0);
if (FAILED(hres))
{
Logger::log(L"Get {} Error code = {} ", prop, get_last_error_or_default(hres));
return;
}
switch (vtProp.vt)
{
case VT_I2: //short
{
Logger::log(L"{} : {}", prop, vtProp.iVal);
}
break;
case VT_I4: //int, long
{
Logger::log(L"{} : {}", prop, vtProp.lVal);
}
break;
case VT_BSTR: //BSTR
{
Logger::log(L"{} : {}", prop, vtProp.bstrVal);
}
break;
case VT_UI1: //BYTE (unsigned char)
{
Logger::log(L"{} : {}", prop, vtProp.bVal);
}
break;
case VT_ARRAY: // parray
case 8195: // also parray
{
std::u32string str(static_cast<const char32_t*>(vtProp.parray->pvData));
std::wstring wstr;
for (const char32_t& c : str)
{
wstr += (wchar_t)c;
}
Logger::log(L"{} : {}", prop, wstr);
}
break;
default:
{
Logger::log(L"{} : value is empty", prop);
}
break;
}
VariantClear(&vtProp);
}
void LogWMI()
{
Logger::log(L" ---- WMI ---- ");
HRESULT hres;
// Initialize COM.
hres = CoInitializeEx(0, COINIT_MULTITHREADED);
if (FAILED(hres))
{
Logger::log(L"Failed to initialize COM library. Error code = ", hres);
return;
}
// Initialize
hres = CoInitializeSecurity(NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_DEFAULT,
RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL);
if (FAILED(hres))
{
Logger::log(L"Failed to initialize security. Error code = ", hres);
CoUninitialize();
return;
}
// Obtain the initial locator to Windows Management
// on a particular host computer.
IWbemLocator* pLocator = 0;
hres = CoCreateInstance(CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID*)&pLocator);
if (FAILED(hres))
{
Logger::log(L"Failed to create IWbemLocator object. Error code = ", hres);
CoUninitialize();
return;
}
IWbemServices* pServices = 0;
hres = pLocator->ConnectServer(_bstr_t(L"ROOT\\WMI"), NULL, NULL, 0, NULL, 0, 0, &pServices);
if (FAILED(hres))
{
Logger::log(L"Could not connect WMI server. Error code = ", hres);
pLocator->Release();
CoUninitialize();
return;
}
Logger::log(L"Connected to ROOT\\WMI WMI namespace");
Logger::log(L"");
// Set the IWbemServices proxy so that impersonation
// of the user (client) occurs.
hres = CoSetProxyBlanket(pServices, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, NULL,
RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE);
if (FAILED(hres))
{
Logger::log(L"Could not set proxy blanket. Error code = ", hres);
pServices->Release();
pLocator->Release();
CoUninitialize();
return;
}
// Use the IWbemServices pointer to make requests of WMI.
// Make requests here:
IEnumWbemClassObject* pEnumerator = NULL;
hres = pServices->ExecQuery(bstr_t("WQL"), bstr_t("SELECT * FROM WmiMonitorID"),
WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, NULL, &pEnumerator);
if (FAILED(hres))
{
Logger::log(L"Query for monitors failed. Error code = ", hres);
pServices->Release();
pLocator->Release();
CoUninitialize();
return;
}
IWbemClassObject* pClassObject;
ULONG uReturn = 0;
while (pEnumerator)
{
hres = pEnumerator->Next(WBEM_INFINITE, 1, &pClassObject, &uReturn);
if (0 == uReturn)
{
break;
}
LPSAFEARRAY pFieldArray = NULL;
hres = pClassObject->GetNames(NULL, WBEM_FLAG_ALWAYS, NULL, &pFieldArray);
if (FAILED(hres))
{
Logger::log(L"Failed to get field names. Error code = {}", get_last_error_or_default(hres));
break;
}
LogWMIProp(pClassObject, L"InstanceName");
LogWMIProp(pClassObject, L"YearOfManufacture");
LogWMIProp(pClassObject, L"WeekOfManufacture");
LogWMIProp(pClassObject, L"UserFriendlyNameLength");
LogWMIProp(pClassObject, L"UserFriendlyName");
LogWMIProp(pClassObject, L"ManufacturerName");
LogWMIProp(pClassObject, L"SerialNumberID");
LogWMIProp(pClassObject, L"ProductCodeID");
Logger::log(L"");
pClassObject->Release();
pClassObject = NULL;
}
pServices->Release();
pLocator->Release();
pEnumerator->Release();
CoUninitialize();
}
void LogWMICIMV2()
{
Logger::log(L" ---- WMI ---- ");
HRESULT hres;
hres = CoInitializeEx(0, COINIT_MULTITHREADED);
if (FAILED(hres))
{
Logger::log(L"Failed to initialize COM library. Error code = ", hres);
return;
}
hres = CoInitializeSecurity(NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_DEFAULT,
RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL);
if (FAILED(hres))
{
Logger::log(L"Failed to initialize security. Error code = ", hres);
CoUninitialize();
return;
}
// Obtain the initial locator to Windows Management
// on a particular host computer.
IWbemLocator* pLocator = 0;
hres = CoCreateInstance(CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID*)&pLocator);
if (FAILED(hres))
{
Logger::log(L"Failed to create IWbemLocator object. Error code = ", hres);
CoUninitialize();
return;
}
IWbemServices* pServices = 0;
// Connect to the root\cimv2 namespace with the
// current user and obtain pointer pSvc
// to make IWbemServices calls.
hres = pLocator->ConnectServer(_bstr_t(L"ROOT\\CIMV2"), NULL, NULL, 0, NULL, 0, 0, &pServices);
if (FAILED(hres))
{
Logger::log(L"Could not connect WMI server. Error code = ", hres);
pLocator->Release();
CoUninitialize();
return;
}
Logger::log(L"Connected to ROOT\\CIMV2 WMI namespace");
Logger::log(L"");
// Set the IWbemServices proxy so that impersonation
// of the user (client) occurs.
hres = CoSetProxyBlanket(pServices, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, NULL,
RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE);
if (FAILED(hres))
{
Logger::log(L"Could not set proxy blanket. Error code = ", hres);
pServices->Release();
pLocator->Release();
CoUninitialize();
return;
}
// Use the IWbemServices pointer to make requests of WMI.
// Make requests here:
IEnumWbemClassObject* pEnumerator = NULL;
hres = pServices->ExecQuery(bstr_t("WQL"), bstr_t("SELECT * FROM Win32_DesktopMonitor"),
WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, NULL, &pEnumerator);
if (FAILED(hres))
{
Logger::log(L"Query for monitors failed. Error code = ", hres);
pServices->Release();
pLocator->Release();
CoUninitialize();
return;
}
IWbemClassObject* pClassObject;
ULONG uReturn = 0;
while (pEnumerator)
{
hres = pEnumerator->Next(WBEM_INFINITE, 1, &pClassObject, &uReturn);
if (0 == uReturn)
{
break;
}
LogWMIProp(pClassObject, L"DeviceID");
LogWMIProp(pClassObject, L"Caption");
LogWMIProp(pClassObject, L"Description");
LogWMIProp(pClassObject, L"MonitorManufacturer");
LogWMIProp(pClassObject, L"MonitorType");
LogWMIProp(pClassObject, L"Name");
LogWMIProp(pClassObject, L"PNPDeviceID");
LogWMIProp(pClassObject, L"Status");
LogWMIProp(pClassObject, L"Availability");
Logger::log(L"");
pClassObject->Release();
pClassObject = NULL;
}
pServices->Release();
pLocator->Release();
pEnumerator->Release();
CoUninitialize();
}
void LogCCD()
{
Logger::log(L" ---- CCD ---- ");
LONG result = ERROR_SUCCESS;
std::vector<DISPLAYCONFIG_PATH_INFO> paths;
std::vector<DISPLAYCONFIG_MODE_INFO> modes;
do
{
UINT32 pathCount{}, modeCount{};
auto sizesResult = GetDisplayConfigBufferSizes(QDC_ONLY_ACTIVE_PATHS | QDC_INCLUDE_HMD | QDC_VIRTUAL_MODE_AWARE, &pathCount, &modeCount);
if (sizesResult != ERROR_SUCCESS)
{
Logger::log(L"GetDisplayConfigBufferSizes error {}", get_last_error_or_default(sizesResult));
return;
}
paths.resize(pathCount);
paths.resize(modeCount);
auto result = QueryDisplayConfig(QDC_ONLY_ACTIVE_PATHS | QDC_INCLUDE_HMD | QDC_VIRTUAL_MODE_AWARE, &pathCount, paths.data()
, &modeCount, modes.data(), nullptr);
// The function may have returned fewer paths/modes than estimated
paths.resize(pathCount);
modes.resize(modeCount);
} while (result == ERROR_INSUFFICIENT_BUFFER);
if (result != ERROR_SUCCESS)
{
Logger::log(L"QueryDisplayConfig error {}", get_last_error_or_default(result));
return;
}
// For each active path
for (auto& path : paths)
{
// Find the target (monitor) friendly name
DISPLAYCONFIG_TARGET_DEVICE_NAME targetName = {};
targetName.header.adapterId = path.targetInfo.adapterId;
targetName.header.id = path.targetInfo.id;
targetName.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME;
targetName.header.size = sizeof(targetName);
result = DisplayConfigGetDeviceInfo(&targetName.header);
if (result != ERROR_SUCCESS)
{
Logger::log(L"DisplayConfigGetDeviceInfo error {}", get_last_error_or_default(result));
}
// Find the adapter device name
DISPLAYCONFIG_ADAPTER_NAME adapterName = {};
adapterName.header.adapterId = path.targetInfo.adapterId;
adapterName.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_ADAPTER_NAME;
adapterName.header.size = sizeof(adapterName);
result = DisplayConfigGetDeviceInfo(&adapterName.header);
if (result != ERROR_SUCCESS)
{
Logger::log(L"DisplayConfigGetDeviceInfo error {}", get_last_error_or_default(result));
continue;
}
Logger::log(L"Monitor: {} connected to adapter {}"
, (targetName.flags.friendlyNameFromEdid ? targetName.monitorFriendlyDeviceName : L"Unknown")
, adapterName.adapterDevicePath);
}
}
void LogInfo()
{
Logger::log(L"Timestamp: {}", std::chrono::system_clock::now());
Logger::log(L"");
LogEnumDisplayMonitors();
LogWMICIMV2();
LogWMI();
LogCCD();
Logger::log(L"=======================================");
Logger::log(L"");
}
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ LPWSTR lpCmdLine,
_In_ int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
Logger::init("MonitorReportTool");
LogInfo();
return 0;
}

View File

@ -0,0 +1,3 @@
#pragma once
#include "resource.h"

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@ -0,0 +1,103 @@
//Microsoft Visual C++ generated resource script.
⼀⼀ഀ<EFBFBD>
⌀椀渀挀氀甀搀攀 ∀爀攀猀漀甀爀挀攀⸀栀∀ഀ<EFBFBD>
<EFBFBD>
⌀搀攀昀椀渀攀 䄀倀匀吀唀䐀䤀伀开刀䔀䄀䐀伀一䰀夀开匀夀䴀䈀伀䰀匀ഀ<EFBFBD>
⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀ഀ<EFBFBD>
⼀⼀ഀ<EFBFBD>
⼀⼀ 䜀攀渀攀爀愀琀攀搀 昀爀漀洀 琀栀攀 吀䔀堀吀䤀一䌀䰀唀䐀䔀 爀攀猀漀甀爀挀攀⸀ഀ<EFBFBD>
⼀⼀ഀ<EFBFBD>
⌀椀昀渀搀攀昀 䄀倀匀吀唀䐀䤀伀开䤀一嘀伀䬀䔀䐀ഀ<EFBFBD>
⌀攀渀搀椀昀ഀ<EFBFBD>
⌀搀攀昀椀渀攀 䄀倀匀吀唀䐀䤀伀开䠀䤀䐀䐀䔀一开匀夀䴀䈀伀䰀匀ഀ<EFBFBD>
⌀椀渀挀氀甀搀攀 ∀眀椀渀搀漀眀猀⸀栀∀ഀ<EFBFBD>
⌀甀渀搀攀昀 䄀倀匀吀唀䐀䤀伀开䠀䤀䐀䐀䔀一开匀夀䴀䈀伀䰀匀ഀ<EFBFBD>
⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀ഀ<EFBFBD>
⌀甀渀搀攀昀 䄀倀匀吀唀䐀䤀伀开刀䔀䄀䐀伀一䰀夀开匀夀䴀䈀伀䰀匀ഀ<EFBFBD>
<EFBFBD>
⌀椀昀 ℀搀攀昀椀渀攀搀䄀䘀堀开刀䔀匀伀唀刀䌀䔀开䐀䰀䰀⤀ 簀簀 搀攀昀椀渀攀搀䄀䘀堀开吀䄀刀䜀开䔀一唀⤀ഀ<EFBFBD>
䰀䄀一䜀唀䄀䜀䔀 㤀Ⰰ ㄀ഀ<EFBFBD>
<EFBFBD>
⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀ഀ<EFBFBD>
⼀⼀ഀ<EFBFBD>
⼀⼀ 䤀挀漀渀ഀ<EFBFBD>
⼀⼀ഀ<EFBFBD>
<EFBFBD>
⼀⼀ 䤀挀漀渀 眀椀琀栀 氀漀眀攀猀琀 䤀䐀 瘀愀氀甀攀 瀀氀愀挀攀搀 昀椀爀猀琀 琀漀 攀渀猀甀爀攀 愀瀀瀀氀椀挀愀琀椀漀渀 椀挀漀渀ഀ<EFBFBD>
⼀⼀ 爀攀洀愀椀渀猀 挀漀渀猀椀猀琀攀渀琀 漀渀 愀氀氀 猀礀猀琀攀洀猀⸀ഀ<EFBFBD>
<EFBFBD>
䤀䐀䤀开圀䤀一䐀伀圀匀吀夀䰀䔀匀䤀䌀伀一        䤀䌀伀一         ∀䴀漀渀椀琀漀爀刀攀瀀漀爀琀吀漀漀氀⸀椀挀漀∀ഀ<EFBFBD>
䤀䐀䤀开匀䴀䄀䰀䰀               䤀䌀伀一         ∀猀洀愀氀氀⸀椀挀漀∀ഀ<EFBFBD>
<EFBFBD>
<EFBFBD>
⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀ഀ<EFBFBD>
⼀⼀ഀ<EFBFBD>
⼀⼀ 䐀䔀匀䤀䜀一䤀一䘀伀ഀ<EFBFBD>
⼀⼀ഀ<EFBFBD>
<EFBFBD>
⌀椀昀搀攀昀 䄀倀匀吀唀䐀䤀伀开䤀一嘀伀䬀䔀䐀ഀ<EFBFBD>
䜀唀䤀䐀䔀䰀䤀一䔀匀 䐀䔀匀䤀䜀一䤀一䘀伀ഀ<EFBFBD>
䈀䔀䜀䤀一ഀ<EFBFBD>
    䤀䐀䐀开䄀䈀伀唀吀䈀伀堀Ⰰ 䐀䤀䄀䰀伀䜀ഀ<EFBFBD>
    䈀䔀䜀䤀一ഀ<EFBFBD>
        䰀䔀䘀吀䴀䄀刀䜀䤀一Ⰰ 㜀ഀ<EFBFBD>
        刀䤀䜀䠀吀䴀䄀刀䜀䤀一Ⰰ ㄀㘀㌀ഀ<EFBFBD>
        吀伀倀䴀䄀刀䜀䤀一Ⰰ 㜀ഀ<EFBFBD>
        䈀伀吀吀伀䴀䴀䄀刀䜀䤀一Ⰰ 㔀㔀ഀ<EFBFBD>
    䔀一䐀ഀ<EFBFBD>
䔀一䐀ഀ<EFBFBD>
⌀攀渀搀椀昀    ⼀⼀ 䄀倀匀吀唀䐀䤀伀开䤀一嘀伀䬀䔀䐀ഀ<EFBFBD>
<EFBFBD>
⌀椀昀搀攀昀 䄀倀匀吀唀䐀䤀伀开䤀一嘀伀䬀䔀䐀ഀ<EFBFBD>
⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀ഀ<EFBFBD>
⼀⼀ഀ<EFBFBD>
⼀⼀ 吀䔀堀吀䤀一䌀䰀唀䐀䔀ഀ<EFBFBD>
⼀⼀ഀ<EFBFBD>
 吀䔀堀吀䤀一䌀䰀唀䐀䔀ഀ<EFBFBD>
䈀䔀䜀䤀一ഀ<EFBFBD>
    ∀爀攀猀漀甀爀挀攀⸀栀尀 ∀ഀ<EFBFBD>
䔀一䐀ഀ<EFBFBD>
<EFBFBD>
 吀䔀堀吀䤀一䌀䰀唀䐀䔀ഀ<EFBFBD>
䈀䔀䜀䤀一ഀ<EFBFBD>
    ∀⌀椀昀渀搀攀昀 䄀倀匀吀唀䐀䤀伀开䤀一嘀伀䬀䔀䐀尀爀尀渀∀ഀ<EFBFBD>
    ∀⌀椀渀挀氀甀搀攀 ∀∀琀愀爀最攀琀瘀攀爀⸀栀∀∀尀爀尀渀∀ഀ<EFBFBD>
    ∀⌀攀渀搀椀昀尀爀尀渀∀ഀ<EFBFBD>
    ∀⌀搀攀昀椀渀攀 䄀倀匀吀唀䐀䤀伀开䠀䤀䐀䐀䔀一开匀夀䴀䈀伀䰀匀尀爀尀渀∀ഀ<EFBFBD>
    ∀⌀椀渀挀氀甀搀攀 ∀∀眀椀渀搀漀眀猀⸀栀∀∀尀爀尀渀∀ഀ<EFBFBD>
    ∀⌀甀渀搀攀昀 䄀倀匀吀唀䐀䤀伀开䠀䤀䐀䐀䔀一开匀夀䴀䈀伀䰀匀尀爀尀渀∀ഀ<EFBFBD>
    ∀尀 ∀ഀ<EFBFBD>
䔀一䐀ഀ<EFBFBD>
<EFBFBD>
 吀䔀堀吀䤀一䌀䰀唀䐀䔀ഀ<EFBFBD>
䈀䔀䜀䤀一ഀ<EFBFBD>
    ∀尀爀尀渀∀ഀ<EFBFBD>
    ∀尀 ∀ഀ<EFBFBD>
䔀一䐀ഀ<EFBFBD>
<EFBFBD>
⌀攀渀搀椀昀    ⼀⼀ 䄀倀匀吀唀䐀䤀伀开䤀一嘀伀䬀䔀䐀ഀ<EFBFBD>
<EFBFBD>
⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀ഀ<EFBFBD>
⼀⼀ഀ<EFBFBD>
⼀⼀ 匀琀爀椀渀最 吀愀戀氀攀ഀ<EFBFBD>
⼀⼀ഀ<EFBFBD>
<EFBFBD>
匀吀刀䤀一䜀吀䄀䈀䰀䔀ഀ<EFBFBD>
䈀䔀䜀䤀一ഀ<EFBFBD>
   䤀䐀䌀开圀䤀一䐀伀圀匀吀夀䰀䔀匀   ∀圀䤀一䐀伀圀匀吀夀䰀䔀匀∀ഀ<EFBFBD>
䔀一䐀ഀ<EFBFBD>
<EFBFBD>
⌀攀渀搀椀昀ഀ<EFBFBD>
⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀ഀ<EFBFBD>
<EFBFBD>
<EFBFBD>
<EFBFBD>
⌀椀昀渀搀攀昀 䄀倀匀吀唀䐀䤀伀开䤀一嘀伀䬀䔀䐀ഀ<EFBFBD>
⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀ഀ<EFBFBD>
⼀⼀ഀ<EFBFBD>
⼀⼀ 䜀攀渀攀爀愀琀攀搀 昀爀漀洀 琀栀攀 吀䔀堀吀䤀一䌀䰀唀䐀䔀 爀攀猀漀甀爀挀攀⸀ഀ<EFBFBD>
⼀⼀ഀ<EFBFBD>
<EFBFBD>
⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀⼀ഀ<EFBFBD>
⌀攀渀搀椀昀    ⼀⼀ 渀漀琀 䄀倀匀吀唀䐀䤀伀开䤀一嘀伀䬀䔀䐀ഀ<EFBFBD>
<EFBFBD>

View File

@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32014.148
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MonitorReportTool", "MonitorReportTool.vcxproj", "{0FEBAFAF-CB77-41F0-8EF9-8E3AD4B4F842}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0FEBAFAF-CB77-41F0-8EF9-8E3AD4B4F842}.Debug|ARM64.ActiveCfg = Debug|ARM64
{0FEBAFAF-CB77-41F0-8EF9-8E3AD4B4F842}.Debug|ARM64.Build.0 = Debug|ARM64
{0FEBAFAF-CB77-41F0-8EF9-8E3AD4B4F842}.Debug|x64.ActiveCfg = Debug|x64
{0FEBAFAF-CB77-41F0-8EF9-8E3AD4B4F842}.Debug|x64.Build.0 = Debug|x64
{0FEBAFAF-CB77-41F0-8EF9-8E3AD4B4F842}.Release|ARM64.ActiveCfg = Release|ARM64
{0FEBAFAF-CB77-41F0-8EF9-8E3AD4B4F842}.Release|ARM64.Build.0 = Release|ARM64
{0FEBAFAF-CB77-41F0-8EF9-8E3AD4B4F842}.Release|x64.ActiveCfg = Release|x64
{0FEBAFAF-CB77-41F0-8EF9-8E3AD4B4F842}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D271E9C3-5C4D-45E4-8D23-9F1BB5443513}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{0febafaf-cb77-41f0-8ef9-8e3ad4b4f842}</ProjectGuid>
<RootNamespace>MonitorReportTool</RootNamespace>
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup>
<OutDir>$(SolutionDir)..\..\$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
<IntDir>$(SolutionDir)..\..\$(Platform)\$(Configuration)\obj\$(ProjectName)\</IntDir>
<TargetName>PowerToys.$(ProjectName)</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>dwmapi.lib;comsuppwd.lib;wbemuuid.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>dwmapi.lib;comsuppw.lib;wbemuuid.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="ErrorMessage.h" />
<ClInclude Include="Logger.h" />
<ClInclude Include="MonitorReportTool.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="Resource.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="MonitorReportTool.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="MonitorReportTool.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="MonitorReportTool.ico" />
<Image Include="small.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="MonitorReportTool.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="pch.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Logger.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="ErrorMessage.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="MonitorReportTool.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="pch.cpp">
<Filter>Header Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="MonitorReportTool.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Image Include="small.ico">
<Filter>Resource Files</Filter>
</Image>
<Image Include="MonitorReportTool.ico">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
</Project>

View File

@ -0,0 +1,24 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by MonitorReportTool.rc
#define IDR_MAINFRAME 128
#define IDD_ABOUTBOX 103
#define IDI_WINDOWSTYLESICON 107
#define IDI_SMALLICON 108
#define IDC_WINDOWSTYLES 109
#ifndef IDC_STATIC
#define IDC_STATIC -1
#endif
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 130
#define _APS_NEXT_RESOURCE_VALUE 129
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 110
#endif
#endif

View File

@ -0,0 +1 @@
#include "pch.h"

View File

@ -0,0 +1,3 @@
#pragma once
#include <Windows.h>

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB