Added overload for IShellItem to SHAddToRecentDocs

pull/30/head
David Hall 2019-01-16 07:29:59 -07:00
parent 7e13acf8ec
commit 4b7912fdbc
1 changed files with 24 additions and 0 deletions

View File

@ -3119,6 +3119,30 @@ namespace Vanara.PInvoke
[PInvokeData("shlobj_core.h", MSDNShortId = "32bc232f-6cc4-4f19-9d33-ba7ad28dfd59")]
public static extern int RestartDialogEx(HWND hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszPrompt, uint dwReturn, uint dwReasonCode);
/// <summary>
/// Notifies the system that an item has been accessed, for the purposes of tracking those items used most recently and most
/// frequently. This function can also be used to clear all usage data.
/// </summary>
/// <param name="uFlags">A value from the SHARD enumeration that indicates the form of the information pointed to by the pv parameter.</param>
/// <param name="pv">
/// A pointer to data that identifies the item that has been accessed. The item can be specified in this parameter in one of the
/// following forms:
/// <list type="bullet">
/// <item><definition>A null-terminated string that contains the path and file name of the item.</definition></item>
/// <item><definition>A PIDL that identifies the item's file object.</definition></item>
/// <item>
/// <definition>Windows 7 and later only. A SHARDAPPIDINFO, SHARDAPPIDINFOIDLIST, or SHARDAPPIDINFOLINK structure that identifies the
/// item through an AppUserModelID. See Application User Model IDs (AppUserModelIDs) for more information.</definition>
/// </item>
/// <item><definition>Windows 7 and later only. An IShellLink object that identifies the item through a shortcut.</definition></item>
/// </list>
/// <para>Set this parameter to NULL to clear all usage data on all items.</para>
/// </param>
[DllImport(Lib.Shell32, ExactSpelling = true)]
[SecurityCritical, SuppressUnmanagedCodeSecurity]
[PInvokeData("Shlobj.h", MSDNShortId = "bb762105")]
public static extern void SHAddToRecentDocs(SHARD uFlags, IShellItem pv);
/// <summary>
/// Notifies the system that an item has been accessed, for the purposes of tracking those items used most recently and most
/// frequently. This function can also be used to clear all usage data.