瀏覽代碼

Logging basic environment information

Source commit: 7b51db11e63055688d47c177eb34dc1d19040992
Martin Prikryl 2 年之前
父節點
當前提交
67f941891b
共有 1 個文件被更改,包括 16 次插入0 次删除
  1. 16 0
      source/WinSCP.cpp

+ 16 - 0
source/WinSCP.cpp

@@ -14,6 +14,7 @@ USEFORM("forms\ScpExplorer.cpp", ScpExplorerForm);
 #include <Setup.h>
 #include <PuttyTools.h>
 #include <GUITools.h>
+#include <Tools.h>
 //---------------------------------------------------------------------------
 WINAPI wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)
 {
@@ -31,6 +32,21 @@ WINAPI wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)
 
     AddStartupSequence(L"M");
     DllHijackingProtection();
+    AppLogFmt(L"Process: %d", (GetCurrentProcessId()));
+    AppLogFmt(L"Mouse: %s", (BooleanToEngStr(Mouse->MousePresent)));
+    AppLogFmt(L"Mouse wheel: %s, msg: %d, scroll lines: %d", (BooleanToEngStr(Mouse->WheelPresent), int(Mouse->RegWheelMessage), Mouse->WheelScrollLines));
+    AppLogFmt(L"ACP: %d", (static_cast<int>(GetACP())));
+    AppLogFmt(L"Win32 platform: %d", (Win32Platform));
+    DWORD Type;
+    if (GetWindowsProductType(Type))
+    {
+      AppLogFmt(L"Windows product type: %x", (static_cast<int>(Type)));
+    }
+    else
+    {
+      AppLog(L"No Windows product type");
+    }
+    AppLogFmt(L"Win64: %s", (BooleanToEngStr(IsWin64())));
     AddStartupSequence(L"T");
 
     WinInitialize();