Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/windirstat.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Schneider <oliver@assarbad.net>2018-10-08 23:48:52 +0300
committerOliver Schneider <oliver@assarbad.net>2018-10-08 23:48:52 +0300
commit3008e91efac446fc21d607485cb787c457401a8b (patch)
tree1bba3159c29b56fa63a1fe3e5d5720b9e4ddfab3 /windirstat
parentf045e0d70bc3c17933ce61302f3e0bfb30c2ec2f (diff)
Using EOL extension now, including a .hgeol file to make certain line ending specifications explicit
Added missing test case for lua-winreg A number of warnings addressed Adding some helpers to deal with user privileges Some improvements regarding the inclusion of a basic set of Lua scripts in the resource section New version of setvcvars.cmd
Diffstat (limited to 'windirstat')
-rw-r--r--windirstat/Controls/myimagelist.cpp4
-rw-r--r--windirstat/PageGeneral.cpp386
-rw-r--r--windirstat/WDS_Lua_C.c49
-rw-r--r--windirstat/WDS_Lua_C.h4
-rw-r--r--windirstat/getosplatformstring.cpp264
-rw-r--r--windirstat/mountpoints.cpp1
-rw-r--r--windirstat/res/windirstat.manifest57
-rw-r--r--windirstat/stdafx.cpp12
-rw-r--r--windirstat/stdafx.h148
-rw-r--r--windirstat/windirstat.cpp22
-rw-r--r--windirstat/windirstat.vs15.vcxproj16
-rw-r--r--windirstat/windirstat.vs8.vcproj20
12 files changed, 519 insertions, 464 deletions
diff --git a/windirstat/Controls/myimagelist.cpp b/windirstat/Controls/myimagelist.cpp
index 38b2261..ffa71be 100644
--- a/windirstat/Controls/myimagelist.cpp
+++ b/windirstat/Controls/myimagelist.cpp
@@ -51,7 +51,7 @@ void CMyImageList::initialize()
s.ReleaseBuffer();
VTRACE(_T("GetSystemDirectory() -> %s"), s.GetString());
- SHFILEINFO sfi;
+ SHFILEINFO sfi = {0};
HIMAGELIST hil = (HIMAGELIST)::SHGetFileInfo(s, 0, &sfi, sizeof(sfi), WDS_SHGFI_DEFAULTS);
this->Attach(ImageList_Duplicate(hil));
@@ -110,7 +110,7 @@ int CMyImageList::cacheIcon(LPCTSTR path, UINT flags, CString *psTypeName)
flags |= SHGFI_TYPENAME;
}
- SHFILEINFO sfi;
+ SHFILEINFO sfi = {0};
HIMAGELIST hil = (HIMAGELIST)::SHGetFileInfo(path, 0, &sfi, sizeof(sfi), flags);
if(hil == NULL)
{
diff --git a/windirstat/PageGeneral.cpp b/windirstat/PageGeneral.cpp
index 9819097..19adbd4 100644
--- a/windirstat/PageGeneral.cpp
+++ b/windirstat/PageGeneral.cpp
@@ -1,193 +1,193 @@
-// PageGeneral.cpp - Implementation of CPageGeneral
-//
-// WinDirStat - Directory Statistics
-// Copyright (C) 2003-2005 Bernhard Seifert
-// Copyright (C) 2004-2017 WinDirStat Team (windirstat.net)
-//
-// 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
-//
-
-#include "stdafx.h"
-#include "windirstat.h"
-#include "mainframe.h" // COptionsPropertySheet
-#include "PageGeneral.h"
-#include "options.h"
-#include "globalhelpers.h"
-
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#endif
-
-IMPLEMENT_DYNAMIC(CPageGeneral, CPropertyPage)
-
-CPageGeneral::CPageGeneral()
- : CPropertyPage(CPageGeneral::IDD)
-{
-}
-
-CPageGeneral::~CPageGeneral()
-{
-}
-
-COptionsPropertySheet *CPageGeneral::GetSheet()
-{
- COptionsPropertySheet *sheet = DYNAMIC_DOWNCAST(COptionsPropertySheet, GetParent());
- ASSERT(sheet != NULL);
- return sheet;
-}
-
-void CPageGeneral::DoDataExchange(CDataExchange* pDX)
-{
- CPropertyPage::DoDataExchange(pDX);
- DDX_Check(pDX, IDC_HUMANFORMAT, m_humanFormat);
- DDX_Check(pDX, IDC_FOLLOWMOUNTPOINTS, m_followMountPoints);
- DDX_Check(pDX, IDC_FOLLOWJUNCTIONS, m_followJunctionPoints);
- DDX_Check(pDX, IDC_USEWDSLOCALE, m_useWdsLocale);
- DDX_Control(pDX, IDC_COMBO, m_combo);
- DDX_Control(pDX, IDC_FOLLOWMOUNTPOINTS, m_ctlFollowMountPoints);
- DDX_Control(pDX, IDC_FOLLOWJUNCTIONS, m_ctlFollowJunctionPoints);
- DDX_Check(pDX, IDC_SHOWGRID, m_listGrid);
- DDX_Check(pDX, IDC_SHOWSTRIPES, m_listStripes);
- DDX_Check(pDX, IDC_FULLROWSELECTION, m_listFullRowSelection);
- DDX_Check(pDX, IDC_SKIPHIDDEN, m_skipHidden);
-}
-
-
-BEGIN_MESSAGE_MAP(CPageGeneral, CPropertyPage)
- ON_BN_CLICKED(IDC_HUMANFORMAT, OnBnClickedHumanformat)
- ON_BN_CLICKED(IDC_FOLLOWMOUNTPOINTS, OnBnClickedFollowmountpoints)
- ON_BN_CLICKED(IDC_FOLLOWJUNCTIONS, OnBnClickedFollowjunctionpoints)
- ON_BN_CLICKED(IDC_USEWDSLOCALE, OnBnClickedUseWdsLocale)
- ON_CBN_SELENDOK(IDC_COMBO, OnCbnSelendokCombo)
- ON_BN_CLICKED(IDC_SHOWGRID, OnBnClickedListGrid)
- ON_BN_CLICKED(IDC_SHOWSTRIPES, OnBnClickedListStripes)
- ON_BN_CLICKED(IDC_FULLROWSELECTION, OnBnClickedListFullRowSelection)
- ON_BN_CLICKED(IDC_SKIPHIDDEN, OnBnClickedSkipHidden)
-END_MESSAGE_MAP()
-
-
-BOOL CPageGeneral::OnInitDialog()
-{
- int i = 0;
- CPropertyPage::OnInitDialog();
-
- m_humanFormat = GetOptions()->IsHumanFormat();
- m_listGrid = GetOptions()->IsListGrid();
- m_listStripes = GetOptions()->IsListStripes();
- m_listFullRowSelection = GetOptions()->IsListFullRowSelection();
-
- m_followMountPoints = GetOptions()->IsFollowMountPoints();
- m_followJunctionPoints = GetOptions()->IsFollowJunctionPoints();
- m_useWdsLocale = GetOptions()->IsUseWdsLocale();
- m_skipHidden = GetOptions()->IsSkipHidden();
-
- m_followMountPoints = false; // Otherwise we would see pacman only.
- m_ctlFollowMountPoints.ShowWindow(SW_HIDE); // Ignorance is bliss.
- // The same for junction points
- m_followJunctionPoints = false; // Otherwise we would see pacman only.
- m_ctlFollowJunctionPoints.ShowWindow(SW_HIDE); // Ignorance is bliss.
-
- int k = m_combo.AddString(GetLocaleLanguage(GetWDSApp()->GetBuiltInLanguage()));
- m_combo.SetItemData(k, GetWDSApp()->GetBuiltInLanguage());
-
- CArray<LANGID, LANGID> langid;
- GetWDSApp()->GetAvailableResourceDllLangids(langid);
-
- for(i = 0; i < langid.GetSize(); i++)
- {
- k = m_combo.AddString(GetLocaleLanguage(langid[i]));
- m_combo.SetItemData(k, langid[i]);
- }
-
- m_originalLanguage = 0;
- for(i = 0; i < m_combo.GetCount(); i++)
- {
- if(m_combo.GetItemData(i) == CLanguageOptions::GetLanguage())
- {
- m_combo.SetCurSel(i);
- m_originalLanguage = i;
- break;
- }
- }
-
- UpdateData(false);
- return TRUE;
-}
-
-void CPageGeneral::OnOK()
-{
- UpdateData();
- GetOptions()->SetHumanFormat(FALSE != m_humanFormat);
- GetOptions()->SetFollowMountPoints(FALSE != m_followMountPoints);
- GetOptions()->SetFollowJunctionPoints(FALSE != m_followJunctionPoints);
- GetOptions()->SetUseWdsLocale(FALSE != m_useWdsLocale);
- GetOptions()->SetListGrid(FALSE != m_listGrid);
- GetOptions()->SetListStripes(FALSE != m_listStripes);
- GetOptions()->SetListFullRowSelection(FALSE != m_listFullRowSelection);
- GetOptions()->SetSkipHidden(FALSE != m_skipHidden);
-
- LANGID id = (LANGID)m_combo.GetItemData(m_combo.GetCurSel());
- CLanguageOptions::SetLanguage(id);
-
- CPropertyPage::OnOK();
-}
-
-void CPageGeneral::OnBnClickedHumanformat()
-{
- SetModified();
-}
-
-void CPageGeneral::OnBnClickedFollowmountpoints()
-{
- SetModified();
-}
-
-void CPageGeneral::OnBnClickedFollowjunctionpoints()
-{
- SetModified();
-}
-
-void CPageGeneral::OnBnClickedUseWdsLocale()
-{
- SetModified();
-}
-
-void CPageGeneral::OnBnClickedListGrid()
-{
- SetModified();
-}
-
-void CPageGeneral::OnBnClickedListStripes()
-{
- SetModified();
-}
-
-void CPageGeneral::OnBnClickedListFullRowSelection()
-{
- SetModified();
-}
-
-void CPageGeneral::OnCbnSelendokCombo()
-{
- int i = m_combo.GetCurSel();
- GetSheet()->SetLanguageChanged(i != m_originalLanguage);
- SetModified();
-}
-
-
-void CPageGeneral::OnBnClickedSkipHidden()
-{
- SetModified();
-}
+// PageGeneral.cpp - Implementation of CPageGeneral
+//
+// WinDirStat - Directory Statistics
+// Copyright (C) 2003-2005 Bernhard Seifert
+// Copyright (C) 2004-2017 WinDirStat Team (windirstat.net)
+//
+// 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
+//
+
+#include "stdafx.h"
+#include "windirstat.h"
+#include "mainframe.h" // COptionsPropertySheet
+#include "PageGeneral.h"
+#include "options.h"
+#include "globalhelpers.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+IMPLEMENT_DYNAMIC(CPageGeneral, CPropertyPage)
+
+CPageGeneral::CPageGeneral()
+ : CPropertyPage(CPageGeneral::IDD)
+{
+}
+
+CPageGeneral::~CPageGeneral()
+{
+}
+
+COptionsPropertySheet *CPageGeneral::GetSheet()
+{
+ COptionsPropertySheet *sheet = DYNAMIC_DOWNCAST(COptionsPropertySheet, GetParent());
+ ASSERT(sheet != NULL);
+ return sheet;
+}
+
+void CPageGeneral::DoDataExchange(CDataExchange* pDX)
+{
+ CPropertyPage::DoDataExchange(pDX);
+ DDX_Check(pDX, IDC_HUMANFORMAT, m_humanFormat);
+ DDX_Check(pDX, IDC_FOLLOWMOUNTPOINTS, m_followMountPoints);
+ DDX_Check(pDX, IDC_FOLLOWJUNCTIONS, m_followJunctionPoints);
+ DDX_Check(pDX, IDC_USEWDSLOCALE, m_useWdsLocale);
+ DDX_Control(pDX, IDC_COMBO, m_combo);
+ DDX_Control(pDX, IDC_FOLLOWMOUNTPOINTS, m_ctlFollowMountPoints);
+ DDX_Control(pDX, IDC_FOLLOWJUNCTIONS, m_ctlFollowJunctionPoints);
+ DDX_Check(pDX, IDC_SHOWGRID, m_listGrid);
+ DDX_Check(pDX, IDC_SHOWSTRIPES, m_listStripes);
+ DDX_Check(pDX, IDC_FULLROWSELECTION, m_listFullRowSelection);
+ DDX_Check(pDX, IDC_SKIPHIDDEN, m_skipHidden);
+}
+
+
+BEGIN_MESSAGE_MAP(CPageGeneral, CPropertyPage)
+ ON_BN_CLICKED(IDC_HUMANFORMAT, OnBnClickedHumanformat)
+ ON_BN_CLICKED(IDC_FOLLOWMOUNTPOINTS, OnBnClickedFollowmountpoints)
+ ON_BN_CLICKED(IDC_FOLLOWJUNCTIONS, OnBnClickedFollowjunctionpoints)
+ ON_BN_CLICKED(IDC_USEWDSLOCALE, OnBnClickedUseWdsLocale)
+ ON_CBN_SELENDOK(IDC_COMBO, OnCbnSelendokCombo)
+ ON_BN_CLICKED(IDC_SHOWGRID, OnBnClickedListGrid)
+ ON_BN_CLICKED(IDC_SHOWSTRIPES, OnBnClickedListStripes)
+ ON_BN_CLICKED(IDC_FULLROWSELECTION, OnBnClickedListFullRowSelection)
+ ON_BN_CLICKED(IDC_SKIPHIDDEN, OnBnClickedSkipHidden)
+END_MESSAGE_MAP()
+
+
+BOOL CPageGeneral::OnInitDialog()
+{
+ int i = 0;
+ CPropertyPage::OnInitDialog();
+
+ m_humanFormat = GetOptions()->IsHumanFormat();
+ m_listGrid = GetOptions()->IsListGrid();
+ m_listStripes = GetOptions()->IsListStripes();
+ m_listFullRowSelection = GetOptions()->IsListFullRowSelection();
+
+ m_followMountPoints = GetOptions()->IsFollowMountPoints();
+ m_followJunctionPoints = GetOptions()->IsFollowJunctionPoints();
+ m_useWdsLocale = GetOptions()->IsUseWdsLocale();
+ m_skipHidden = GetOptions()->IsSkipHidden();
+
+ m_followMountPoints = false; // Otherwise we would see pacman only.
+ m_ctlFollowMountPoints.ShowWindow(SW_HIDE); // Ignorance is bliss.
+ // The same for junction points
+ m_followJunctionPoints = false; // Otherwise we would see pacman only.
+ m_ctlFollowJunctionPoints.ShowWindow(SW_HIDE); // Ignorance is bliss.
+
+ int k = m_combo.AddString(GetLocaleLanguage(GetWDSApp()->GetBuiltInLanguage()));
+ m_combo.SetItemData(k, GetWDSApp()->GetBuiltInLanguage());
+
+ CArray<LANGID, LANGID> langid;
+ GetWDSApp()->GetAvailableResourceDllLangids(langid);
+
+ for(i = 0; i < langid.GetSize(); i++)
+ {
+ k = m_combo.AddString(GetLocaleLanguage(langid[i]));
+ m_combo.SetItemData(k, langid[i]);
+ }
+
+ m_originalLanguage = 0;
+ for(i = 0; i < m_combo.GetCount(); i++)
+ {
+ if(m_combo.GetItemData(i) == CLanguageOptions::GetLanguage())
+ {
+ m_combo.SetCurSel(i);
+ m_originalLanguage = i;
+ break;
+ }
+ }
+
+ UpdateData(false);
+ return TRUE;
+}
+
+void CPageGeneral::OnOK()
+{
+ UpdateData();
+ GetOptions()->SetHumanFormat(FALSE != m_humanFormat);
+ GetOptions()->SetFollowMountPoints(FALSE != m_followMountPoints);
+ GetOptions()->SetFollowJunctionPoints(FALSE != m_followJunctionPoints);
+ GetOptions()->SetUseWdsLocale(FALSE != m_useWdsLocale);
+ GetOptions()->SetListGrid(FALSE != m_listGrid);
+ GetOptions()->SetListStripes(FALSE != m_listStripes);
+ GetOptions()->SetListFullRowSelection(FALSE != m_listFullRowSelection);
+ GetOptions()->SetSkipHidden(FALSE != m_skipHidden);
+
+ LANGID id = (LANGID)m_combo.GetItemData(m_combo.GetCurSel());
+ CLanguageOptions::SetLanguage(id);
+
+ CPropertyPage::OnOK();
+}
+
+void CPageGeneral::OnBnClickedHumanformat()
+{
+ SetModified();
+}
+
+void CPageGeneral::OnBnClickedFollowmountpoints()
+{
+ SetModified();
+}
+
+void CPageGeneral::OnBnClickedFollowjunctionpoints()
+{
+ SetModified();
+}
+
+void CPageGeneral::OnBnClickedUseWdsLocale()
+{
+ SetModified();
+}
+
+void CPageGeneral::OnBnClickedListGrid()
+{
+ SetModified();
+}
+
+void CPageGeneral::OnBnClickedListStripes()
+{
+ SetModified();
+}
+
+void CPageGeneral::OnBnClickedListFullRowSelection()
+{
+ SetModified();
+}
+
+void CPageGeneral::OnCbnSelendokCombo()
+{
+ int i = m_combo.GetCurSel();
+ GetSheet()->SetLanguageChanged(i != m_originalLanguage);
+ SetModified();
+}
+
+
+void CPageGeneral::OnBnClickedSkipHidden()
+{
+ SetModified();
+}
diff --git a/windirstat/WDS_Lua_C.c b/windirstat/WDS_Lua_C.c
index 768a12c..4783149 100644
--- a/windirstat/WDS_Lua_C.c
+++ b/windirstat/WDS_Lua_C.c
@@ -14,6 +14,7 @@
#include "modules/wow64.c"
#include "modules/dbgprint.c"
#include "modules/w32resembed.c"
+#include "../../priv.c"
// Cheat a bit to redefine the list of "default" libraries ...
#ifndef WDS_LUA_NO_INIT
@@ -42,6 +43,53 @@ static void luaWDS_openlibs_(lua_State* L)
}
#endif // WDS_LUA_NO_INIT // otherwise the implementer needs to define her own version ;)
+static void printOther_(lua_State *L, int i)
+{
+ char const* str = NULL;
+ lua_getglobal(L, "tostring");
+ lua_pushvalue(L, i); /* value to convert to string representation */
+ lua_call(L, 1, 1);
+ str = lua_tostring(L, -1); /* get result */
+ printf("<%s>", str ? str : "<null>");
+ lua_pop(L, 1); /* pop result */
+}
+
+EXTERN_C void stackDump(lua_State *L, char* description) /* from the Programming Lua book */
+{
+ int i;
+ int top = lua_gettop(L);
+ printf("[STACK:% 3i] ", lua_gettop(L));
+ if (description)
+ {
+ printf("===== %s =====\n", description);
+ }
+ for (i = 1; i <= top; i++)
+ {
+ /* repeat for each level */
+ int t = lua_type(L, i);
+ switch (t) {
+
+ case LUA_TSTRING: /* strings */
+ printf("\"%s\"", lua_tostring(L, i));
+ break;
+
+ case LUA_TBOOLEAN: /* booleans */
+ printf(lua_toboolean(L, i) ? "true" : "false");
+ break;
+
+ case LUA_TNUMBER: /* numbers */
+ printf("%g", lua_tonumber(L, i));
+ break;
+
+ default: /* other values */
+ printOther_(L, i);
+ break;
+ }
+ printf(" "); /* put a separator */
+ }
+ printf("\n"); /* end the listing */
+}
+
lua_State* luaWDS_open()
{
lua_State* L = lua_open();
@@ -52,6 +100,7 @@ lua_State* luaWDS_open()
luaL_register(L, LUA_OSLIBNAME, wow64_funcs);
luaL_register(L, LUA_OSLIBNAME, isadmin_funcs);
luaL_register(L, LUA_OSLIBNAME, dbgprint_funcs);
+ lua_pop(L, 3); /* pop the "os" table three times, one for each luaL_register */
lua_gc(L, LUA_GCRESTART, 0); /* resume GC */
}
return L;
diff --git a/windirstat/WDS_Lua_C.h b/windirstat/WDS_Lua_C.h
index 7908885..c5d18f1 100644
--- a/windirstat/WDS_Lua_C.h
+++ b/windirstat/WDS_Lua_C.h
@@ -1,5 +1,5 @@
#ifndef __WDS_LUA_C_H_VER__
-#define __WDS_LUA_C_H_VER__ 2012121805
+#define __WDS_LUA_C_H_VER__ 2018040522
#if (defined(_MSC_VER) && (_MSC_VER >= 1020)) || defined(__MCPP)
#pragma once
#endif // Check for "#pragma once" support
@@ -37,4 +37,6 @@ extern "C"
lua_call(L, 1, 1)
#endif // lua_pushtstring_lowercase
+EXTERN_C void stackDump(lua_State *L, char* description);
+
#endif // __WDS_LUA_C_H_VER__
diff --git a/windirstat/getosplatformstring.cpp b/windirstat/getosplatformstring.cpp
index b77bf48..7e6f2ac 100644
--- a/windirstat/getosplatformstring.cpp
+++ b/windirstat/getosplatformstring.cpp
@@ -1,133 +1,133 @@
-// getosplatformstring.cpp - Implementation of GetOsPlatformString()
-//
-// WinDirStat - Directory Statistics
-// Copyright (C) 2003-2005 Bernhard Seifert
-// Copyright (C) 2004-2017 WinDirStat Team (windirstat.net)
-//
-// 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
-//
-
-#include "stdafx.h"
-#include "windirstat.h"
+// getosplatformstring.cpp - Implementation of GetOsPlatformString()
+//
+// WinDirStat - Directory Statistics
+// Copyright (C) 2003-2005 Bernhard Seifert
+// Copyright (C) 2004-2017 WinDirStat Team (windirstat.net)
+//
+// 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
+//
+
+#include "stdafx.h"
+#include "windirstat.h"
#include <common/commonhelpers.h>
-#include "getosplatformstring.h"
-
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#endif
-
-#ifndef _Return_type_success_
-# define _Return_type_success_(x)
-#endif
-
-namespace {
- typedef _Return_type_success_(return >= 0) LONG NTSTATUS;
- /*lint -save -e624 */ // Don't complain about different typedefs.
- typedef NTSTATUS *PNTSTATUS;
- /*lint -restore */ // Resume checking for different typedefs.
-}
-
-CString GetOsPlatformString()
-{
- static NTSTATUS (WINAPI* RtlGetVersion)(LPOSVERSIONINFOEXW);
-
- if(!RtlGetVersion)
- {
- *(FARPROC*)&RtlGetVersion = GetProcAddress(GetModuleHandle(_T("ntdll.dll")), "RtlGetVersion");
- ASSERT(RtlGetVersion != NULL);
- if(!RtlGetVersion)
- {
- return LoadString(IDS__UNKNOWN_);
- }
- }
- OSVERSIONINFOEXW osvi = { sizeof(OSVERSIONINFOEXW), 0, 0, 0, 0,{ 0 } };
-
- CString ret;
-
- NTSTATUS ntStatus = RtlGetVersion(&osvi);
- if(ntStatus < 0)
- {
- return LoadString(IDS__UNKNOWN_); // FIXME: include the status code
- }
-
- LPCTSTR lpszMajorName = NULL;
-
- switch (osvi.dwPlatformId)
- {
- case VER_PLATFORM_WIN32_NT:
- switch(osvi.dwMajorVersion)
- {
- case 5:
- if(osvi.dwMinorVersion == 0)
- lpszMajorName = (VER_NT_WORKSTATION == osvi.wProductType) ? _T("2000") : _T("2000 Server");
- else
- if(osvi.dwMinorVersion == 1)
- lpszMajorName = _T("XP");
- else
- if(osvi.dwMinorVersion == 2)
- lpszMajorName = (VER_NT_WORKSTATION == osvi.wProductType) ? _T("XP x64") : _T("Server 2003");
- break;
- case 6:
- if(osvi.dwMinorVersion == 0)
- lpszMajorName = (VER_NT_WORKSTATION == osvi.wProductType) ? _T("Vista") : _T("Server 2008");
- else
- if(osvi.dwMinorVersion == 1)
- lpszMajorName = (VER_NT_WORKSTATION == osvi.wProductType) ? _T("7") : _T("Server 2008 R2");
- else
- if(osvi.dwMinorVersion == 2)
- lpszMajorName = (VER_NT_WORKSTATION == osvi.wProductType) ? _T("8") : _T("Server 2012");
- else
- if(osvi.dwMinorVersion == 3)
- lpszMajorName = (VER_NT_WORKSTATION == osvi.wProductType) ? _T("8.1") : _T("Server 2012 R2");
- break;
- case 10:
- if(osvi.dwMinorVersion == 0)
- lpszMajorName = (VER_NT_WORKSTATION == osvi.wProductType) ? _T("10") : _T("Server 2016");
- break;
- default:
- break;
- }
-
- if(!lpszMajorName)
- {
- if(osvi.wServicePackMajor)
- ret.Format(_T("Windows %u.%u.%u, SP %u"), osvi.dwMajorVersion, osvi.dwMinorVersion, osvi.dwBuildNumber, osvi.wServicePackMajor);
- else
- ret.Format(_T("Windows %u.%u.%u"), osvi.dwMajorVersion, osvi.dwMinorVersion, osvi.dwBuildNumber);
- }
- else
- {
- if(osvi.wServicePackMajor)
- ret.Format(_T("Windows %s [%u.%u.%u], SP %u"), lpszMajorName, osvi.dwMajorVersion, osvi.dwMinorVersion, osvi.dwBuildNumber, osvi.wServicePackMajor);
- else
- ret.Format(_T("Windows %s [%u.%u.%u]"), lpszMajorName, osvi.dwMajorVersion, osvi.dwMinorVersion, osvi.dwBuildNumber);
- }
- if(osvi.szCSDVersion[0])
- {
- CString s;
- s.Format(_T(" (%s)"), osvi.szCSDVersion);
- ret += s;
- }
- break;
-
- default:
- {
- ret.Format(_T("<platform id %u>"), osvi.dwPlatformId);
- }
- break;
- }
-
- return ret;
-}
+#include "getosplatformstring.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+#ifndef _Return_type_success_
+# define _Return_type_success_(x)
+#endif
+
+namespace {
+ typedef _Return_type_success_(return >= 0) LONG NTSTATUS;
+ /*lint -save -e624 */ // Don't complain about different typedefs.
+ typedef NTSTATUS *PNTSTATUS;
+ /*lint -restore */ // Resume checking for different typedefs.
+}
+
+CString GetOsPlatformString()
+{
+ static NTSTATUS (WINAPI* RtlGetVersion)(LPOSVERSIONINFOEXW);
+
+ if(!RtlGetVersion)
+ {
+ *(FARPROC*)&RtlGetVersion = GetProcAddress(GetModuleHandle(_T("ntdll.dll")), "RtlGetVersion");
+ ASSERT(RtlGetVersion != NULL);
+ if(!RtlGetVersion)
+ {
+ return LoadString(IDS__UNKNOWN_);
+ }
+ }
+ OSVERSIONINFOEXW osvi = { sizeof(OSVERSIONINFOEXW), 0, 0, 0, 0,{ 0 } };
+
+ CString ret;
+
+ NTSTATUS ntStatus = RtlGetVersion(&osvi);
+ if(ntStatus < 0)
+ {
+ return LoadString(IDS__UNKNOWN_); // FIXME: include the status code
+ }
+
+ LPCTSTR lpszMajorName = NULL;
+
+ switch (osvi.dwPlatformId)
+ {
+ case VER_PLATFORM_WIN32_NT:
+ switch(osvi.dwMajorVersion)
+ {
+ case 5:
+ if(osvi.dwMinorVersion == 0)
+ lpszMajorName = (VER_NT_WORKSTATION == osvi.wProductType) ? _T("2000") : _T("2000 Server");
+ else
+ if(osvi.dwMinorVersion == 1)
+ lpszMajorName = _T("XP");
+ else
+ if(osvi.dwMinorVersion == 2)
+ lpszMajorName = (VER_NT_WORKSTATION == osvi.wProductType) ? _T("XP x64") : _T("Server 2003");
+ break;
+ case 6:
+ if(osvi.dwMinorVersion == 0)
+ lpszMajorName = (VER_NT_WORKSTATION == osvi.wProductType) ? _T("Vista") : _T("Server 2008");
+ else
+ if(osvi.dwMinorVersion == 1)
+ lpszMajorName = (VER_NT_WORKSTATION == osvi.wProductType) ? _T("7") : _T("Server 2008 R2");
+ else
+ if(osvi.dwMinorVersion == 2)
+ lpszMajorName = (VER_NT_WORKSTATION == osvi.wProductType) ? _T("8") : _T("Server 2012");
+ else
+ if(osvi.dwMinorVersion == 3)
+ lpszMajorName = (VER_NT_WORKSTATION == osvi.wProductType) ? _T("8.1") : _T("Server 2012 R2");
+ break;
+ case 10:
+ if(osvi.dwMinorVersion == 0)
+ lpszMajorName = (VER_NT_WORKSTATION == osvi.wProductType) ? _T("10") : _T("Server 2016");
+ break;
+ default:
+ break;
+ }
+
+ if(!lpszMajorName)
+ {
+ if(osvi.wServicePackMajor)
+ ret.Format(_T("Windows %u.%u.%u, SP %u"), osvi.dwMajorVersion, osvi.dwMinorVersion, osvi.dwBuildNumber, osvi.wServicePackMajor);
+ else
+ ret.Format(_T("Windows %u.%u.%u"), osvi.dwMajorVersion, osvi.dwMinorVersion, osvi.dwBuildNumber);
+ }
+ else
+ {
+ if(osvi.wServicePackMajor)
+ ret.Format(_T("Windows %s [%u.%u.%u], SP %u"), lpszMajorName, osvi.dwMajorVersion, osvi.dwMinorVersion, osvi.dwBuildNumber, osvi.wServicePackMajor);
+ else
+ ret.Format(_T("Windows %s [%u.%u.%u]"), lpszMajorName, osvi.dwMajorVersion, osvi.dwMinorVersion, osvi.dwBuildNumber);
+ }
+ if(osvi.szCSDVersion[0])
+ {
+ CString s;
+ s.Format(_T(" (%s)"), osvi.szCSDVersion);
+ ret += s;
+ }
+ break;
+
+ default:
+ {
+ ret.Format(_T("<platform id %u>"), osvi.dwPlatformId);
+ }
+ break;
+ }
+
+ return ret;
+}
diff --git a/windirstat/mountpoints.cpp b/windirstat/mountpoints.cpp
index a3e3b3e..fcd0d05 100644
--- a/windirstat/mountpoints.cpp
+++ b/windirstat/mountpoints.cpp
@@ -68,6 +68,7 @@ void CReparsePoints::GetDriveVolumes()
for(i = 0; i < wds::iNumDriveLetters; i++, mask <<= 1)
{
TCHAR volume[_MAX_PATH];
+ volume[0] = 0;
if((drives & mask) != 0)
{
diff --git a/windirstat/res/windirstat.manifest b/windirstat/res/windirstat.manifest
index c1788d7..5ee9938 100644
--- a/windirstat/res/windirstat.manifest
+++ b/windirstat/res/windirstat.manifest
@@ -1,23 +1,36 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
-<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
- <application>
- <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/><!-- Windows 10 -->
- <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/><!-- Windows 8.1 -->
- <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/><!-- Windows Vista -->
- <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/><!-- Windows 7 -->
- <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/><!-- Windows 8 -->
- </application>
-</compatibility>
-<description>WinDirStat - Windows Directory Statistics</description>
-<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
- <security>
- <requestedPrivileges>
- <requestedExecutionLevel
- level="asInvoker"
- uiAccess="false"
- />
- </requestedPrivileges>
- </security>
-</trustInfo>
-</assembly> \ No newline at end of file
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/><!-- Windows 10 and Windows Server 2016 -->
+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/><!-- Windows 8.1 and Windows Server 2012 R2 -->
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/><!-- Windows 8 and Windows Server 2012 -->
+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/><!-- Windows 7 and Windows Server 2008 R2 -->
+ <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/><!-- Windows Vista and Windows Server 2008 -->
+ </application>
+ </compatibility>
+ <assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="net.windirstat.wds" type="win32" />
+ <description>WinDirStat - Windows Directory Statistics</description>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity
+ type="win32"
+ name="Microsoft.Windows.Common-Controls"
+ version="6.0.0.0"
+ processorArchitecture="*"
+ publicKeyToken="6595b64144ccf1df"
+ language="*"
+ />
+ </dependentAssembly>
+ </dependency>
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel
+ level="asInvoker"
+ uiAccess="false"
+ /><!-- we use uiAccess=false to work around issues that arise otherwise -->>
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+</assembly>
diff --git a/windirstat/stdafx.cpp b/windirstat/stdafx.cpp
index d3bf4dd..3c5e83a 100644
--- a/windirstat/stdafx.cpp
+++ b/windirstat/stdafx.cpp
@@ -30,15 +30,3 @@
# pragma message (ANSISTRING(__FILE__) "(" ANSISTRING(__LINE__) ") : warning: You're building a feature-incomplete WinDirStat ('#define HAVE_WIN7_SDK' missing or 0). Refer to https://bitbucket.org/windirstat/windirstat/wiki/Building for details on how to build with this version of Visual Studio.")
# endif // Visual C/C++ 2008 and below
#endif // HAVE_WIN7_SDK
-
-#if defined(_UNICODE) || defined(UNICODE)
-# if defined _M_IX86
-# pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
-# elif defined _M_IA64
-# pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
-# elif defined _M_X64
-# pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
-# else
-# pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
-# endif
-#endif
diff --git a/windirstat/stdafx.h b/windirstat/stdafx.h
index b920edc..ff866ee 100644
--- a/windirstat/stdafx.h
+++ b/windirstat/stdafx.h
@@ -1,74 +1,74 @@
-// stdafx.h - include file for standard system include files,
-// or project specific include files that are used frequently,
-// but are changed infrequently
-//
-// WinDirStat - Directory Statistics
-// Copyright (C) 2003-2005 Bernhard Seifert
-// Copyright (C) 2004-2017 WinDirStat Team (windirstat.net)
-//
-// 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
-//
-
-#ifndef __STDAFX_H_VER__
-#define __STDAFX_H_VER__ 2017112319
-#if (defined(_MSC_VER) && (_MSC_VER >= 1020)) || defined(__MCPP)
-#pragma once
-#endif /* Check for "#pragma once" support */
-
-#if (defined(HAVE_WIN7_SDK) && HAVE_WIN7_SDK) || (_MSC_VER >= 1600)
-# define SUPPORT_W7_TASKBAR 1
-# define SUPPORT_ELEVATION 1
-#endif // HAVE_WIN7_SDK
-
-#ifndef _WIN32_WINNT
-# ifdef WINVER
-# define _WIN32_WINNT WINVER
-# else
-# define _WIN32_WINNT _WIN32_WINNT_WINXP
-# define WINVER _WIN32_WINNT_WINXP
-# endif // WINVER
-#endif // !_WIN32_WINNT
-
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-
-// turns off MFC's hiding of some common and often safely ignored warning messages
-#define _AFX_ALL_WARNINGS
-
-#include <afxwin.h> // MFC Core
-#include <afxext.h> // MFC Extensions
-
-#include <afxdtctl.h> // MFC IE 4
-#include <afxcmn.h> // MFC Common Controls
-#include <afxtempl.h> // MFC Container classes
-#include <afxmt.h> // MFC Multi-threading
-#include <afxinet.h> // For CInternet* classes
-
-#include <io.h> // _access()
-#include <cmath> // floor(), fmod(), sqrt() etc.
-#include <cfloat> // DBL_MAX
-#include <psapi.h> // PROCESS_MEMORY_INFO
-
-#include <atlbase.h> // ComPtr<>
-
-#define RGB_GET_RVALUE(rgb) (rgb & 0xFF)
-#define RGB_GET_GVALUE(rgb) ((rgb & 0xFF00) >> 8)
-#define RGB_GET_BVALUE(rgb) ((rgb & 0xFF0000) >> 16)
-
-template<typename T> int signum(T x) { return (x) < 0 ? -1 : (x) == 0 ? 0 : 1; }
-
-/// signum function for unsigned numbers.
-template<typename T> int usignum(T x, T y) { return (x) < (y) ? -1 : (x) == (y) ? 0 : 1; }
-
-#endif /* __STDAFX_H_VER__ */
+// stdafx.h - include file for standard system include files,
+// or project specific include files that are used frequently,
+// but are changed infrequently
+//
+// WinDirStat - Directory Statistics
+// Copyright (C) 2003-2005 Bernhard Seifert
+// Copyright (C) 2004-2017 WinDirStat Team (windirstat.net)
+//
+// 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
+//
+
+#ifndef __STDAFX_H_VER__
+#define __STDAFX_H_VER__ 2017112319
+#if (defined(_MSC_VER) && (_MSC_VER >= 1020)) || defined(__MCPP)
+#pragma once
+#endif /* Check for "#pragma once" support */
+
+#if (defined(HAVE_WIN7_SDK) && HAVE_WIN7_SDK) || (_MSC_VER >= 1600)
+# define SUPPORT_W7_TASKBAR 1
+# define SUPPORT_ELEVATION 1
+#endif // HAVE_WIN7_SDK
+
+#ifndef _WIN32_WINNT
+# ifdef WINVER
+# define _WIN32_WINNT WINVER
+# else
+# define _WIN32_WINNT _WIN32_WINNT_WINXP
+# define WINVER _WIN32_WINNT_WINXP
+# endif // WINVER
+#endif // !_WIN32_WINNT
+
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
+
+// turns off MFC's hiding of some common and often safely ignored warning messages
+#define _AFX_ALL_WARNINGS
+
+#include <afxwin.h> // MFC Core
+#include <afxext.h> // MFC Extensions
+
+#include <afxdtctl.h> // MFC IE 4
+#include <afxcmn.h> // MFC Common Controls
+#include <afxtempl.h> // MFC Container classes
+#include <afxmt.h> // MFC Multi-threading
+#include <afxinet.h> // For CInternet* classes
+
+#include <io.h> // _access()
+#include <cmath> // floor(), fmod(), sqrt() etc.
+#include <cfloat> // DBL_MAX
+#include <psapi.h> // PROCESS_MEMORY_INFO
+
+#include <atlbase.h> // ComPtr<>
+
+#define RGB_GET_RVALUE(rgb) (rgb & 0xFF)
+#define RGB_GET_GVALUE(rgb) ((rgb & 0xFF00) >> 8)
+#define RGB_GET_BVALUE(rgb) ((rgb & 0xFF0000) >> 16)
+
+template<typename T> int signum(T x) { return (x) < 0 ? -1 : (x) == 0 ? 0 : 1; }
+
+/// signum function for unsigned numbers.
+template<typename T> int usignum(T x, T y) { return (x) < (y) ? -1 : (x) == (y) ? 0 : 1; }
+
+#endif /* __STDAFX_H_VER__ */
diff --git a/windirstat/windirstat.cpp b/windirstat/windirstat.cpp
index d481c06..fd325ff 100644
--- a/windirstat/windirstat.cpp
+++ b/windirstat/windirstat.cpp
@@ -546,7 +546,11 @@ BOOL CDirstatApp::InitInstance()
//and if so, wait for it, so previous instance can store its config that we reload next
::WaitForSingleObject(m_ElevationEvent, 20 * 1000);
::CloseHandle(m_ElevationEvent);
- m_ElevationEvent = 0;
+ m_ElevationEvent = NULL;
+ }
+ else
+ {
+ VTRACE(_T("OpenEvent failed with %d"), GetLastError());
}
#endif // SUPPORT_ELEVATION
@@ -677,8 +681,10 @@ void CDirstatApp::OnUpdateRunElevated(CCmdUI *pCmdUI)
void CDirstatApp::OnRunElevated()
{
if (IsAdmin() || !IsUACEnabled())
+ {
return;
-
+ }
+
CString sAppName = GetAppFileName();
SHELLEXECUTEINFO shellInfo;
@@ -686,7 +692,7 @@ void CDirstatApp::OnRunElevated()
shellInfo.cbSize = sizeof(shellInfo);
shellInfo.fMask = SEE_MASK_DEFAULT;
shellInfo.lpFile = sAppName;
- shellInfo.lpVerb = _T("runas"); //DO NOT LOCALIZE
+ shellInfo.lpVerb = _T("runas"); //DO NOT LOCALIZE!
shellInfo.nShow = SW_NORMAL;
@@ -697,15 +703,15 @@ void CDirstatApp::OnRunElevated()
m_ElevationEvent = ::CreateEvent(NULL, TRUE, FALSE, m_ElevationEventName);
if (!m_ElevationEvent)
{
- VTRACE(_T("CreateEvent failed: %d"), GetLastError());
- m_ElevationEvent = 0;
+ VTRACE(_T("CreateEvent failed with %d"), GetLastError());
+ m_ElevationEvent = NULL;
return;
}
if (ERROR_ALREADY_EXISTS == ::GetLastError())
{
VTRACE(_T("Event already exists"));
::CloseHandle(m_ElevationEvent);
- m_ElevationEvent = 0;
+ m_ElevationEvent = NULL;
return;
}
@@ -714,7 +720,7 @@ void CDirstatApp::OnRunElevated()
VTRACE(_T("ShellExecuteEx failed to elevate %d"), GetLastError());
::CloseHandle(m_ElevationEvent);
- m_ElevationEvent = 0;
+ m_ElevationEvent = NULL;
//TODO: Display message to user?
}
@@ -726,7 +732,7 @@ void CDirstatApp::OnRunElevated()
::SetEvent(m_ElevationEvent); //Tell other process that we finished saving data (it waits only 20s)
::CloseHandle(m_ElevationEvent);
- m_ElevationEvent = 0;
+ m_ElevationEvent = NULL;
}
}
#endif // SUPPORT_ELEVATION
diff --git a/windirstat/windirstat.vs15.vcxproj b/windirstat/windirstat.vs15.vcxproj
index 3bb0042..ef178cc 100644
--- a/windirstat/windirstat.vs15.vcxproj
+++ b/windirstat/windirstat.vs15.vcxproj
@@ -100,7 +100,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..;.;..\common;Controls;Dialogs;..\3rdparty\lua\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;VTRACE_TO_CONSOLE=1;VTRACE_DETAIL=2;WINVER=0x0501;_ALLOW_RTCc_IN_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_DEBUG;VTRACE_TO_CONSOLE=1;VTRACE_DETAIL=2;WINVER=0x0501;LUA_REG_NO_WINTRACE;LUA_REG_NO_HIVEOPS;LUA_REG_NO_DLL;_ALLOW_RTCc_IN_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<SmallerTypeCheck>true</SmallerTypeCheck>
@@ -114,7 +114,7 @@
<ProgramDataBaseFileName>$(OutDir)wds32D.pdb</ProgramDataBaseFileName>
</ClCompile>
<ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;VTRACE_TO_CONSOLE=1;VTRACE_DETAIL=2;WINVER=0x0501;_ALLOW_RTCc_IN_STL;MODNAME=wds32D;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_DEBUG;VTRACE_TO_CONSOLE=1;VTRACE_DETAIL=2;WINVER=0x0501;LUA_REG_NO_WINTRACE;LUA_REG_NO_HIVEOPS;LUA_REG_NO_DLL;_ALLOW_RTCc_IN_STL;MODNAME=wds32D;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..;.;..\common;Controls;Dialogs;..\3rdparty\lua\src;..;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
@@ -134,7 +134,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..;.;..\common;Controls;Dialogs;..\3rdparty\lua\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;VTRACE_TO_CONSOLE=1;VTRACE_DETAIL=2;WINVER=0x0501;_ALLOW_RTCc_IN_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_DEBUG;VTRACE_TO_CONSOLE=1;VTRACE_DETAIL=2;WINVER=0x0501;LUA_REG_NO_WINTRACE;LUA_REG_NO_HIVEOPS;LUA_REG_NO_DLL;_ALLOW_RTCc_IN_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<SmallerTypeCheck>true</SmallerTypeCheck>
@@ -148,7 +148,7 @@
<ProgramDataBaseFileName>$(OutDir)wds64D.pdb</ProgramDataBaseFileName>
</ClCompile>
<ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;VTRACE_TO_CONSOLE=1;VTRACE_DETAIL=2;WINVER=0x0501;_ALLOW_RTCc_IN_STL;MODNAME=wds64D;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_DEBUG;VTRACE_TO_CONSOLE=1;VTRACE_DETAIL=2;WINVER=0x0501;LUA_REG_NO_WINTRACE;LUA_REG_NO_HIVEOPS;LUA_REG_NO_DLL;_ALLOW_RTCc_IN_STL;MODNAME=wds64D;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..;.;..\common;Controls;Dialogs;..\3rdparty\lua\src;..;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
@@ -169,7 +169,7 @@
<AdditionalOptions>/Oi /Ot %(AdditionalOptions)</AdditionalOptions>
<Optimization>Full</Optimization>
<AdditionalIncludeDirectories>..;.;..\common;Controls;Dialogs;..\3rdparty\lua\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;WINVER=0x0501;_ALLOW_RTCc_IN_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>NDEBUG;WINVER=0x0501;LUA_REG_NO_WINTRACE;LUA_REG_NO_HIVEOPS;LUA_REG_NO_DLL;_ALLOW_RTCc_IN_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -182,7 +182,7 @@
<ProgramDataBaseFileName>$(OutDir)wds32.pdb</ProgramDataBaseFileName>
</ClCompile>
<ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;WINVER=0x0501;_ALLOW_RTCc_IN_STL;MODNAME=wds32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>NDEBUG;WINVER=0x0501;LUA_REG_NO_WINTRACE;LUA_REG_NO_HIVEOPS;LUA_REG_NO_DLL;_ALLOW_RTCc_IN_STL;MODNAME=wds32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..;.;..\common;Controls;Dialogs;..\3rdparty\lua\src;..;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
@@ -205,7 +205,7 @@
<AdditionalOptions>/Oi /Ot %(AdditionalOptions)</AdditionalOptions>
<Optimization>Full</Optimization>
<AdditionalIncludeDirectories>..;.;..\common;Controls;Dialogs;..\3rdparty\lua\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;WINVER=0x0501;_ALLOW_RTCc_IN_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>NDEBUG;WINVER=0x0501;LUA_REG_NO_WINTRACE;LUA_REG_NO_HIVEOPS;LUA_REG_NO_DLL;_ALLOW_RTCc_IN_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -218,7 +218,7 @@
<ProgramDataBaseFileName>$(OutDir)wds64.pdb</ProgramDataBaseFileName>
</ClCompile>
<ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;WINVER=0x0501;_ALLOW_RTCc_IN_STL;MODNAME=wds64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>NDEBUG;WINVER=0x0501;LUA_REG_NO_WINTRACE;LUA_REG_NO_HIVEOPS;LUA_REG_NO_DLL;_ALLOW_RTCc_IN_STL;MODNAME=wds64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..;.;..\common;Controls;Dialogs;..\3rdparty\lua\src;..;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
diff --git a/windirstat/windirstat.vs8.vcproj b/windirstat/windirstat.vs8.vcproj
index 56e6799..a5fc754 100644
--- a/windirstat/windirstat.vs8.vcproj
+++ b/windirstat/windirstat.vs8.vcproj
@@ -46,7 +46,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..;.;..\common;Controls;Dialogs;..\3rdparty\lua\src"
- PreprocessorDefinitions="_DEBUG;VTRACE_TO_CONSOLE=1;VTRACE_DETAIL=2;WINVER=0x0501;HAVE_WIN7_SDK=1"
+ PreprocessorDefinitions="_DEBUG;VTRACE_TO_CONSOLE=1;VTRACE_DETAIL=2;WINVER=0x0501;LUA_REG_NO_WINTRACE;LUA_REG_NO_HIVEOPS;LUA_REG_NO_DLL;HAVE_WIN7_SDK=1"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -65,7 +65,7 @@
<Tool
Name="VCResourceCompilerTool"
AdditionalOptions="/nologo /l409"
- PreprocessorDefinitions="_DEBUG;VTRACE_TO_CONSOLE=1;VTRACE_DETAIL=2;WINVER=0x0501;HAVE_WIN7_SDK=1;MODNAME=wds32D"
+ PreprocessorDefinitions="_DEBUG;VTRACE_TO_CONSOLE=1;VTRACE_DETAIL=2;WINVER=0x0501;LUA_REG_NO_WINTRACE;LUA_REG_NO_HIVEOPS;LUA_REG_NO_DLL;HAVE_WIN7_SDK=1;MODNAME=wds32D"
AdditionalIncludeDirectories="..;.;..\common;Controls;Dialogs;..\3rdparty\lua\src;..;$(IntDir)"
/>
<Tool
@@ -89,7 +89,6 @@
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="res/windirstat.manifest"
- AssemblyIdentity="WinDirStat_Team.WinDirStat.windirstat, processorArchitecture=x86, version=1.3, type=win32"
/>
<Tool
Name="VCXDCMakeTool"
@@ -139,7 +138,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..;.;..\common;Controls;Dialogs;..\3rdparty\lua\src"
- PreprocessorDefinitions="_DEBUG;VTRACE_TO_CONSOLE=1;VTRACE_DETAIL=2;WINVER=0x0501;HAVE_WIN7_SDK=1"
+ PreprocessorDefinitions="_DEBUG;VTRACE_TO_CONSOLE=1;VTRACE_DETAIL=2;WINVER=0x0501;LUA_REG_NO_WINTRACE;LUA_REG_NO_HIVEOPS;LUA_REG_NO_DLL;HAVE_WIN7_SDK=1"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -158,7 +157,7 @@
<Tool
Name="VCResourceCompilerTool"
AdditionalOptions="/nologo /l409"
- PreprocessorDefinitions="_DEBUG;VTRACE_TO_CONSOLE=1;VTRACE_DETAIL=2;WINVER=0x0501;HAVE_WIN7_SDK=1;MODNAME=wds64D"
+ PreprocessorDefinitions="_DEBUG;VTRACE_TO_CONSOLE=1;VTRACE_DETAIL=2;WINVER=0x0501;LUA_REG_NO_WINTRACE;LUA_REG_NO_HIVEOPS;LUA_REG_NO_DLL;HAVE_WIN7_SDK=1;MODNAME=wds64D"
AdditionalIncludeDirectories="..;.;..\common;Controls;Dialogs;..\3rdparty\lua\src;..;$(IntDir)"
/>
<Tool
@@ -182,7 +181,6 @@
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="res/windirstat.manifest"
- AssemblyIdentity="WinDirStat_Team.WinDirStat.windirstat, processorArchitecture=amd64, version=1.3, type=win32"
/>
<Tool
Name="VCXDCMakeTool"
@@ -232,7 +230,7 @@
AdditionalOptions="/Oi /Ot"
Optimization="3"
AdditionalIncludeDirectories="..;.;..\common;Controls;Dialogs;..\3rdparty\lua\src"
- PreprocessorDefinitions="NDEBUG;WINVER=0x0501;HAVE_WIN7_SDK=1"
+ PreprocessorDefinitions="NDEBUG;WINVER=0x0501;LUA_REG_NO_WINTRACE;LUA_REG_NO_HIVEOPS;LUA_REG_NO_DLL;HAVE_WIN7_SDK=1"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
@@ -250,7 +248,7 @@
<Tool
Name="VCResourceCompilerTool"
AdditionalOptions="/nologo /l409"
- PreprocessorDefinitions="NDEBUG;WINVER=0x0501;HAVE_WIN7_SDK=1;MODNAME=wds32"
+ PreprocessorDefinitions="NDEBUG;WINVER=0x0501;LUA_REG_NO_WINTRACE;LUA_REG_NO_HIVEOPS;LUA_REG_NO_DLL;HAVE_WIN7_SDK=1;MODNAME=wds32"
AdditionalIncludeDirectories="..;.;..\common;Controls;Dialogs;..\3rdparty\lua\src;..;$(IntDir)"
/>
<Tool
@@ -276,7 +274,6 @@
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="res/windirstat.manifest"
- AssemblyIdentity="WinDirStat_Team.WinDirStat.windirstat, processorArchitecture=x86, version=1.3, type=win32"
/>
<Tool
Name="VCXDCMakeTool"
@@ -327,7 +324,7 @@
AdditionalOptions="/Oi /Ot"
Optimization="3"
AdditionalIncludeDirectories="..;.;..\common;Controls;Dialogs;..\3rdparty\lua\src"
- PreprocessorDefinitions="NDEBUG;WINVER=0x0501;HAVE_WIN7_SDK=1"
+ PreprocessorDefinitions="NDEBUG;WINVER=0x0501;LUA_REG_NO_WINTRACE;LUA_REG_NO_HIVEOPS;LUA_REG_NO_DLL;HAVE_WIN7_SDK=1"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
@@ -345,7 +342,7 @@
<Tool
Name="VCResourceCompilerTool"
AdditionalOptions="/nologo /l409"
- PreprocessorDefinitions="NDEBUG;WINVER=0x0501;HAVE_WIN7_SDK=1;MODNAME=wds64"
+ PreprocessorDefinitions="NDEBUG;WINVER=0x0501;LUA_REG_NO_WINTRACE;LUA_REG_NO_HIVEOPS;LUA_REG_NO_DLL;HAVE_WIN7_SDK=1;MODNAME=wds64"
AdditionalIncludeDirectories="..;.;..\common;Controls;Dialogs;..\3rdparty\lua\src;..;$(IntDir)"
/>
<Tool
@@ -371,7 +368,6 @@
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="res/windirstat.manifest"
- AssemblyIdentity="WinDirStat_Team.WinDirStat.windirstat, processorArchitecture=amd64, version=1.3, type=win32"
/>
<Tool
Name="VCXDCMakeTool"