diff --git a/src/Wpf.Ui.Tray/Interop/Shell32.cs b/src/Wpf.Ui.Tray/Interop/Shell32.cs index 9ed503ebe..4cc9d811f 100644 --- a/src/Wpf.Ui.Tray/Interop/Shell32.cs +++ b/src/Wpf.Ui.Tray/Interop/Shell32.cs @@ -69,7 +69,7 @@ public enum NIF : uint VISTA_MASK = XP_MASK | REALTIME | SHOWTIP, } - [StructLayout(LayoutKind.Sequential)] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public class NOTIFYICONDATA { /// @@ -153,7 +153,7 @@ public static extern int SHCreateItemFromParsingName( [Out, MarshalAs(UnmanagedType.Interface)] out object ppv ); - [DllImport(Libraries.Shell32)] + [DllImport(Libraries.Shell32, CharSet = CharSet.Unicode)] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool Shell_NotifyIcon([In] NIM dwMessage, [In] NOTIFYICONDATA lpdata);