/// <summary> /// Adds the specified destination to the application's /// recent destinations list. /// </summary> /// <remarks> /// If the recent and frequent categories are disabled, /// this method has no visual effect on the jump list /// in the recent and frequent categories respectively. /// </remarks> /// <param name="destination">An object implementing /// <see cref="IJumpListDestination"/> such as <see cref="ShellLink"/> /// or <see cref="ShellItem"/>.</param> public void AddToRecent(IJumpListDestination destination) { if (destination is ShellItem) { SHARDAPPIDINFO info = new SHARDAPPIDINFO { psi = (VistaBridgeInterop.IShellItem)destination.GetShellRepresentation(), pszAppID = _appId }; UnsafeNativeMethods.SHAddToRecentDocs(ref info); } else if (destination is ShellLink) { //TODO: This doesn't actually work SHARDAPPIDINFOLINK info = new SHARDAPPIDINFOLINK { psl = (IShellLinkW)destination.GetShellRepresentation(), pszAppID = _appId }; UnsafeNativeMethods.SHAddToRecentDocs(ref info); } Thread.Sleep(200); }
public static void SHAddToRecentDocs(ref SHARDAPPIDINFOLINK appIDInfoLink) { UnsafeNativeMethods.SHAddToRecentDocs(SHARD.SHARD_APPIDINFOLINK, ref appIDInfoLink); }
public static extern void SHAddToRecentDocs( SHARD flags, ref SHARDAPPIDINFOLINK appIDInfoLink);