/// <summary>
        /// Deletes all custom destinations from the application's jump list.
        /// </summary>
        public void ClearCustomDestinations()
        {
            try
            {
                HResult deleteListResult = _customDestinationList.DeleteList(_appId);
                deleteListResult.ThrowIf();
            }
            catch (FileNotFoundException)
            { /*Means the list is empty, that's cool. */ }

            _destinations.Clear();
        }
Example #2
0
        /// <summary>
        /// Deletes all custom destinations from the application's jump list.
        /// </summary>
        public void ClearCustomDestinations()
        {
            try
            {
                _customDestinationList.DeleteList(_appId);
            }
            catch (FileNotFoundException)
            {//Means the list is empty, that's cool.
            }

            _destinations.Clear();
        }
Example #3
0
        public static void DeleteJumpList()
        {
            try {
                ICustomDestinationList custom_destinationd_list =
                    (ICustomDestinationList)Activator.CreateInstance(Type.GetTypeFromCLSID(CLSID.DestinationList));

                Logger.Debug("Windows Taskbar: Remove jump list");
                custom_destinationd_list.DeleteList(null);

                Marshal.FinalReleaseComObject(custom_destinationd_list);
                custom_destinationd_list = null;
            } catch (Exception e) {
                Logger.Error("Error removing jump list: {0}\n{1}", e.Message, e.StackTrace);
            }
        }