diff --git a/Source/NotifyIconWpf/Interop/NotifyIconData.cs b/Source/NotifyIconWpf/Interop/NotifyIconData.cs
index 81cf0a6..b169b8e 100644
--- a/Source/NotifyIconWpf/Interop/NotifyIconData.cs
+++ b/Source/NotifyIconWpf/Interop/NotifyIconData.cs
@@ -10,7 +10,7 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop
/// values of the
/// that were defined.
///
- [StructLayout(LayoutKind.Sequential)]
+ [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NotifyIconData
{
///
@@ -134,7 +134,7 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop
{
//we need to set another size on xp/2003- otherwise certain
//features (e.g. balloon tooltips) don't work.
- data.cbSize = 504;
+ data.cbSize = 952; // NOTIFYICONDATAW_V3_SIZE
//set to fixed timeout
data.VersionOrTimeout = 10;
diff --git a/Source/NotifyIconWpf/Interop/WinApi.cs b/Source/NotifyIconWpf/Interop/WinApi.cs
index 2cb96ea..38e7d6a 100644
--- a/Source/NotifyIconWpf/Interop/WinApi.cs
+++ b/Source/NotifyIconWpf/Interop/WinApi.cs
@@ -11,7 +11,7 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop
///
/// Creates, updates or deletes the taskbar icon.
///
- [DllImport("shell32.Dll")]
+ [DllImport("shell32.Dll", CharSet = CharSet.Unicode)]
public static extern bool Shell_NotifyIcon(NotifyCommand cmd, [In]ref NotifyIconData data);