diff --git a/Source/NotifyIconWpf/Interop/NotifyIconData.cs b/Source/NotifyIconWpf/Interop/NotifyIconData.cs index 78cc5a6..81cf0a6 100644 --- a/Source/NotifyIconWpf/Interop/NotifyIconData.cs +++ b/Source/NotifyIconWpf/Interop/NotifyIconData.cs @@ -1,5 +1,4 @@ using System; -using System.Drawing; using System.Runtime.InteropServices; namespace Hardcodet.Wpf.TaskbarNotification.Interop @@ -48,7 +47,7 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop /// /// A handle to the icon that should be displayed. Just - /// . + /// Icon.Handle. /// public IntPtr IconHandle; diff --git a/Source/NotifyIconWpf/Interop/WindowMessageSink.cs b/Source/NotifyIconWpf/Interop/WindowMessageSink.cs index 3cf4ee2..3c696f9 100644 --- a/Source/NotifyIconWpf/Interop/WindowMessageSink.cs +++ b/Source/NotifyIconWpf/Interop/WindowMessageSink.cs @@ -26,6 +26,7 @@ using System; using System.ComponentModel; using System.Diagnostics; +using System.Runtime.InteropServices; namespace Hardcodet.Wpf.TaskbarNotification.Interop { @@ -190,7 +191,11 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop if (MessageWindowHandle == IntPtr.Zero) { +#if SILVERLIGHT + throw new Exception("Message window handle was not a valid pointer."); +#else throw new Win32Exception(); +#endif } }