From 5bb592c066ce3a4cc13612db8b2fd6a997c941e0 Mon Sep 17 00:00:00 2001 From: Peter Kirmeier Date: Sun, 11 Oct 2020 00:28:34 +0200 Subject: [PATCH] [BUG] Fix datatype for SHGetFileInfo preventing stack corruption --- NativeDllImport/SHGetFileInfo.cs | 2 +- Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NativeDllImport/SHGetFileInfo.cs b/NativeDllImport/SHGetFileInfo.cs index 9545c98..a0897e7 100644 --- a/NativeDllImport/SHGetFileInfo.cs +++ b/NativeDllImport/SHGetFileInfo.cs @@ -37,7 +37,7 @@ namespace SystemTrayMenu.DllImports uint cbFileInfo, uint uFlags); - [StructLayout(LayoutKind.Sequential)] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] internal struct SHFILEINFO { public const int NAMESIZE = 80; diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index f986d85..ac261c3 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -39,5 +39,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.16.2")] -[assembly: AssemblyFileVersion("1.0.16.2")] +[assembly: AssemblyVersion("1.0.16.3")] +[assembly: AssemblyFileVersion("1.0.16.3")]