]> repos.lx-s.de Git - winmute.git/commitdiff
Enabled Spectre Migitations. Small menu tweaks.
authorAlexander Steinhöfer <github@lx-s.de>
Fri, 24 Apr 2020 10:30:06 +0000 (12:30 +0200)
committerAlexander Steinhöfer <github@lx-s.de>
Fri, 24 Apr 2020 10:30:33 +0000 (12:30 +0200)
12 files changed:
Build/bin/changelog.txt
Build/bin/liesmich.html
Build/bin/readme.html
Build/bin/x64/WinMute.exe.gui [moved from Build/bin/WinMute.exe.gui with 100% similarity]
Build/bin/x86/WinMute.exe.gui [new file with mode: 0644]
ScreensaverNotify/ScreensaverNotify.vcxproj
WinMute.sln
WinMute/AboutDlg.cpp
WinMute/Utility.cpp
WinMute/WinMute.vcxproj
WinMute/res.rc
WinMute/resource.h

index 26ab6950c041db781b89b7c39dd9ea373e2d63d4..315b10966f7a8965dc163ba25359cbcdc20e6569 100644 (file)
@@ -1,4 +1,9 @@
-Verion 1.4.5 (2019-09-04)
+Version 1.4.6 (2020-04-24)
+ * Compiled with spectre migitations... just 'cause
+ * Added "Support"-Link to About dialog
+ * Small menu redesign.
+
+Version 1.4.5 (2019-09-04)
  * Fixed crash when all audio endpoints are removed while the program is running
    (might happen, when connecting to your PC via RDP).
  * Upgraded compiler toolset to VS2019
index 79190a91fe687e1bef3b947a0217620fc582e4ec..311d4eda2d118245a83b8d94cf205500c46a8047 100644 (file)
@@ -2,7 +2,7 @@
 <html lang="de">
 <head>
    <meta charset="utf-8">
-   <title>WinMute 1.4.5 - Lies mich</title>
+   <title>WinMute 1.4.6 - Lies mich</title>
 
    <style type="text/css">
    <!--
@@ -17,8 +17,8 @@
    </style>
 </head>
 <body>
-   <h1>WinMute 1.4.5</h1>
-   <p class="copyright">&copy; Copyright 2019, Alexander Steinh&ouml;fer - <a href="http://www.lx-s.de">www.lx-s.de</a></p>
+   <h1>WinMute 1.4.6</h1>
+   <p class="copyright">&copy; Copyright 2020, Alexander Steinh&ouml;fer - <a href="http://www.lx-s.de">www.lx-s.de</a></p>
 
    <h2>Über</h2>
    <p>WinMute schaltet Windows stumm, sobald sie ihren PC sperren oder sich der Bildschirmschoner einschaltet.</p>
index 7b4bfa972863e64424d306f74c196455049844a0..b402373c04c1d9f7afb181c70032e19dc34003d6 100644 (file)
@@ -2,7 +2,7 @@
 <html lang="en">
 <head>
    <meta charset="utf-8">
-   <title>WinMute 1.4.5 - Readme</title>
+   <title>WinMute 1.4.6 - Readme</title>
 
    <style type="text/css">
    <!--
@@ -17,8 +17,8 @@
    </style>
 </head>
 <body>
-   <h1>WinMute 1.4.5</h1>
-   <p class="copyright">&copy; Copyright 2019, by Alexander Steinh&ouml;fer - <a href="http://www.lx-s.de">www.lx-s.de</a></p>
+   <h1>WinMute 1.4.6</h1>
+   <p class="copyright">&copy; Copyright 2020, by Alexander Steinh&ouml;fer - <a href="http://www.lx-s.de">www.lx-s.de</a></p>
 
    <h2>About</h2>
    <p>WinMute automatically mutes your PC volume if you lock your screen or the screensaver is running.</p>
diff --git a/Build/bin/x86/WinMute.exe.gui b/Build/bin/x86/WinMute.exe.gui
new file mode 100644 (file)
index 0000000..e69de29
index d992ba4ac48cf4d568628c36c2a65c553095ed62..a953a0d22540c74e5712c74dc15052c7c92f388a 100644 (file)
@@ -44,6 +44,7 @@
     <PlatformToolset>v142</PlatformToolset>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
@@ -51,6 +52,7 @@
     <PlatformToolset>v142</PlatformToolset>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
index 21f83a45dcdd796b37220fe11f053741f774e832..5da6b4850b6fb93d3c2c8701ffdc18b63d97447b 100644 (file)
@@ -1,7 +1,7 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26430.16
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30011.22
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinMute", "WinMute\WinMute.vcxproj", "{488617F0-5DD3-42B5-81ED-A1E9B3117551}"
        ProjectSection(ProjectDependencies) = postProject
@@ -32,9 +32,13 @@ Global
                {A48C241D-70F5-4919-BE06-8C5BE99CCC23}.Debug|x64.Build.0 = Debug|x64
                {A48C241D-70F5-4919-BE06-8C5BE99CCC23}.Release|Win32.ActiveCfg = Release|Win32
                {A48C241D-70F5-4919-BE06-8C5BE99CCC23}.Release|Win32.Build.0 = Release|Win32
-               {A48C241D-70F5-4919-BE06-8C5BE99CCC23}.Release|x64.ActiveCfg = Release|Win32
+               {A48C241D-70F5-4919-BE06-8C5BE99CCC23}.Release|x64.ActiveCfg = Release|x64
+               {A48C241D-70F5-4919-BE06-8C5BE99CCC23}.Release|x64.Build.0 = Release|x64
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
        EndGlobalSection
+       GlobalSection(ExtensibilityGlobals) = postSolution
+               SolutionGuid = {AE62E32B-8E8B-4236-9173-9671A647A778}
+       EndGlobalSection
 EndGlobal
index 67207d3f9117bdc53eed972e6e7050460fe91b65..c872dc0413b7f0a0326cf286d5a4c670ed1f1843 100644 (file)
@@ -43,14 +43,15 @@ INT_PTR CALLBACK AboutDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
          EndDialog(hDlg, 0);
       }
       return 0;
-   case WM_NOTIFY:
-      switch (((LPNMHDR)lParam)->code) {
+   case WM_NOTIFY: {
+      PNMLINK pNmLink = (PNMLINK)lParam;
+      switch (pNmLink->hdr.code) {
          case NM_CLICK:
          case NM_RETURN: {
-            PNMLINK pNMLink = (PNMLINK)lParam;
-            LITEM item = pNMLink->item;
-            if ((((LPNMHDR)lParam)->idFrom == IDC_LINK_HOMEPAGE) &&
-                 (item.iLink == 0)) {
+            UINT_PTR ctrlId = pNmLink->hdr.idFrom;
+            LITEM item = pNmLink->item;
+            if ((ctrlId == IDC_LINK_HOMEPAGE || ctrlId == IDC_LINK_SUPPORT)
+                && item.iLink == 0) {
                ShellExecute(nullptr, _T("open"), item.szUrl, nullptr, nullptr,
                             SW_SHOW);
             }
@@ -58,6 +59,7 @@ INT_PTR CALLBACK AboutDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
          }
       }
       return TRUE;
+   }
    case WM_CLOSE:
       EndDialog(hDlg, 0);
       return TRUE;
index 83b12fe97f272c3100a13897e5e65ca28dee80fc..6df2e16423ae60620fc042f90fb218c8490cddcb 100644 (file)
@@ -41,18 +41,19 @@ void PrintWindowsError(LPTSTR lpszFunction, DWORD lastError)
    }
 
    LPVOID lpMsgBuf;
-   if (FormatMessage(
-       FORMAT_MESSAGE_ALLOCATE_BUFFER |
-       FORMAT_MESSAGE_FROM_SYSTEM |
-       FORMAT_MESSAGE_IGNORE_INSERTS,
-       nullptr, lastError, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-       reinterpret_cast<LPTSTR>(&lpMsgBuf), 0, nullptr) != 0) {
-
+   if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+                     FORMAT_MESSAGE_FROM_SYSTEM |
+                     FORMAT_MESSAGE_IGNORE_INSERTS,
+                     nullptr, lastError,
+                     MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+                     reinterpret_cast<LPTSTR>(&lpMsgBuf), 0, nullptr) != 0) {
+      size_t displayBufSize = 
+          ((size_t)lstrlen(static_cast<LPCTSTR>(lpMsgBuf)) +
+           (size_t)lstrlen(static_cast<LPCTSTR>(lpszFunction))
+            + 40) * sizeof(TCHAR);
       // Display the error message and exit the process
-      LPVOID lpDisplayBuf = reinterpret_cast<LPVOID>(LocalAlloc(LMEM_ZEROINIT,
-                            (lstrlen(static_cast<LPCTSTR>(lpMsgBuf)) +
-                             lstrlen(static_cast<LPCTSTR>(lpszFunction)) + 40)
-                            * sizeof(TCHAR)));
+      LPVOID lpDisplayBuf = reinterpret_cast<LPVOID>(
+                                     LocalAlloc(LMEM_ZEROINIT, displayBufSize));
       if (lpDisplayBuf) {
          StringCchPrintf((LPTSTR)lpDisplayBuf,
                          LocalSize(lpDisplayBuf),
index dd56a06ad42435023e51930a91b5ef305c008bba..61011fbaa328b1dd83208106926fcc780698ceb0 100644 (file)
     <CharacterSet>Unicode</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
       <SDLCheck>true</SDLCheck>
       <EnablePREfast>true</EnablePREfast>
       <DiagnosticsFormat>Caret</DiagnosticsFormat>
+      <ControlFlowGuard>Guard</ControlFlowGuard>
     </ClCompile>
     <Link>
       <AdditionalDependencies>strsafe.lib;comctl32.lib;WtsApi32.lib;Winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <DiagnosticsFormat>Caret</DiagnosticsFormat>
       <SDLCheck>true</SDLCheck>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ControlFlowGuard>Guard</ControlFlowGuard>
     </ClCompile>
     <Link>
       <AdditionalDependencies>strsafe.lib;comctl32.lib;WtsApi32.lib;Winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
index 6df6c95d4de97b51412bc89af738e93ce8695821..c0e7badf91aad00d00e85dcc1202e51ba4d19f05 100644 (file)
@@ -25,18 +25,18 @@ LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
 // TEXTINCLUDE
 //
 
-1 TEXTINCLUDE
+1 TEXTINCLUDE 
 BEGIN
     "resource.h\0"
 END
 
-2 TEXTINCLUDE
+2 TEXTINCLUDE 
 BEGIN
     "#include ""afxres.h""\r\n"
     "\0"
 END
 
-3 TEXTINCLUDE
+3 TEXTINCLUDE 
 BEGIN
     "\r\n"
     "\0"
@@ -60,7 +60,8 @@ BEGIN
         MENUITEM "... Workstation is locked",   ID_TRAYMENU_MUTEONLOCK, CHECKED
         MENUITEM "... Screensaver starts",      ID_TRAYMENU_MUTEONSCREENSAVER, CHECKED
         MENUITEM SEPARATOR
-        MENUITEM "Restore volume",              ID_TRAYMENU_RESTOREAUDIO, CHECKED
+        MENUITEM "Afterwards...",               ID_TRAYMENU_AFTERWARDS, INACTIVE
+        MENUITEM "... Restore volume",          ID_TRAYMENU_RESTOREAUDIO, CHECKED
         MENUITEM SEPARATOR
         MENUITEM "Mute now",                    ID_TRAYMENU_MUTE
         MENUITEM SEPARATOR
@@ -74,17 +75,19 @@ END
 // Dialog
 //
 
-IDD_ABOUT DIALOGEX 0, 0, 251, 52
+IDD_ABOUT DIALOGEX 0, 0, 251, 56
 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION
 CAPTION "About WinMute"
 FONT 8, "MS Shell Dlg", 400, 0, 0x1
 BEGIN
     DEFPUSHBUTTON   "OK",IDOK,194,7,50,14
-    LTEXT           "WinMute v1.4.5",IDC_STATIC,43,9,67,11
+    LTEXT           "WinMute v1.4.6",IDC_STATIC,43,9,67,11
     CONTROL         "<a href=""https://lx-s.de"">lx-systems - lx-s.de</a>",IDC_LINK_HOMEPAGE,
-                    "SysLink",WS_TABSTOP,43,31,69,13
-    LTEXT           "Copyright © 2019, Alexander Steinhöfer",IDC_STATIC,43,20,148,12
-    ICON            IDI_APP,IDC_STATIC,13,9,21,20,SS_CENTERIMAGE
+                    "SysLink",WS_TABSTOP,43,35,69,13
+    LTEXT           "Copyright © 2016, Alexander Steinhöfer",IDC_STATIC,43,22,148,12
+    ICON            IDI_APP,IDC_STATIC,13,12,21,20,SS_CENTERIMAGE
+    CONTROL         "<a href=""https://github.com/lx-s/WinMute/issues/"">Support</a>",IDC_LINK_SUPPORT,
+                    "SysLink",WS_TABSTOP,119,35,36,13
 END
 
 
@@ -102,7 +105,7 @@ BEGIN
         RIGHTMARGIN, 244
         VERTGUIDE, 43
         TOPMARGIN, 7
-        BOTTOMMARGIN, 45
+        BOTTOMMARGIN, 49
     END
 END
 #endif    // APSTUDIO_INVOKED
@@ -114,8 +117,8 @@ END
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,4,5,0
- PRODUCTVERSION 1,4,5,0
+ FILEVERSION 1,4,6,0
+ PRODUCTVERSION 1,4,6,0
  FILEFLAGSMASK 0x17L
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -132,23 +135,23 @@ BEGIN
         BEGIN
             VALUE "CompanyName", "lx-systems"
             VALUE "FileDescription", "Automatic volume muting, when PC is locked."
-            VALUE "FileVersion", "1.4.5.0"
+            VALUE "FileVersion", "1.4.6.0"
             VALUE "InternalName", "WinMute"
-            VALUE "LegalCopyright", "Copyright (c) 2019, Alexander Steinhöfer"
+            VALUE "LegalCopyright", "Copyright (c) 2020, Alexander Steinhöfer"
             VALUE "OriginalFilename", "WinMute.exe"
             VALUE "ProductName", "WinMute"
-            VALUE "ProductVersion", "1.4.5.0"
+            VALUE "ProductVersion", "1.4.6.0"
         END
         BLOCK "040704b0"
         BEGIN
             VALUE "CompanyName", "lx-systems"
             VALUE "FileDescription", "Automatisches Stummschalten beim Sperren der Workstation."
-            VALUE "FileVersion", "1.4.5.0"
+            VALUE "FileVersion", "1.4.6.0"
             VALUE "InternalName", "WinMute"
-            VALUE "LegalCopyright", "Copyright (c) 2019, Alexander Steinhöfer"
+            VALUE "LegalCopyright", "Copyright (c) 2020, Alexander Steinhöfer"
             VALUE "OriginalFilename", "WinMute.exe"
             VALUE "ProductName", "WinMute"
-            VALUE "ProductVersion", "1.4.5.0"
+            VALUE "ProductVersion", "1.4.6.0"
         END
     END
     BLOCK "VarFileInfo"
index 5c5947973779b8c90d9daa6793f60d693ffcbf5e..9c34587f5f0516f7012fdd40a9cf6d6c9c46f895 100644 (file)
@@ -8,6 +8,8 @@
 #define IDI_ICON1                       107
 #define IDI_TRAY                        107
 #define IDC_LINK_HOMEPAGE               1001
+#define IDC_LINK_HOMEPAGE2              1002
+#define IDC_LINK_SUPPORT                1002
 #define ID_TRAYMENU_INFO                40001
 #define ID_TRAYMENU_EXIT                40002
 #define ID_TRAYMENU_MUTEONLOCK          40003
 #define ID_TRAYMENU_40010               40010
 #define ID_TRAYMENU_40011               40011
 #define ID_TRAYMENU_MUTEON              40012
+#define ID_TRAYMENU_AFTERWARDS          40013
 
 // Next default values for new objects
 // 
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_NEXT_RESOURCE_VALUE        108
-#define _APS_NEXT_COMMAND_VALUE         40013
+#define _APS_NEXT_COMMAND_VALUE         40014
 #define _APS_NEXT_CONTROL_VALUE         1002
 #define _APS_NEXT_SYMED_VALUE           101
 #endif