Skip to content

Commit

Permalink
ver_c0: 2019, cloud skip
Browse files Browse the repository at this point in the history
  • Loading branch information
Maximus5 committed Dec 26, 2020
1 parent 5cb819b commit 207f957
Show file tree
Hide file tree
Showing 8 changed files with 635 additions and 37 deletions.
5 changes: 5 additions & 0 deletions Col0/ver_c0/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@
/final.64W.vc
/makefile_gcc
/pe.def
/build
/debug
/ver_c0.x86
/ver_c0.x64
/.vs
7 changes: 7 additions & 0 deletions Col0/ver_c0/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Version 3.2

* Don't load cloud files (OneDrive free up space feature).


Version 3.1

* '.sys' extension added

* More extensions supported (dl, so, fmt, module, fll, ahp, t32, t64, sfx).
Expand Down
22 changes: 21 additions & 1 deletion Col0/ver_c0/pe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <windows.h>
#include <wintrust.h>

#ifndef FILE_ATTRIBUTE_RECALL_ON_OPEN
#define FILE_ATTRIBUTE_RECALL_ON_OPEN 0x00040000 // NOLINT(cppcoreguidelines-macro-usage)
#endif
#ifndef FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS
#define FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS 0x00400000 // NOLINT(cppcoreguidelines-macro-usage)
#endif

#undef USE_TRACE
//#define USE_TRACE

Expand All @@ -49,7 +56,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../../../common/Defines.h"
#include "../../../common/Memory.h"
#else
#define _wsprintf wsprintfW
// ReSharper disable once CppInconsistentNaming
#define _wsprintf wsprintfW // NOLINT(cppcoreguidelines-macro-usage)
#define SKIPLEN(x)
#endif

Expand All @@ -58,6 +66,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif

#ifdef _DEBUG
// ReSharper disable once CppInconsistentNaming
#define Msg(f,s) //MessageBoxA(NULL,s,f,MB_OK|MB_SETFOREGROUND)
#else
#define Msg(f,s)
Expand Down Expand Up @@ -2888,6 +2897,17 @@ intptr_t WINAPI GetContentDataW(struct GetContentDataInfo *Info)
// lstrcat(pszBuffer, FilePath);
// pszUNCPath = pszBuffer;
//}

// Don't trigger downloads of cloud files
const DWORD fileAttrs = GetFileAttributesW(pszUNCPath);
if (fileAttrs & FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS || fileAttrs & FILE_ATTRIBUTE_RECALL_ON_OPEN)
{
LPCWSTR pszCloud = L"[cloud]";
nLen = lstrlen(pszCloud)+1;
*CustomData = (wchar_t*)malloc(nLen*2);
lstrcpy(*CustomData, pszCloud);
return TRUE;
}

HANDLE hFile = CreateFileW(pszUNCPath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0,0);
if (hFile == INVALID_HANDLE_VALUE)
Expand Down
8 changes: 4 additions & 4 deletions Col0/ver_c0/pe.rc
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,1,0,0
PRODUCTVERSION 3,1,0,0
FILEVERSION 3,2,0,0
PRODUCTVERSION 3,2,0,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -70,9 +70,9 @@ BEGIN
BLOCK "041904b0"
BEGIN
VALUE "FileDescription", "VerInfo for C0 column"
VALUE "FileVersion", "3.1"
VALUE "FileVersion", "3.2"
VALUE "InternalName", "Ver_c0"
VALUE "LegalCopyright", "(C) 2015 Maximus5"
VALUE "LegalCopyright", "(C) 2020 Maximus5"
VALUE "OriginalFilename", "ver_c0.dll"
END
END
Expand Down
55 changes: 23 additions & 32 deletions Col0/ver_c0/pe.sln
Original file line number Diff line number Diff line change
@@ -1,64 +1,55 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.40629.0
# Visual Studio Version 16
VisualStudioVersion = 16.0.30413.136
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pe", "pe.vcxproj", "{D179531C-0F06-473A-A301-7FE8976046EC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_C|Itanium = Debug_C|Itanium
Debug_C|Win32 = Debug_C|Win32
Debug_C|x64 = Debug_C|x64
Debug_C0|Itanium = Debug_C0|Itanium
Debug_C0|Win32 = Debug_C0|Win32
Debug_C|x86 = Debug_C|x86
Debug_C0|x64 = Debug_C0|x64
Debug_E|Itanium = Debug_E|Itanium
Debug_E|Win32 = Debug_E|Win32
Debug_C0|x86 = Debug_C0|x86
Debug_E|x64 = Debug_E|x64
Debug_R|Itanium = Debug_R|Itanium
Debug_R|Win32 = Debug_R|Win32
Debug_E|x86 = Debug_E|x86
Debug_R|x64 = Debug_R|x64
Release_C0|Itanium = Release_C0|Itanium
Release_C0|Win32 = Release_C0|Win32
Debug_R|x86 = Debug_R|x86
Release_C0|x64 = Release_C0|x64
Release|Itanium = Release|Itanium
Release|Win32 = Release|Win32
Release_C0|x86 = Release_C0|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_C|Itanium.ActiveCfg = Debug_C|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_C|Win32.ActiveCfg = Debug_C|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_C|Win32.Build.0 = Debug_C|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_C|x64.ActiveCfg = Debug_C|x64
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_C|x64.Build.0 = Debug_C|x64
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_C0|Itanium.ActiveCfg = Debug_C0|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_C0|Win32.ActiveCfg = Debug_C0|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_C0|Win32.Build.0 = Debug_C0|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_C|x86.ActiveCfg = Debug_C|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_C|x86.Build.0 = Debug_C|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_C0|x64.ActiveCfg = Debug_C0|x64
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_C0|x64.Build.0 = Debug_C0|x64
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_E|Itanium.ActiveCfg = Debug_E|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_E|Win32.ActiveCfg = Debug_E|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_E|Win32.Build.0 = Debug_E|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_C0|x86.ActiveCfg = Debug_C0|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_C0|x86.Build.0 = Debug_C0|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_E|x64.ActiveCfg = Debug_E|x64
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_E|x64.Build.0 = Debug_E|x64
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_R|Itanium.ActiveCfg = Debug_R|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_R|Win32.ActiveCfg = Debug_R|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_R|Win32.Build.0 = Debug_R|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_E|x86.ActiveCfg = Debug_E|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_E|x86.Build.0 = Debug_E|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_R|x64.ActiveCfg = Debug_R|x64
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_R|x64.Build.0 = Debug_R|x64
{D179531C-0F06-473A-A301-7FE8976046EC}.Release_C0|Itanium.ActiveCfg = Release_C0|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Release_C0|Win32.ActiveCfg = Release_C0|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Release_C0|Win32.Build.0 = Release_C0|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_R|x86.ActiveCfg = Debug_R|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Debug_R|x86.Build.0 = Debug_R|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Release_C0|x64.ActiveCfg = Release_C0|x64
{D179531C-0F06-473A-A301-7FE8976046EC}.Release_C0|x64.Build.0 = Release_C0|x64
{D179531C-0F06-473A-A301-7FE8976046EC}.Release|Itanium.ActiveCfg = Release|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Release|Win32.ActiveCfg = Release|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Release|Win32.Build.0 = Release|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Release_C0|x86.ActiveCfg = Release_C0|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Release_C0|x86.Build.0 = Release_C0|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Release|x64.ActiveCfg = Release|x64
{D179531C-0F06-473A-A301-7FE8976046EC}.Release|x64.Build.0 = Release|x64
{D179531C-0F06-473A-A301-7FE8976046EC}.Release|x86.ActiveCfg = Release|Win32
{D179531C-0F06-473A-A301-7FE8976046EC}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E8A00153-5736-4014-AFB0-6C8748816CD2}
EndGlobalSection
EndGlobal
5 changes: 5 additions & 0 deletions Col0/ver_c0/pe.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=cppcoreguidelines/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=SETFOREGROUND/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=SKIPLEN/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=wsprintf/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
Loading

0 comments on commit 207f957

Please sign in to comment.