From 7ae8f298f877d95a09d0a8ef22582285236d076b Mon Sep 17 00:00:00 2001 From: spx Date: Mon, 17 Jan 2011 22:39:40 +0000 Subject: [PATCH] - Modified font caching. (Fixed an issue that LocalFont file is locked until exiting Rainmeter.) - Disabled checked iterators in release mode. (_SECURE_SCL=0) http://msdn.microsoft.com/en-us/library/aa985965.aspx Note: _SECURE_SCL defaults to 0 in release mode in VC10(=VC2010). --- Application/Application.vcproj | 6 +- Library/Library.vcproj | 4 +- Library/MeterString.cpp | 178 ++++++++++++------ Library/MeterString.h | 6 +- Library/MeterWindow.cpp | 17 +- .../PluginAdvancedCPU.vcproj | 4 +- Plugins/PluginExample/PluginExample.vcproj | 4 +- .../PluginFolderInfo/PluginFolderInfo.vcproj | 4 +- Plugins/PluginMediaKey/PluginMediaKey.vcproj | 4 +- Plugins/PluginPerfMon/PluginPerfMon.vcproj | 4 +- Plugins/PluginPing/PluginPing.vcproj | 4 +- Plugins/PluginPower/PluginPower.vcproj | 4 +- Plugins/PluginQuote/PluginQuote.vcproj | 4 +- .../PluginRecycleManager.vcproj | 4 +- Plugins/PluginResMon/PluginResMon.vcproj | 4 +- Plugins/PluginSpeedFan/PluginSpeedFan.vcproj | 4 +- Plugins/PluginSysInfo/PluginSysInfo.vcproj | 4 +- .../PluginVirtualDesktops.vcproj | 4 +- .../PluginWebParser/PluginWebParser.vcproj | 4 +- .../PluginWifiStatus/PluginWifiStatus.vcproj | 4 +- .../PluginWin7Audio/PluginWin7Audio.vcproj | 4 +- .../PluginWindowMessage.vcproj | 4 +- Plugins/PluginiTunes/PluginiTunes.vcproj | 4 +- 23 files changed, 181 insertions(+), 102 deletions(-) diff --git a/Application/Application.vcproj b/Application/Application.vcproj index 38f6069e..d2cd33a0 100644 --- a/Application/Application.vcproj +++ b/Application/Application.vcproj @@ -196,7 +196,7 @@ /> ::const_iterator iter = c_FontFamilies.find(m_FontFace); + std::wstring cacheKey; + std::wstring systemFontFaceKey = FontFaceToString(m_FontFace, NULL); + std::map::const_iterator iter = c_FontFamilies.find(systemFontFaceKey); if (iter != c_FontFamilies.end()) { m_FontFamily = (*iter).second; + cacheKey = systemFontFaceKey; } else { - m_FontFamily = new FontFamily(m_FontFace.c_str()); - Status status = m_FontFamily->GetLastStatus(); + m_FontFamily = NULL; - // It couldn't find the font family - // Therefore we look in the privatefontcollection of this meters MeterWindow - if(Ok != status) + PrivateFontCollection* collection = m_MeterWindow->GetPrivateFontCollection(); + std::wstring privateFontFaceKey; + + if (collection) { - delete m_FontFamily; - m_FontFamily = new FontFamily(m_FontFace.c_str(), m_MeterWindow->GetPrivateFontCollection()); - status = m_FontFamily->GetLastStatus(); - - // It couldn't find the font family: Log it. - if(Ok != status) - { - std::wstring error = L"Couldn't load font family: " + m_FontFace; - Log(LOG_ERROR, error.c_str()); - - delete m_FontFamily; - m_FontFamily = NULL; + // Check if the private font family is in the cache and use it + privateFontFaceKey = FontFaceToString(m_FontFace, collection); + iter = c_FontFamilies.find(privateFontFaceKey); + if (iter != c_FontFamilies.end()) + { + m_FontFamily = (*iter).second; + cacheKey = privateFontFaceKey; } - } - if(m_FontFamily) + if (m_FontFamily == NULL) // Not found in the cache { - c_FontFamilies[m_FontFace] = m_FontFamily; + m_FontFamily = new FontFamily(m_FontFace.c_str()); + Status status = m_FontFamily->GetLastStatus(); + + if (Ok == status) + { + cacheKey = systemFontFaceKey; + } + else + { + delete m_FontFamily; + + // It couldn't find the font family + // Therefore we look in the privatefontcollection of this meters MeterWindow + if (collection) + { + m_FontFamily = new FontFamily(m_FontFace.c_str(), collection); + status = m_FontFamily->GetLastStatus(); + + if (Ok == status) + { + cacheKey = privateFontFaceKey; + } + } + else + { + m_FontFamily = NULL; + } + + // It couldn't find the font family: Log it. + if (Ok != status) + { + std::wstring error = L"Couldn't load font family: " + m_FontFace; + Log(LOG_ERROR, error.c_str()); + + delete m_FontFamily; + m_FontFamily = NULL; + + cacheKey = L"<>"; // set dummy key + } + } + + if (m_FontFamily) + { + // Cache + //LogWithArgs(LOG_DEBUG, L"FontFamilyCache-Add: %s", cacheKey.c_str()); + c_FontFamilies[cacheKey] = m_FontFamily; + } } } @@ -200,8 +243,10 @@ void CMeterString::Initialize() REAL size = (REAL)m_FontSize * (96.0f / (REAL)dpi); - std::wstring properties = FontPropertiesToString(m_FontFamily, size, style); - std::map::const_iterator iter2 = c_Fonts.find(properties); + // Check if the font is in the cache and use it + cacheKey += L"-"; + cacheKey += FontPropertiesToString(size, style); + std::map::const_iterator iter2 = c_Fonts.find(cacheKey); if (iter2 != c_Fonts.end()) { m_Font = (*iter2).second; @@ -220,7 +265,9 @@ void CMeterString::Initialize() Status status = m_Font->GetLastStatus(); if (Ok == status) { - c_Fonts[properties] = m_Font; + // Cache + //LogWithArgs(LOG_DEBUG, L"FontCache-Add: %s", cacheKey.c_str()); + c_Fonts[cacheKey] = m_Font; } else { @@ -271,8 +318,13 @@ void CMeterString::ReadConfig(const WCHAR* section) m_AutoScale = 0!=parser.ReadInt(section, L"AutoScale", 0); m_ClipString = 0!=parser.ReadInt(section, L"ClipString", 0); - m_FontSize = (int)parser.ReadFormula(section, L"FontSize", 10); + m_FontFace = parser.ReadString(section, L"FontFace", L"Arial"); + if (m_FontFace.empty()) + { + m_FontFace = L"Arial"; + } + m_FontSize = (int)parser.ReadFormula(section, L"FontSize", 10); if (m_FontSize < 0) { m_FontSize = 10; @@ -283,7 +335,6 @@ void CMeterString::ReadConfig(const WCHAR* section) m_Angle = (Gdiplus::REAL)parser.ReadFloat(section, L"Angle", 0.0); std::wstring scale = parser.ReadString(section, L"Scale", L"1"); - if (scale.find(L'.') == std::wstring::npos) { m_NoDecimals = true; @@ -294,10 +345,7 @@ void CMeterString::ReadConfig(const WCHAR* section) } m_Scale = wcstod(scale.c_str(), NULL); - m_FontFace = parser.ReadString(section, L"FontFace", L"Arial"); - std::wstring align = parser.ReadString(section, L"StringAlign", L"LEFT"); - if(_wcsicmp(align.c_str(), L"LEFT") == 0) { m_Align = ALIGN_LEFT; @@ -320,7 +368,6 @@ void CMeterString::ReadConfig(const WCHAR* section) } std::wstring stringCase = parser.ReadString(section, L"StringCase", L"NONE"); - if(_wcsicmp(stringCase.c_str(), L"NONE") == 0) { m_textCase = TEXTCASE_NONE; @@ -347,7 +394,6 @@ void CMeterString::ReadConfig(const WCHAR* section) } std::wstring style = parser.ReadString(section, L"StringStyle", L"NORMAL"); - if(_wcsicmp(style.c_str(), L"NORMAL") == 0) { m_Style = NORMAL; @@ -374,7 +420,6 @@ void CMeterString::ReadConfig(const WCHAR* section) } std::wstring effect = parser.ReadString(section, L"StringEffect", L"NONE"); - if(_wcsicmp(effect.c_str(), L"NONE") == 0) { m_Effect = EFFECT_NONE; @@ -647,21 +692,56 @@ void CMeterString::BindMeasure(const std::list& measures) ** Static function which frees the font cache. ** */ -void CMeterString::FreeFontCache() +void CMeterString::FreeFontCache(PrivateFontCollection* collection) { - std::map::iterator iter = c_FontFamilies.begin(); - for ( ; iter != c_FontFamilies.end(); ++iter) + std::wstring prefix; + + if (collection) { - delete (*iter).second; + WCHAR buffer[32]; + _snwprintf_s(buffer, _TRUNCATE, L"<%p>", collection); + prefix = buffer; + std::transform(prefix.begin(), prefix.end(), prefix.begin(), ::towlower); } - c_FontFamilies.clear(); std::map::iterator iter2 = c_Fonts.begin(); for ( ; iter2 != c_Fonts.end(); ++iter2) { - delete (*iter2).second; + if (collection == NULL || (*iter2).first.compare(0, prefix.length(), prefix) == 0) + { + //LogWithArgs(LOG_DEBUG, L"FontCache-Remove: %s", (*iter2).first.c_str()); + delete (*iter2).second; + if (collection) c_Fonts.erase(iter2); + } } - c_Fonts.clear(); + if (collection == NULL) c_Fonts.clear(); + + std::map::iterator iter = c_FontFamilies.begin(); + for ( ; iter != c_FontFamilies.end(); ++iter) + { + if (collection == NULL || (*iter).first.compare(0, prefix.length(), prefix) == 0) + { + //LogWithArgs(LOG_DEBUG, L"FontFamilyCache-Remove: %s", (*iter).first.c_str()); + delete (*iter).second; + if (collection) c_FontFamilies.erase(iter); + } + } + if (collection == NULL) c_FontFamilies.clear(); +} + +/* +** FontFaceToString +** +** Static helper to convert font name to a string so it can be used as a key for the cache map. +** +*/ +std::wstring CMeterString::FontFaceToString(const std::wstring& fontFace, PrivateFontCollection* collection) +{ + WCHAR buffer[32]; + _snwprintf_s(buffer, _TRUNCATE, L"<%p>", collection); + std::wstring strTmp = buffer + fontFace; + std::transform(strTmp.begin(), strTmp.end(), strTmp.begin(), ::towlower); + return strTmp; } /* @@ -670,23 +750,11 @@ void CMeterString::FreeFontCache() ** Static helper to convert font properties to a string so it can be used as a key for the cache map. ** */ -std::wstring CMeterString::FontPropertiesToString(FontFamily* fontFamily, REAL size, FontStyle style) +std::wstring CMeterString::FontPropertiesToString(REAL size, FontStyle style) { - WCHAR ids[128] = {0}; - _snwprintf_s(ids, _TRUNCATE, L"%.1f-%i", size, (int)style); - - if (fontFamily) - { - WCHAR familyName[LF_FACESIZE]; - if (Ok == fontFamily->GetFamilyName(familyName)) - { - std::wstring prop = familyName; - prop += L"-"; - prop += ids; - return prop; - } - } - return ids; + WCHAR buffer[64]; + _snwprintf_s(buffer, _TRUNCATE, L"%.1f-%i", size, (int)style); + return buffer; } /* diff --git a/Library/MeterString.h b/Library/MeterString.h index 03236e63..0fb7cba4 100644 --- a/Library/MeterString.h +++ b/Library/MeterString.h @@ -43,7 +43,7 @@ public: virtual void BindMeasure(const std::list& measures); Gdiplus::RectF GetRect() { return m_Rect; } - static void FreeFontCache(); + static void FreeFontCache(Gdiplus::PrivateFontCollection* collection = NULL); static void EnumerateInstalledFontFamilies(); private: @@ -100,7 +100,9 @@ private: std::vector m_MeasureNames; std::vector m_Measures; - static std::wstring FontPropertiesToString(Gdiplus::FontFamily* fontFamily, Gdiplus::REAL size, Gdiplus::FontStyle style); + static std::wstring FontFaceToString(const std::wstring& fontFace, Gdiplus::PrivateFontCollection* collection); + static std::wstring FontPropertiesToString(Gdiplus::REAL size, Gdiplus::FontStyle style); + static std::map c_FontFamilies; // Cache for the font families static std::map c_Fonts; // Cache for the fonts }; diff --git a/Library/MeterWindow.cpp b/Library/MeterWindow.cpp index e141243e..a1c2f24f 100644 --- a/Library/MeterWindow.cpp +++ b/Library/MeterWindow.cpp @@ -30,6 +30,7 @@ #include "MeasureNet.h" #include "MeasurePlugin.h" #include "MeterButton.h" +#include "MeterString.h" #include "TintedImage.h" #include "MeasureScript.h" @@ -174,7 +175,11 @@ CMeterWindow::~CMeterWindow() if(m_Window) DestroyWindow(m_Window); - if(m_FontCollection) delete m_FontCollection; + if(m_FontCollection) + { + CMeterString::FreeFontCache(m_FontCollection); + delete m_FontCollection; + } --c_InstanceCount; @@ -351,8 +356,12 @@ void CMeterWindow::Refresh(bool init, bool all) m_BackgroundName.erase(); - if (m_FontCollection) delete m_FontCollection; - m_FontCollection = NULL; + if (m_FontCollection) + { + CMeterString::FreeFontCache(m_FontCollection); + delete m_FontCollection; + m_FontCollection = NULL; + } } ZPOSITION oldZPos = m_WindowZPosition; @@ -1921,7 +1930,7 @@ bool CMeterWindow::ReadSkin() } // Here we are checking to see if there are more than one local font - // to be loaded. They will be named LocalFont2, LocalFont 3, etc. + // to be loaded. They will be named LocalFont2, LocalFont3, etc. WCHAR tmpName[64]; int i = 2; bool loop = true; diff --git a/Plugins/PluginAdvancedCPU/PluginAdvancedCPU.vcproj b/Plugins/PluginAdvancedCPU/PluginAdvancedCPU.vcproj index 08ce0af7..7b7575d5 100644 --- a/Plugins/PluginAdvancedCPU/PluginAdvancedCPU.vcproj +++ b/Plugins/PluginAdvancedCPU/PluginAdvancedCPU.vcproj @@ -52,7 +52,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginAdvancedCPU_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginAdvancedCPU_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -146,7 +146,7 @@ AdditionalOptions="/GL " Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginAdvancedCPU_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginAdvancedCPU_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" diff --git a/Plugins/PluginExample/PluginExample.vcproj b/Plugins/PluginExample/PluginExample.vcproj index 43d4996f..e73c9d2b 100644 --- a/Plugins/PluginExample/PluginExample.vcproj +++ b/Plugins/PluginExample/PluginExample.vcproj @@ -52,7 +52,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PLUGINEXAMPLE_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PLUGINEXAMPLE_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -146,7 +146,7 @@ AdditionalOptions="/GL " Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PLUGINEXAMPLE_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PLUGINEXAMPLE_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" diff --git a/Plugins/PluginFolderInfo/PluginFolderInfo.vcproj b/Plugins/PluginFolderInfo/PluginFolderInfo.vcproj index 5b3b75b7..eb12e9e6 100644 --- a/Plugins/PluginFolderInfo/PluginFolderInfo.vcproj +++ b/Plugins/PluginFolderInfo/PluginFolderInfo.vcproj @@ -232,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginFolderInfo_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginFolderInfo_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -326,7 +326,7 @@ AdditionalOptions="/GL " Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginFolderInfo_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginFolderInfo_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" diff --git a/Plugins/PluginMediaKey/PluginMediaKey.vcproj b/Plugins/PluginMediaKey/PluginMediaKey.vcproj index 6d3598c6..a48dc700 100644 --- a/Plugins/PluginMediaKey/PluginMediaKey.vcproj +++ b/Plugins/PluginMediaKey/PluginMediaKey.vcproj @@ -232,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginMediaKey_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginMediaKey_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -326,7 +326,7 @@ AdditionalOptions="/GL " Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginMediaKey_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginMediaKey_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" diff --git a/Plugins/PluginPerfMon/PluginPerfMon.vcproj b/Plugins/PluginPerfMon/PluginPerfMon.vcproj index f18d2ee1..125964af 100644 --- a/Plugins/PluginPerfMon/PluginPerfMon.vcproj +++ b/Plugins/PluginPerfMon/PluginPerfMon.vcproj @@ -52,7 +52,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginPerfMon_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginPerfMon_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -146,7 +146,7 @@ AdditionalOptions="/GL " Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginPerfMon_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginPerfMon_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" diff --git a/Plugins/PluginPing/PluginPing.vcproj b/Plugins/PluginPing/PluginPing.vcproj index f3bb0d46..8135c974 100644 --- a/Plugins/PluginPing/PluginPing.vcproj +++ b/Plugins/PluginPing/PluginPing.vcproj @@ -52,7 +52,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginPing_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginPing_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -146,7 +146,7 @@ AdditionalOptions="/GL " Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginPing_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginPing_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" diff --git a/Plugins/PluginPower/PluginPower.vcproj b/Plugins/PluginPower/PluginPower.vcproj index 6d14fba3..6fec65ee 100644 --- a/Plugins/PluginPower/PluginPower.vcproj +++ b/Plugins/PluginPower/PluginPower.vcproj @@ -230,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginPower_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginPower_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -324,7 +324,7 @@ AdditionalOptions="/GL " Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginPower_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginPower_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" diff --git a/Plugins/PluginQuote/PluginQuote.vcproj b/Plugins/PluginQuote/PluginQuote.vcproj index c5646ddd..2e5a1727 100644 --- a/Plugins/PluginQuote/PluginQuote.vcproj +++ b/Plugins/PluginQuote/PluginQuote.vcproj @@ -52,7 +52,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginQuote_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginQuote_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -146,7 +146,7 @@ AdditionalOptions="/GL " Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginQuote_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginQuote_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" diff --git a/Plugins/PluginRecycleManager/PluginRecycleManager.vcproj b/Plugins/PluginRecycleManager/PluginRecycleManager.vcproj index fbc4e68d..2f697ad0 100644 --- a/Plugins/PluginRecycleManager/PluginRecycleManager.vcproj +++ b/Plugins/PluginRecycleManager/PluginRecycleManager.vcproj @@ -52,7 +52,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginRecycleManager_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginRecycleManager_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -148,7 +148,7 @@ AdditionalOptions="/GL " Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginRecycleManager_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginRecycleManager_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" diff --git a/Plugins/PluginResMon/PluginResMon.vcproj b/Plugins/PluginResMon/PluginResMon.vcproj index 797ae803..0df616ca 100644 --- a/Plugins/PluginResMon/PluginResMon.vcproj +++ b/Plugins/PluginResMon/PluginResMon.vcproj @@ -52,7 +52,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginResMon_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginResMon_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -146,7 +146,7 @@ AdditionalOptions="/GL " Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginResMon_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginResMon_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" diff --git a/Plugins/PluginSpeedFan/PluginSpeedFan.vcproj b/Plugins/PluginSpeedFan/PluginSpeedFan.vcproj index b97674a2..8bbadd4b 100644 --- a/Plugins/PluginSpeedFan/PluginSpeedFan.vcproj +++ b/Plugins/PluginSpeedFan/PluginSpeedFan.vcproj @@ -52,7 +52,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginSpeedFan_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginSpeedFan_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -146,7 +146,7 @@ AdditionalOptions="/GL " Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginSpeedFan_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginSpeedFan_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" diff --git a/Plugins/PluginSysInfo/PluginSysInfo.vcproj b/Plugins/PluginSysInfo/PluginSysInfo.vcproj index 95dacd78..4597eb9e 100644 --- a/Plugins/PluginSysInfo/PluginSysInfo.vcproj +++ b/Plugins/PluginSysInfo/PluginSysInfo.vcproj @@ -52,7 +52,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginSysInfo_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginSysInfo_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -146,7 +146,7 @@ AdditionalOptions="/GL " Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginSysInfo_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginSysInfo_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" diff --git a/Plugins/PluginVirtualDesktops/PluginVirtualDesktops.vcproj b/Plugins/PluginVirtualDesktops/PluginVirtualDesktops.vcproj index 305727b7..9729da2f 100644 --- a/Plugins/PluginVirtualDesktops/PluginVirtualDesktops.vcproj +++ b/Plugins/PluginVirtualDesktops/PluginVirtualDesktops.vcproj @@ -52,7 +52,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginVirtualDesktops_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginVirtualDesktops_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -146,7 +146,7 @@ AdditionalOptions="/GL " Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginVirtualDesktops_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginVirtualDesktops_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" diff --git a/Plugins/PluginWebParser/PluginWebParser.vcproj b/Plugins/PluginWebParser/PluginWebParser.vcproj index 73667257..796fee09 100644 --- a/Plugins/PluginWebParser/PluginWebParser.vcproj +++ b/Plugins/PluginWebParser/PluginWebParser.vcproj @@ -232,7 +232,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginWebParser_EXPORTS;HAVE_CONFIG_H;SUPPORT_UTF8" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginWebParser_EXPORTS;_SECURE_SCL=0;HAVE_CONFIG_H;SUPPORT_UTF8" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -326,7 +326,7 @@ AdditionalOptions="/GL " Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginWebParser_EXPORTS;HAVE_CONFIG_H;SUPPORT_UTF8" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginWebParser_EXPORTS;_SECURE_SCL=0;HAVE_CONFIG_H;SUPPORT_UTF8" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" diff --git a/Plugins/PluginWifiStatus/PluginWifiStatus.vcproj b/Plugins/PluginWifiStatus/PluginWifiStatus.vcproj index 52555571..a7b19953 100644 --- a/Plugins/PluginWifiStatus/PluginWifiStatus.vcproj +++ b/Plugins/PluginWifiStatus/PluginWifiStatus.vcproj @@ -221,7 +221,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginRecycleManager_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginRecycleManager_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -317,7 +317,7 @@ AdditionalOptions="/GL " Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginRecycleManager_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginRecycleManager_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" diff --git a/Plugins/PluginWin7Audio/PluginWin7Audio.vcproj b/Plugins/PluginWin7Audio/PluginWin7Audio.vcproj index 430854bf..61eebb04 100644 --- a/Plugins/PluginWin7Audio/PluginWin7Audio.vcproj +++ b/Plugins/PluginWin7Audio/PluginWin7Audio.vcproj @@ -233,7 +233,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginWin7Audio_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginWin7Audio_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -327,7 +327,7 @@ AdditionalOptions="/GL " Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginWin7Audio_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginWin7Audio_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" diff --git a/Plugins/PluginWindowMessage/PluginWindowMessage.vcproj b/Plugins/PluginWindowMessage/PluginWindowMessage.vcproj index aecc4e97..dd473327 100644 --- a/Plugins/PluginWindowMessage/PluginWindowMessage.vcproj +++ b/Plugins/PluginWindowMessage/PluginWindowMessage.vcproj @@ -230,7 +230,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginWindowMessage_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginWindowMessage_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -324,7 +324,7 @@ AdditionalOptions="/GL " Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginWindowMessage_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginWindowMessage_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" diff --git a/Plugins/PluginiTunes/PluginiTunes.vcproj b/Plugins/PluginiTunes/PluginiTunes.vcproj index e9cf4685..661e023f 100644 --- a/Plugins/PluginiTunes/PluginiTunes.vcproj +++ b/Plugins/PluginiTunes/PluginiTunes.vcproj @@ -234,7 +234,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="iTunesCOMWindowsSDK" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginiTunes_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginiTunes_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -329,7 +329,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="iTunesCOMWindowsSDK" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginiTunes_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;PluginiTunes_EXPORTS;_SECURE_SCL=0" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true"