From 789a572c7710a603e20b4eddca63457388954f15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=AB=98=E6=80=A1=E9=A3=9E?= <363301617@qq.com>
Date: Fri, 6 Dec 2024 10:48:49 +0800
Subject: [PATCH] Remove unnecessary unsafe keywords
Remove unnecessary unsafe keywords
---
WindowsTools/WindowsAPI/PInvoke/Gdi32/BP_PAINTPARAMS.cs | 2 +-
WindowsTools/WindowsAPI/PInvoke/Uxtheme/UxthemeLibrary.cs | 2 +-
WindowsToolsPackage/Package.appxmanifest | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/WindowsTools/WindowsAPI/PInvoke/Gdi32/BP_PAINTPARAMS.cs b/WindowsTools/WindowsAPI/PInvoke/Gdi32/BP_PAINTPARAMS.cs
index 2af7c6c..100987f 100644
--- a/WindowsTools/WindowsAPI/PInvoke/Gdi32/BP_PAINTPARAMS.cs
+++ b/WindowsTools/WindowsAPI/PInvoke/Gdi32/BP_PAINTPARAMS.cs
@@ -6,7 +6,7 @@ namespace WindowsTools.WindowsAPI.PInvoke.Gdi32
///
/// 定义 BeginBufferedPaint 的绘制操作参数。
///
- public unsafe struct BP_PAINTPARAMS
+ public struct BP_PAINTPARAMS
{
///
/// 此结构的大小(以字节为单位)。
diff --git a/WindowsTools/WindowsAPI/PInvoke/Uxtheme/UxthemeLibrary.cs b/WindowsTools/WindowsAPI/PInvoke/Uxtheme/UxthemeLibrary.cs
index 809e3de..a473945 100644
--- a/WindowsTools/WindowsAPI/PInvoke/Uxtheme/UxthemeLibrary.cs
+++ b/WindowsTools/WindowsAPI/PInvoke/Uxtheme/UxthemeLibrary.cs
@@ -29,7 +29,7 @@ public static class UxthemeLibrary
/// 在调用 BeginBufferedPaint 之前,应用程序应在调用线程上调用 BufferedPaintInit,并在线程终止之前调用 BufferedPaintUnInit。 调用 BufferedPaintInit 失败可能会导致性能下降,因为每个缓冲的绘制操作的内部数据都会被初始化和销毁。
///
[DllImport(Uxtheme, CharSet = CharSet.Unicode, EntryPoint = "BeginBufferedPaint", PreserveSig = true, SetLastError = false)]
- public static extern unsafe IntPtr BeginBufferedPaint(IntPtr hdcTarget, ref RECT prcTarget, BP_BUFFERFORMAT dwFormat, ref BP_PAINTPARAMS pPaintParams, out IntPtr phdc);
+ public static extern IntPtr BeginBufferedPaint(IntPtr hdcTarget, ref RECT prcTarget, BP_BUFFERFORMAT dwFormat, ref BP_PAINTPARAMS pPaintParams, out IntPtr phdc);
///
/// 初始化当前线程的缓冲绘制。
diff --git a/WindowsToolsPackage/Package.appxmanifest b/WindowsToolsPackage/Package.appxmanifest
index 9399bd4..4d448b5 100644
--- a/WindowsToolsPackage/Package.appxmanifest
+++ b/WindowsToolsPackage/Package.appxmanifest
@@ -13,7 +13,7 @@
+ Version="3.3.1206.0" />
ms-resource:PackageDisplayName