diff --git a/WindowsTools/Properties/AssemblyInfo.cs b/WindowsTools/Properties/AssemblyInfo.cs index 74f3c60..73bd169 100644 --- a/WindowsTools/Properties/AssemblyInfo.cs +++ b/WindowsTools/Properties/AssemblyInfo.cs @@ -4,8 +4,8 @@ [assembly: AssemblyCompany("高怡飞")] [assembly: AssemblyCopyright("Copyright ©2024 高怡飞, All Rights Reserved.")] [assembly: AssemblyDescription("Windows 工具箱")] -[assembly: AssemblyFileVersion("2.5.602.0")] -[assembly: AssemblyInformationalVersion("2.5.602.0")] +[assembly: AssemblyFileVersion("2.6.612.0")] +[assembly: AssemblyInformationalVersion("2.6.612.0")] [assembly: AssemblyProduct("Windows 工具箱")] [assembly: AssemblyTitle("Windows 工具箱")] -[assembly: AssemblyVersion("2.5.602.0")] +[assembly: AssemblyVersion("2.6.612.0")] diff --git a/WindowsTools/Services/Controls/Download/BitsService.cs b/WindowsTools/Services/Controls/Download/BitsService.cs index 9b79b88..67f59b7 100644 --- a/WindowsTools/Services/Controls/Download/BitsService.cs +++ b/WindowsTools/Services/Controls/Download/BitsService.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Diagnostics.Tracing; using System.IO; +using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; using WindowsTools.Services.Root; @@ -128,7 +129,7 @@ public static unsafe void CreateDownload(string url, string saveFilePath) DownloadID = downloadID }; backgroundCopyCallback.StatusChanged += OnStatusChanged; - downloadJob.SetNotifyInterface(backgroundCopyCallback); + downloadJob.SetNotifyInterface(new UnknownWrapper (backgroundCopyCallback).WrappedObject); downloadJob.GetProgress(out BG_JOB_PROGRESS progress); DownloadCreated?.Invoke(backgroundCopyCallback.DownloadID, Path.GetFileName(saveFilePath), saveFilePath, url, progress.BytesTotal is ulong.MaxValue ? 0 : progress.BytesTotal); @@ -141,7 +142,7 @@ public static unsafe void CreateDownload(string url, string saveFilePath) } } - int result = downloadJob.Resume(); + downloadJob.Resume(); } } catch (Exception e)