This commit is contained in:
Philipp Sumi
2013-11-16 17:50:03 +00:00
parent b6a4590114
commit 70b696aaff
2 changed files with 6 additions and 2 deletions

View File

@@ -1,5 +1,4 @@
using System; using System;
using System.Drawing;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Hardcodet.Wpf.TaskbarNotification.Interop namespace Hardcodet.Wpf.TaskbarNotification.Interop
@@ -48,7 +47,7 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop
/// <summary> /// <summary>
/// A handle to the icon that should be displayed. Just /// A handle to the icon that should be displayed. Just
/// <see cref="Icon.Handle"/>. /// <c>Icon.Handle</c>.
/// </summary> /// </summary>
public IntPtr IconHandle; public IntPtr IconHandle;

View File

@@ -26,6 +26,7 @@
using System; using System;
using System.ComponentModel; using System.ComponentModel;
using System.Diagnostics; using System.Diagnostics;
using System.Runtime.InteropServices;
namespace Hardcodet.Wpf.TaskbarNotification.Interop namespace Hardcodet.Wpf.TaskbarNotification.Interop
{ {
@@ -190,7 +191,11 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop
if (MessageWindowHandle == IntPtr.Zero) if (MessageWindowHandle == IntPtr.Zero)
{ {
#if SILVERLIGHT
throw new Exception("Message window handle was not a valid pointer.");
#else
throw new Win32Exception(); throw new Win32Exception();
#endif
} }
} }