Exemple #1
0
        private static List <NOTIFYITEM> getTrayItems(TrayNotify instance)
        {
            NotificationCb callback = new NotificationCb();
            ulong          handle   = 0UL;
            ITrayNotify    notify1  = (ITrayNotify)instance;

            notify1.RegisterCallback(callback, out handle);
            notify1.UnregisterCallback(handle);
            return(callback.items);
        }
Exemple #2
0
 public void Dispose()
 {
     if (notifier != null)
     {
         try
         {
             notifier.UnregisterCallback(handle);
             Marshal.ReleaseComObject(notifier);
         }
         catch (Exception e)
         {
             throw new Exception("Could not unregister callback", e);
         }
     }
 }