</style>
</head>
<body>
- <h1>WinMute 1.4</h1>
+ <h1>WinMute 1.4.3</h1>
<p class="copyright">© Copyright 2014, Alexander Steinhöfer - <a href="http://www.lx-s.de">www.lx-s.de</a></p>
<h2>About</h2>
- <p>WinMute schaltet Windows stumm, sobald sie ihren PC sperren oder sich der Screensaver einschaltet.</p>
+ <p>WinMute schaltet Windows stumm, sobald sie ihren PC sperren oder sich der Bildschirmschoner einschaltet.</p>
<p>
Das ist vor allem in einer Büroumgebung nützlich, wenn Sie Ihren
</style>
</head>
<body>
- <h1>WinMute 1.3</h1>
- <p class="copyright">© Copyright 2014, by Alexander Steinhöfer - <a href="http://www.lx-s.de">www.lx-s.de</a></p>
+ <h1>WinMute 1.4.3</h1>
+ <p class="copyright">© Copyright 2016, by Alexander Steinhö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>
<ul>
<li>Operating System
<ul>
- <li>Windows XP SP3 or newer</li>
+ <li>Windows Vista or newer</li>
</ul>
</li>
</ul>
/*
ScreensaverNotify DLL
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors may
- be used to endorse or promote products derived from this software
+ be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
/*
ScreensaverNotify DLL
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors may
- be used to endorse or promote products derived from this software
+ be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
/*
WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors may
- be used to endorse or promote products derived from this software
+ be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
/*
WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors may
- be used to endorse or promote products derived from this software
+ be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/
-
+
#include "StdAfx.h"
#include "WinAudio.h"
#include "MMNotificationClient.h"
class WinAudio;
-
+
MMNotificationClient::MMNotificationClient(WinAudio* notifyParent) :
ref_(1), pEnumerator_(NULL), notifyParent_(notifyParent)
{
}
-
+
MMNotificationClient::~MMNotificationClient()
{
SafeRelease(&pEnumerator_);
}
-
+
ULONG STDMETHODCALLTYPE MMNotificationClient::AddRef()
{
return InterlockedIncrement(&ref_);
}
-
+
ULONG STDMETHODCALLTYPE MMNotificationClient::Release()
{
ULONG ref = InterlockedDecrement(&ref_);
}
return ref;
}
-
+
HRESULT STDMETHODCALLTYPE MMNotificationClient::QueryInterface(
REFIID riid,
VOID **ppvInterface)
return S_OK;
}
-
+
HRESULT STDMETHODCALLTYPE MMNotificationClient::OnDefaultDeviceChanged(
EDataFlow,
ERole,
}
return S_OK;
}
-
+
HRESULT STDMETHODCALLTYPE MMNotificationClient::OnDeviceAdded(LPCWSTR)
{
return S_OK;
}
-
+
HRESULT STDMETHODCALLTYPE MMNotificationClient::OnDeviceRemoved(LPCWSTR)
{
if (notifyParent_) {
}
return S_OK;
}
-
+
HRESULT STDMETHODCALLTYPE MMNotificationClient::OnDeviceStateChanged(LPCWSTR,
DWORD)
{
return S_OK;
}
-
+
HRESULT STDMETHODCALLTYPE MMNotificationClient::OnPropertyValueChanged(
LPCWSTR,
const PROPERTYKEY)
{
return S_OK;
}
-
-
\ No newline at end of file
+
/*
WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors may
- be used to endorse or promote products derived from this software
+ be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/
-
+
#include "StdAfx.h"
#include <Mmdeviceapi.h>
public:
MMNotificationClient(WinAudio* notifyParent);
~MMNotificationClient();
-
+
ULONG STDMETHODCALLTYPE AddRef();
ULONG STDMETHODCALLTYPE Release();
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, VOID **ppvInterface);
/*
WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors may
- be used to endorse or promote products derived from this software
+ be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
wc.hInstance = hglobInstance;
wc.lpfnWndProc = ScrsvrWndProc;
wc.lpszClassName = SCRSVER_NOTIFY_WND_CLASS;
-
+
if (!RegisterClass(&wc)) {
PrintWindowsError(_T("RegisterClass"));
return false;
/*
WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors may
- be used to endorse or promote products derived from this software
+ be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
/*
WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors may
- be used to endorse or promote products derived from this software
+ be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
PrintWindowsError(_T("RegCreateKeyEx"), regError);
return defValue;
}
-
+
return value;
}
DWORD regError = RegSetValueEx(hRegSettingsKey_,
keyStr,
0,
- REG_DWORD,
+ REG_DWORD,
reinterpret_cast<BYTE*>(&value),
sizeof(DWORD));
if (regError != ERROR_SUCCESS) {
/*
WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors may
- be used to endorse or promote products derived from this software
+ be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
/* WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors may
- be used to endorse or promote products derived from this software
+ be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
/*
WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors may
- be used to endorse or promote products derived from this software
+ be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// Utility
void PrintWindowsError(LPTSTR lpszFunction, DWORD lastError = -1);
-const LPCTSTR PROGRAM_NAME = _T("WinMute");
+static const LPCTSTR PROGRAM_NAME = _T("WinMute");
/*
WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
/*
WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors may
- be used to endorse or promote products derived from this software
+ be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
/*
WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
/*
WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors may
- be used to endorse or promote products derived from this software
+ be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
/*
WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
/*
WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors may
- be used to endorse or promote products derived from this software
+ be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
}
/* See
- * http://blogs.msdn.com/b/larryosterman/archive/2007/10/31/what-happens-when-audio-rendering-fails.aspx
+ * http://blogs.msdn.com/b/larryosterman/archive/2007/10/31/what-happens-when-audio-rendering-fails.aspx
* for detailed information about each of these entries */
HRESULT STDMETHODCALLTYPE VistaAudioSessionEvents::OnSessionDisconnected(
AudioSessionDisconnectReason disconnectReason)
/*
WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors may
- be used to endorse or promote products derived from this software
+ be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
/*
WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
/*
WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
_In_ PWSTR,
_In_ int)
{
- HANDLE hMutex = CreateMutex(nullptr, TRUE, _T("BinaryStudiosWinMute"));
+ HANDLE hMutex = CreateMutex(nullptr, TRUE, _T("LxSystemsWinMute"));
if (hMutex == NULL) {
return FALSE;
}
/*
WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
/*
WinMute
- Copyright (c) 2014 Alexander Steinhoefer
+ Copyright (C) 2016, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
bool Init();
void Close();
- HWND GetWnd();
-
- // for internal use
+ // for internal use
LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
private:
HWND hWnd_;
void Unload();
void CheckOrUncheckMenu(UINT item, bool* setting);
-
// Disable copying
- WinMute(const WinMute&);
- WinMute& operator=(const WinMute&);
+ WinMute(const WinMute&) = delete;
+ WinMute& operator=(const WinMute&) = delete;
};