shwong2002 / winusbnet

Automatically exported from code.google.com/p/winusbnet
Other
0 stars 0 forks source link

source bug fix #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
DeviceNotifyHook.cs--->>

        internal void OnHandleDestroyed(object sender, EventArgs e)
        {
            try
            {
                // Window was destroyed, release hook.
                ReleaseHandle();
-               if (_notifyHandle != null)
+               if (_notifyHandle != IntPtr.Zero)

        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                // clean managed resources

                // do not clean the notifier here. the notifier owns and will dispose this object.
            }
            if (_notifyHandle != IntPtr.Zero)
            {
                API.DeviceManagement.StopDeviceDeviceNotifications(_notifyHandle);
+               _notifyHandle = IntPtr.Zero;

Original issue reported on code.google.com by gwnpe...@gmail.com on 13 Jun 2014 at 7:40

GoogleCodeExporter commented 9 years ago
Thanks for reporting! Bug fixed in SVN.

Original comment by madwizar...@gmail.com on 21 Jun 2014 at 7:28