diff --git a/Application/Application.rc b/Application/Application.rc
index 06cc2f71..98f95698 100644
--- a/Application/Application.rc
+++ b/Application/Application.rc
@@ -28,8 +28,8 @@ LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,2,0,438
- PRODUCTVERSION 1,2,0,438
+ FILEVERSION 1,3,0,440
+ PRODUCTVERSION 1,3,0,440
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -45,12 +45,12 @@ BEGIN
BLOCK "040b04b0"
BEGIN
VALUE "FileDescription", "Rainmeter - A Customizable Resource Meter"
- VALUE "FileVersion", "1, 2, 0, 438"
+ VALUE "FileVersion", "1, 3, 0, 440"
VALUE "InternalName", "Rainmeter"
VALUE "LegalCopyright", "Copyright (C) 2010 - Rainy"
VALUE "OriginalFilename", "Rainmeter.exe"
VALUE "ProductName", "Rainmeter"
- VALUE "ProductVersion", "1, 2, 0, 438"
+ VALUE "ProductVersion", "1, 3, 0, 440"
END
END
BLOCK "VarFileInfo"
diff --git a/Library/Rainmeter.h b/Library/Rainmeter.h
index a693bc18..4a603962 100644
--- a/Library/Rainmeter.h
+++ b/Library/Rainmeter.h
@@ -32,13 +32,13 @@
#define MAKE_VER(major, minor1, minor2) major * 1000000 + minor1 * 1000 + minor2
#define APPNAME L"Rainmeter"
-#define APPVERSION L"1.2"
+#define APPVERSION L"1.3"
#ifdef _WIN64
#define APPBITS L"(64-bit)"
#else
#define APPBITS L"(32-bit)"
#endif
-#define RAINMETER_VERSION MAKE_VER(1, 2, 0)
+#define RAINMETER_VERSION MAKE_VER(1, 3, 0)
enum PLATFORM
{
diff --git a/Library/TrayWindow.cpp b/Library/TrayWindow.cpp
index bf2ec664..80ad9407 100644
--- a/Library/TrayWindow.cpp
+++ b/Library/TrayWindow.cpp
@@ -615,6 +615,55 @@ LRESULT CALLBACK CTrayWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
break;
+ case WM_QUERY_RAINMETER:
+
+ if (Rainmeter && IsWindow((HWND)lParam))
+ {
+ if(wParam == RAINMETER_QUERY_ID_SKINS_PATH)
+ {
+ std::wstring path = Rainmeter->GetSkinPath();
+
+ COPYDATASTRUCT cds;
+
+ cds.dwData = RAINMETER_QUERY_ID_SKINS_PATH;
+ cds.cbData = (path.size() + 1) * 2;
+ cds.lpData = (LPVOID) path.c_str();
+
+ SendMessage((HWND)lParam, WM_COPYDATA, (WPARAM)hWnd, (LPARAM)&cds);
+
+ return 0;
+ }
+ else if(wParam == RAINMETER_QUERY_ID_SETTINGS_PATH)
+ {
+ std::wstring path = Rainmeter->GetSettingsPath();
+
+ COPYDATASTRUCT cds;
+
+ cds.dwData = RAINMETER_QUERY_ID_SKINS_PATH;
+ cds.cbData = (path.size() + 1) * 2;
+ cds.lpData = (LPVOID) path.c_str();
+
+ SendMessage((HWND)lParam, WM_COPYDATA, (WPARAM)hWnd, (LPARAM)&cds);
+
+ return 0;
+ }
+ else if(wParam == RAINMETER_QUERY_ID_PLUGINS_PATH)
+ {
+ std::wstring path = Rainmeter->GetPluginPath();
+
+ COPYDATASTRUCT cds;
+
+ cds.dwData = RAINMETER_QUERY_ID_SKINS_PATH;
+ cds.cbData = (path.size() + 1) * 2;
+ cds.lpData = (LPVOID) path.c_str();
+
+ SendMessage((HWND)lParam, WM_COPYDATA, (WPARAM)hWnd, (LPARAM)&cds);
+
+ return 0;
+ }
+ }
+ return 1;
+
case WM_TIMER:
if (tray && tray->m_Measure)
{
diff --git a/Library/resource.h b/Library/resource.h
index 889ef9ce..ff14258f 100644
--- a/Library/resource.h
+++ b/Library/resource.h
@@ -59,6 +59,13 @@
#define ID_CONTEXT_SKINMENU_MONITOR_PRIMARY 4048
#define ID_CONTEXT_SKINMENU_MONITOR_AUTOSELECT 4049
+#define WM_QUERY_RAINMETER WM_APP + 1000
+
+#define RAINMETER_QUERY_ID_SKINS_PATH 4101
+#define RAINMETER_QUERY_ID_SETTINGS_PATH 4102
+#define RAINMETER_QUERY_ID_PLUGINS_PATH 4103
+
+
#define ID_CONFIG_EDIT 30000
#define ID_CONFIG_FIRST 30001
#define ID_CONFIG_LAST 33000
diff --git a/Plugins/PluginWin7Audio/PluginWin7Audio.vcproj b/Plugins/PluginWin7Audio/PluginWin7Audio.vcproj
new file mode 100644
index 00000000..5034189d
--- /dev/null
+++ b/Plugins/PluginWin7Audio/PluginWin7Audio.vcproj
@@ -0,0 +1,638 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Plugins/PluginWin7Audio/PolicyConfig.h b/Plugins/PluginWin7Audio/PolicyConfig.h
new file mode 100644
index 00000000..605998b8
--- /dev/null
+++ b/Plugins/PluginWin7Audio/PolicyConfig.h
@@ -0,0 +1,90 @@
+// ----------------------------------------------------------------------------
+// PolicyConfig.h
+// Undocumented COM-interface IPolicyConfig.
+// Use for set default audio render endpoint
+// @author EreTIk
+// ----------------------------------------------------------------------------
+
+
+#pragma once
+
+// ----------------------------------------------------------------------------
+// class CPolicyConfigClient
+// {294935CE-F637-4E7C-A41B-AB255460B862}
+//
+// interface IPolicyConfig
+// {568b9108-44bf-40b4-9006-86afe5b5a620}
+//
+// Query interface:
+// CComPtr PolicyConfig;
+// PolicyConfig.CoCreateInstance(__uuidof(CPolicyConfigClient));
+// ----------------------------------------------------------------------------
+class DECLSPEC_UUID("294935CE-F637-4E7C-A41B-AB255460B862")
+CPolicyConfigClient;
+interface IPolicyConfig : public IUnknown
+{
+public:
+
+ virtual HRESULT GetMixFormat(
+ PCWSTR,
+ WAVEFORMATEX **
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE GetDeviceFormat(
+ PCWSTR,
+ INT,
+ WAVEFORMATEX **
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE SetDeviceFormat(
+ PCWSTR,
+ WAVEFORMATEX *,
+ WAVEFORMATEX *
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE GetProcessingPeriod(
+ PCWSTR,
+ INT,
+ PINT64,
+ PINT64
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE SetProcessingPeriod(
+ PCWSTR,
+ PINT64
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE GetShareMode(
+ PCWSTR,
+ struct DeviceShareMode *
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE SetShareMode(
+ PCWSTR,
+ struct DeviceShareMode *
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE GetPropertyValue(
+ PCWSTR,
+ const PROPERTYKEY &,
+ PROPVARIANT *
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE SetPropertyValue(
+ PCWSTR,
+ const PROPERTYKEY &,
+ PROPVARIANT *
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE SetDefaultEndpoint(
+ __in PCWSTR wszDeviceId,
+ __in ERole eRole
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE SetEndpointVisibility(
+ PCWSTR,
+ INT
+ );
+};
+interface DECLSPEC_UUID("568b9108-44bf-40b4-9006-86afe5b5a620")
+IPolicyConfig;
diff --git a/Plugins/PluginWin7Audio/Win7AudioPlugin.cpp b/Plugins/PluginWin7Audio/Win7AudioPlugin.cpp
new file mode 100644
index 00000000..541a8c4a
--- /dev/null
+++ b/Plugins/PluginWin7Audio/Win7AudioPlugin.cpp
@@ -0,0 +1,514 @@
+/*
+ Copyright (C) 2010 Stefan Hiller
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#pragma warning(disable: 4786)
+#pragma warning(disable: 4996)
+
+#include
+#include
+#include
+#include