Skip to content

Commit 4b400d5

Browse files
committed
Backport external launcher on 2.1.15
1 parent bb2a959 commit 4b400d5

25 files changed

+1786
-58
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Custom files
77
CustomOpenDialog*.dll
88
CustomSaveDialog*.dll
9+
FilesLauncher.exe
910

1011
# User-specific files
1112
*.suo

Files.sln

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 17
4-
VisualStudioVersion = 17.1.31903.286
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.31911.196
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Launcher", "src\Files.Launcher\Files.Launcher.csproj", "{533F9E86-EE0A-4FCB-B70C-F29532C1B787}"
77
ProjectSection(ProjectDependencies) = postProject
88
{A2FF3F3B-8EBC-4108-B99D-1476B7876656} = {A2FF3F3B-8EBC-4108-B99D-1476B7876656}
9+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07} = {25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}
910
EndProjectSection
1011
EndProject
1112
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Files", "src\Files\Files.csproj", "{64C30C4E-A69A-411C-9F78-776E7AAD583C}"
@@ -26,6 +27,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A74DCE98-A74
2627
EndProject
2728
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{481DE2EA-E6CE-4A9C-A220-3B543B95AAA1}"
2829
EndProject
30+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FilesLauncher", "src\Files.OpenDialog\FilesLauncher\FilesLauncher.vcxproj", "{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}"
31+
EndProject
2932
Global
3033
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3134
Debug|Any CPU = Debug|Any CPU
@@ -40,18 +43,18 @@ Global
4043
Release|x86 = Release|x86
4144
EndGlobalSection
4245
GlobalSection(ProjectConfigurationPlatforms) = postSolution
43-
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
44-
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Debug|Any CPU.Build.0 = Debug|Any CPU
45-
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Debug|ARM.ActiveCfg = Debug|Any CPU
46-
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Debug|ARM.Build.0 = Debug|Any CPU
46+
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Debug|Any CPU.ActiveCfg = Debug|x86
47+
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Debug|Any CPU.Build.0 = Debug|x86
48+
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Debug|ARM.ActiveCfg = Debug|x86
49+
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Debug|ARM.Build.0 = Debug|x86
4750
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Debug|arm64.ActiveCfg = Debug|arm64
4851
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Debug|arm64.Build.0 = Debug|arm64
4952
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Debug|x64.ActiveCfg = Debug|x64
5053
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Debug|x64.Build.0 = Debug|x64
5154
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Debug|x86.ActiveCfg = Debug|x86
5255
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Debug|x86.Build.0 = Debug|x86
53-
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Release|Any CPU.ActiveCfg = Release|Any CPU
54-
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Release|Any CPU.Build.0 = Release|Any CPU
56+
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Release|Any CPU.ActiveCfg = Release|x86
57+
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Release|Any CPU.Build.0 = Release|x86
5558
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Release|ARM.ActiveCfg = Release|x86
5659
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Release|ARM.Build.0 = Release|x86
5760
{533F9E86-EE0A-4FCB-B70C-F29532C1B787}.Release|arm64.ActiveCfg = Release|arm64
@@ -64,28 +67,22 @@ Global
6467
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Debug|Any CPU.Build.0 = Debug|x86
6568
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Debug|ARM.ActiveCfg = Debug|x86
6669
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Debug|ARM.Build.0 = Debug|x86
67-
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Debug|ARM.Deploy.0 = Debug|x86
6870
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Debug|arm64.ActiveCfg = Debug|arm64
6971
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Debug|arm64.Build.0 = Debug|arm64
7072
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Debug|x64.ActiveCfg = Debug|x64
7173
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Debug|x64.Build.0 = Debug|x64
7274
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Debug|x86.ActiveCfg = Debug|x86
7375
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Debug|x86.Build.0 = Debug|x86
74-
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Debug|x86.Deploy.0 = Debug|x86
7576
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Release|Any CPU.ActiveCfg = Release|x86
7677
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Release|Any CPU.Build.0 = Release|x86
7778
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Release|ARM.ActiveCfg = Release|x86
7879
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Release|ARM.Build.0 = Release|x86
79-
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Release|ARM.Deploy.0 = Release|x86
8080
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Release|arm64.ActiveCfg = Release|arm64
8181
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Release|arm64.Build.0 = Release|arm64
82-
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Release|arm64.Deploy.0 = Release|arm64
8382
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Release|x64.ActiveCfg = Release|x64
8483
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Release|x64.Build.0 = Release|x64
85-
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Release|x64.Deploy.0 = Release|x64
8684
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Release|x86.ActiveCfg = Release|x86
8785
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Release|x86.Build.0 = Release|x86
88-
{64C30C4E-A69A-411C-9F78-776E7AAD583C}.Release|x86.Deploy.0 = Release|x86
8986
{3B15596C-3DB9-4B58-B4C8-442D06A8C130}.Debug|Any CPU.ActiveCfg = Debug|x86
9087
{3B15596C-3DB9-4B58-B4C8-442D06A8C130}.Debug|Any CPU.Build.0 = Debug|x86
9188
{3B15596C-3DB9-4B58-B4C8-442D06A8C130}.Debug|Any CPU.Deploy.0 = Debug|x86
@@ -166,7 +163,9 @@ Global
166163
{A2FF3F3B-8EBC-4108-B99D-1476B7876656}.Debug|x86.ActiveCfg = Debug|Win32
167164
{A2FF3F3B-8EBC-4108-B99D-1476B7876656}.Debug|x86.Build.0 = Debug|Win32
168165
{A2FF3F3B-8EBC-4108-B99D-1476B7876656}.Release|Any CPU.ActiveCfg = Release|Win32
166+
{A2FF3F3B-8EBC-4108-B99D-1476B7876656}.Release|Any CPU.Build.0 = Release|Win32
169167
{A2FF3F3B-8EBC-4108-B99D-1476B7876656}.Release|ARM.ActiveCfg = Release|Win32
168+
{A2FF3F3B-8EBC-4108-B99D-1476B7876656}.Release|ARM.Build.0 = Release|Win32
170169
{A2FF3F3B-8EBC-4108-B99D-1476B7876656}.Release|arm64.ActiveCfg = Release|arm64
171170
{A2FF3F3B-8EBC-4108-B99D-1476B7876656}.Release|arm64.Build.0 = Release|arm64
172171
{A2FF3F3B-8EBC-4108-B99D-1476B7876656}.Release|x64.ActiveCfg = Release|x64
@@ -193,6 +192,25 @@ Global
193192
{B7E43D1F-AC8B-4958-95D5-A06CDD1FEACD}.Release|x64.Build.0 = Release|Any CPU
194193
{B7E43D1F-AC8B-4958-95D5-A06CDD1FEACD}.Release|x86.ActiveCfg = Release|Any CPU
195194
{B7E43D1F-AC8B-4958-95D5-A06CDD1FEACD}.Release|x86.Build.0 = Release|Any CPU
195+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}.Debug|Any CPU.ActiveCfg = Debug|Win32
196+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}.Debug|Any CPU.Build.0 = Debug|Win32
197+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}.Debug|ARM.ActiveCfg = Debug|Win32
198+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}.Debug|arm64.ActiveCfg = Debug|arm64
199+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}.Debug|arm64.Build.0 = Debug|arm64
200+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}.Debug|x64.ActiveCfg = Debug|x64
201+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}.Debug|x64.Build.0 = Debug|x64
202+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}.Debug|x86.ActiveCfg = Debug|Win32
203+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}.Debug|x86.Build.0 = Debug|Win32
204+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}.Release|Any CPU.ActiveCfg = Release|Win32
205+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}.Release|Any CPU.Build.0 = Release|Win32
206+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}.Release|ARM.ActiveCfg = Release|Win32
207+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}.Release|ARM.Build.0 = Release|Win32
208+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}.Release|arm64.ActiveCfg = Release|arm64
209+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}.Release|arm64.Build.0 = Release|arm64
210+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}.Release|x64.ActiveCfg = Release|x64
211+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}.Release|x64.Build.0 = Release|x64
212+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}.Release|x86.ActiveCfg = Release|Win32
213+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07}.Release|x86.Build.0 = Release|Win32
196214
EndGlobalSection
197215
GlobalSection(SolutionProperties) = preSolution
198216
HideSolutionNode = FALSE
@@ -206,6 +224,7 @@ Global
206224
{0175B70C-1E29-4A3F-AA4F-C2017B040EF0} = {A74DCE98-A744-4D71-A2B1-7EE4FED0936B}
207225
{A2FF3F3B-8EBC-4108-B99D-1476B7876656} = {0175B70C-1E29-4A3F-AA4F-C2017B040EF0}
208226
{B7E43D1F-AC8B-4958-95D5-A06CDD1FEACD} = {481DE2EA-E6CE-4A9C-A220-3B543B95AAA1}
227+
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07} = {0175B70C-1E29-4A3F-AA4F-C2017B040EF0}
209228
EndGlobalSection
210229
GlobalSection(ExtensibilityGlobals) = postSolution
211230
SolutionGuid = {0E62043C-A7A1-4982-9EC9-4CDB2939B776}

builds/azure-pipelines-release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ jobs:
7373
packageType: sdk
7474
version: 6.0.100
7575

76+
- task: NuGetToolInstaller@1
77+
78+
- task: NuGetCommand@2
79+
inputs:
80+
feedsToUse: config
81+
nugetConfigPath: nuget.config
82+
restoreSolution: '$(solution)'
83+
7684
- task: DownloadSecureFile@1
7785
name: caCertificate
7886
displayName: 'Download CA certificate'
@@ -84,7 +92,7 @@ jobs:
8492
solution: '**/*.wapproj'
8593
platform: 'x86'
8694
configuration: '$(buildConfiguration)'
87-
msbuildArguments: '/t:build;_GenerateAppxPackage /restore /p:AppxLogTelemetryFromSideloadingScript=False /p:GenerateAppInstallerFile=True /p:AppInstallerUri=https://filescommunity.blob.core.windows.net/files/stable/ /p:AppInstallerCheckForUpdateFrequency=OnApplicationRun /p:AppInstallerUpdateFrequency=1 /p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=Sideload /p:AppxPackageSigningEnabled=true /p:PackageCertificateKeyFile="$(caCertificate.secureFilePath)" /p:PackageCertificatePassword="$(signingCert.password)" /p:PackageCertificateThumbprint=""'
95+
msbuildArguments: '/t:build;_GenerateAppxPackage /p:AppxLogTelemetryFromSideloadingScript=False /p:GenerateAppInstallerFile=True /p:AppInstallerUri=https://filescommunity.blob.core.windows.net/files/stable/ /p:AppInstallerCheckForUpdateFrequency=OnApplicationRun /p:AppInstallerUpdateFrequency=1 /p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=Sideload /p:AppxPackageSigningEnabled=true /p:PackageCertificateKeyFile="$(caCertificate.secureFilePath)" /p:PackageCertificatePassword="$(signingCert.password)" /p:PackageCertificateThumbprint=""'
8896
maximumCpuCount: true
8997

9098
- task: CopyFiles@2

builds/azure-pipelines.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,18 @@ steps:
6464
packageType: sdk
6565
version: 6.0.100
6666

67+
- task: NuGetCommand@2
68+
inputs:
69+
feedsToUse: config
70+
nugetConfigPath: nuget.config
71+
restoreSolution: '$(solution)'
6772

6873
- task: MSBuild@1
6974
inputs:
7075
platform: 'x64'
7176
solution: '**/*.wapproj'
7277
configuration: '$(buildConfiguration)'
73-
msbuildArguments: '/t:build;_GenerateAppxPackage /restore /p:Configuration=Release;Platform="$(buildPlatform)";AppxBundle=Always;AppxBundlePlatforms="$(buildPlatform)";AppxPackageDir="$(appxPackageDir)";AppxPackageSigningEnabled=true;UapAppxPackageBuildMode=SideloadOnly;PackageCertificateKeyFile="$(Build.SourcesDirectory)\builds\Files_SelfSigned.pfx";PackageCertificatePassword="";PackageCertificateThumbprint=""'
78+
msbuildArguments: '/t:build;_GenerateAppxPackage /p:Configuration=Release;Platform="$(buildPlatform)";AppxBundle=Always;AppxBundlePlatforms="$(buildPlatform)";AppxPackageDir="$(appxPackageDir)";AppxPackageSigningEnabled=true;UapAppxPackageBuildMode=SideloadOnly;PackageCertificateKeyFile="$(Build.SourcesDirectory)\builds\Files_SelfSigned.pfx";PackageCertificatePassword="";PackageCertificateThumbprint=""'
7479
maximumCpuCount: true
7580

7681
- task: DotNetCoreCLI@2
Binary file not shown.

src/Files.Launcher/Files.Launcher.csproj

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@
3030
</ItemGroup>
3131
<ItemGroup>
3232
<ProjectReference Include="..\Common\Common.csproj" />
33+
<ProjectReference Include="..\Files.OpenDialog\CustomOpenDialog\CustomOpenDialog.vcxproj">
34+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
35+
<LinkLibraryDependencies>false</LinkLibraryDependencies>
36+
</ProjectReference>
37+
<ProjectReference Include="..\Files.OpenDialog\FilesLauncher\FilesLauncher.vcxproj">
38+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
39+
<LinkLibraryDependencies>false</LinkLibraryDependencies>
40+
</ProjectReference>
41+
<Content Include="Assets\FilesOpenDialog\FilesLauncher.exe">
42+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
43+
</Content>
3344
<Content Include="Assets\FilesOpenDialog\SetFilesAsDefault.reg">
3445
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
3546
</Content>
@@ -45,4 +56,7 @@
4556
<ItemGroup>
4657
<Compile Remove="FolderNames.cs" />
4758
</ItemGroup>
59+
<ItemGroup>
60+
<None Remove="Assets\FilesOpenDialog\FilesLauncher.exe" />
61+
</ItemGroup>
4862
</Project>

src/Files.Launcher/MessageHandlers/Win32MessageHandler.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ private void DetectIsSetAsDefaultFileManager()
3030
{
3131
using var subkey = Registry.ClassesRoot.OpenSubKey(@"Folder\shell\open\command");
3232
var command = (string)subkey?.GetValue(string.Empty);
33-
ApplicationData.Current.LocalSettings.Values["IsSetAsDefaultFileManager"] = !string.IsNullOrEmpty(command) && command.Contains("files.exe");
33+
ApplicationData.Current.LocalSettings.Values["IsSetAsDefaultFileManager"] = !string.IsNullOrEmpty(command) && command.Contains("FilesLauncher.exe");
3434
}
3535

3636
private void DetectIsSetAsOpenFileDialog()
@@ -160,6 +160,22 @@ public async Task ParseArgumentsAsync(PipeStream connection, Dictionary<string,
160160
}
161161
}
162162

163+
var dataPath = Environment.ExpandEnvironmentVariables("%LocalAppData%\\Files");
164+
if (enable)
165+
{
166+
if (!Win32API.RunPowershellCommand($"-command \"New-Item -Force -Path {dataPath} -ItemType Directory; Copy-Item -Filter *.* -Path '{destFolder}\\*' -Recurse -Force -Destination '{dataPath}'\"", false))
167+
{
168+
// Error copying files
169+
DetectIsSetAsDefaultFileManager();
170+
await Win32API.SendMessageAsync(connection, new ValueSet() { { "Success", false } }, message.Get("RequestID", (string)null));
171+
return;
172+
}
173+
}
174+
else
175+
{
176+
Win32API.RunPowershellCommand($"-command \"Remove-Item -Path '{dataPath}' -Recurse -Force\"", false);
177+
}
178+
163179
try
164180
{
165181
using var regProcess = Process.Start(new ProcessStartInfo("regedit.exe", @$"/s ""{Path.Combine(destFolder, enable ? "SetFilesAsDefault.reg" : "UnsetFilesAsDefault.reg")}""") { UseShellExecute = true, Verb = "runas" });

src/Files.OpenDialog/CustomOpenDialog/CustomOpenDialog.vcxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
<OutputFile>$(OutDir)CustomOpenDialog$(PlatformArchitecture)$(TargetExt)</OutputFile>
170170
</Link>
171171
<PostBuildEvent>
172-
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.dll $(SolutionDir)src\Files.Launcher\Assets\FilesOpenDialog</Command>
172+
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.dll $(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog</Command>
173173
</PostBuildEvent>
174174
</ItemDefinitionGroup>
175175
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -205,7 +205,7 @@
205205
<OutputFile>$(OutDir)CustomOpenDialog$(PlatformArchitecture)$(TargetExt)</OutputFile>
206206
</Link>
207207
<PostBuildEvent>
208-
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.dll $(SolutionDir)src\Files.Launcher\Assets\FilesOpenDialog</Command>
208+
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.dll $(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog</Command>
209209
</PostBuildEvent>
210210
</ItemDefinitionGroup>
211211
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm64'">
@@ -242,7 +242,7 @@
242242
<OutputFile>$(OutDir)CustomOpenDialog$(PlatformArchitecture)$(TargetExt)</OutputFile>
243243
</Link>
244244
<PostBuildEvent>
245-
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.dll $(SolutionDir)src\Files.Launcher\Assets\FilesOpenDialog</Command>
245+
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.dll $(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog</Command>
246246
</PostBuildEvent>
247247
</ItemDefinitionGroup>
248248
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -281,7 +281,7 @@
281281
<OutputFile>$(OutDir)CustomOpenDialog$(PlatformArchitecture)$(TargetExt)</OutputFile>
282282
</Link>
283283
<PostBuildEvent>
284-
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.dll $(SolutionDir)src\Files.Launcher\Assets\FilesOpenDialog</Command>
284+
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.dll $(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog</Command>
285285
</PostBuildEvent>
286286
</ItemDefinitionGroup>
287287
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -319,7 +319,7 @@
319319
<OutputFile>$(OutDir)CustomOpenDialog$(PlatformArchitecture)$(TargetExt)</OutputFile>
320320
</Link>
321321
<PostBuildEvent>
322-
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.dll $(SolutionDir)src\Files.Launcher\Assets\FilesOpenDialog</Command>
322+
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.dll $(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog</Command>
323323
</PostBuildEvent>
324324
</ItemDefinitionGroup>
325325
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm64'">
@@ -358,7 +358,7 @@
358358
<OutputFile>$(OutDir)CustomOpenDialog$(PlatformArchitecture)$(TargetExt)</OutputFile>
359359
</Link>
360360
<PostBuildEvent>
361-
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.dll $(SolutionDir)src\Files.Launcher\Assets\FilesOpenDialog</Command>
361+
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.dll $(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog</Command>
362362
</PostBuildEvent>
363363
</ItemDefinitionGroup>
364364
<ItemGroup>
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// Copyright (C) Explorer++ Project
2+
// SPDX-License-Identifier: GPL-3.0-only
3+
// See LICENSE in the top level directory
4+
5+
#include "DocumentServiceProvider.h"
6+
7+
// IDispatch
8+
// Note that none of these methods require any implementation. When attempting to find a shell
9+
// window, the shell requests the IDispatch interface, but doesn't actually call any methods on it.
10+
IFACEMETHODIMP DocumentServiceProvider::GetTypeInfoCount(UINT *typeInfoCount)
11+
{
12+
UNREFERENCED_PARAMETER(typeInfoCount);
13+
14+
return E_NOTIMPL;
15+
}
16+
17+
IFACEMETHODIMP DocumentServiceProvider::GetTypeInfo(UINT type, LCID localeId, ITypeInfo **typeInfo)
18+
{
19+
UNREFERENCED_PARAMETER(type);
20+
UNREFERENCED_PARAMETER(localeId);
21+
UNREFERENCED_PARAMETER(typeInfo);
22+
23+
return E_NOTIMPL;
24+
}
25+
26+
IFACEMETHODIMP DocumentServiceProvider::GetIDsOfNames(
27+
REFIID riid, LPOLESTR *names, UINT numNames, LCID localeId, DISPID *dispId)
28+
{
29+
UNREFERENCED_PARAMETER(riid);
30+
UNREFERENCED_PARAMETER(names);
31+
UNREFERENCED_PARAMETER(numNames);
32+
UNREFERENCED_PARAMETER(localeId);
33+
UNREFERENCED_PARAMETER(dispId);
34+
35+
return E_NOTIMPL;
36+
}
37+
38+
IFACEMETHODIMP DocumentServiceProvider::Invoke(DISPID dispIdMember, REFIID riid, LCID localeId,
39+
WORD flags, DISPPARAMS *dispParams, VARIANT *varResult, EXCEPINFO *exceptionInfo, UINT *argErr)
40+
{
41+
UNREFERENCED_PARAMETER(dispIdMember);
42+
UNREFERENCED_PARAMETER(riid);
43+
UNREFERENCED_PARAMETER(localeId);
44+
UNREFERENCED_PARAMETER(flags);
45+
UNREFERENCED_PARAMETER(dispParams);
46+
UNREFERENCED_PARAMETER(varResult);
47+
UNREFERENCED_PARAMETER(exceptionInfo);
48+
UNREFERENCED_PARAMETER(argErr);
49+
50+
return E_NOTIMPL;
51+
}
52+
53+
// IServiceProvider
54+
IFACEMETHODIMP DocumentServiceProvider::QueryService(REFGUID guidService, REFIID riid, void **ppv)
55+
{
56+
return ServiceProviderBase::QueryService(guidService, riid, ppv);
57+
}

0 commit comments

Comments
 (0)