Skip to content

Commit

Permalink
Fix error when unregistering
Browse files Browse the repository at this point in the history
Fix release x64 compilation error
  • Loading branch information
SCell555 committed Nov 19, 2020
1 parent 43c8cff commit 777124f
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 12 deletions.
7 changes: 7 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# VTF Shell Extensions
Provides thumbnails for VTF files and advanced VTF information in File properties dialog.

## Screenshots
![Thumbnails](./screenshots/thumbnail_provider.png)

![File Properties](./screenshots/shell_info.png)
2 changes: 1 addition & 1 deletion ThumbnailProvider/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ STDAPI DllRegisterServer()
STDAPI DllUnregisterServer()
{
REGKEY_DELETEKEY keys[] = {
{ HKEY_CLASSES_ROOT, L"CLSID\\" szCLSID_VTFThumbnailProvider },
{ HKEY_CLASSES_ROOT, L"CLSID\\" szCLSID_VTFThumbnailProvider L"\\InprocServer32" },
{ HKEY_CLASSES_ROOT, L"CLSID\\" szCLSID_VTFThumbnailProvider },
{ HKEY_CLASSES_ROOT, L".vtf\\ShellEx\\{E357FCCD-A995-4576-B01F-234630154E96}" }
};
return DeleteRegistryKeys( keys, ARRAYSIZE( keys ) );
Expand Down
10 changes: 5 additions & 5 deletions ThumbnailProvider/ThumbnailProvider.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DebugInformationFormat>None</DebugInformationFormat>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<LanguageStandard>stdcpp17</LanguageStandard>
<MinimalRebuild />
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;comctl32.lib;propsys.lib;gdiplus.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>ThumbnailProvider.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
Expand All @@ -173,20 +173,20 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DebugInformationFormat>None</DebugInformationFormat>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<LanguageStandard>stdcpp17</LanguageStandard>
<MinimalRebuild />
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;comctl32.lib;propsys.lib;gdiplus.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>ThumbnailProvider.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
<ImageHasSafeExceptionHandlers>true</ImageHasSafeExceptionHandlers>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion VTFShellInfo/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ STDAPI DllUnregisterServer()
return hr;

REGKEY_DELETEKEY keys[] = {
{ HKEY_CLASSES_ROOT, L"CLSID\\" szCLSID_VTFShellInfo },
{ HKEY_CLASSES_ROOT, L"CLSID\\" szCLSID_VTFShellInfo L"\\InprocServer32" },
{ HKEY_CLASSES_ROOT, L"CLSID\\" szCLSID_VTFShellInfo },
{ HKEY_CLASSES_ROOT, L"SystemFileAssociations\\.vtf" },
{ HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\PropertySystem\\PropertyHandlers\\.vtf" }
};
Expand Down
10 changes: 5 additions & 5 deletions VTFShellInfo/VTFShellInfo.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DebugInformationFormat>None</DebugInformationFormat>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<LanguageStandard>stdcpp17</LanguageStandard>
<MinimalRebuild />
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;comctl32.lib;propsys.lib;gdiplus.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>VTFShellInfo.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
Expand All @@ -173,20 +173,20 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DebugInformationFormat>None</DebugInformationFormat>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<LanguageStandard>stdcpp17</LanguageStandard>
<MinimalRebuild />
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;comctl32.lib;propsys.lib;gdiplus.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>VTFShellInfo.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
<ImageHasSafeExceptionHandlers>true</ImageHasSafeExceptionHandlers>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
6 changes: 6 additions & 0 deletions output/register.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off
cd /d %~dp0
regsvr32 /s VTFThumbnailProvider64.dll
regsvr32 /s VTFShellInfo64.dll
C:\Windows\SysWOW64\regsvr32 /s VTFThumbnailProvider32.dll
C:\Windows\SysWOW64\regsvr32 /s VTFShellInfo32.dll
6 changes: 6 additions & 0 deletions output/unregister.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off
cd /d %~dp0
regsvr32 /s /u VTFThumbnailProvider64.dll
regsvr32 /s /u VTFShellInfo64.dll
C:\Windows\SysWOW64\regsvr32 /s /u VTFThumbnailProvider32.dll
C:\Windows\SysWOW64\regsvr32 /s /u VTFShellInfo32.dll
Binary file added screenshots/shell_info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/thumbnail_provider.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 777124f

Please sign in to comment.