diff --git a/PInvoke/Shell32/ShlObj.cs b/PInvoke/Shell32/ShlObj.cs index 4ab90c32..95e3e7a0 100644 --- a/PInvoke/Shell32/ShlObj.cs +++ b/PInvoke/Shell32/ShlObj.cs @@ -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); + /// + /// 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. + /// + /// A value from the SHARD enumeration that indicates the form of the information pointed to by the pv parameter. + /// + /// 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: + /// + /// A null-terminated string that contains the path and file name of the item. + /// A PIDL that identifies the item's file object. + /// + /// 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. + /// + /// Windows 7 and later only. An IShellLink object that identifies the item through a shortcut. + /// + /// Set this parameter to NULL to clear all usage data on all items. + /// + [DllImport(Lib.Shell32, ExactSpelling = true)] + [SecurityCritical, SuppressUnmanagedCodeSecurity] + [PInvokeData("Shlobj.h", MSDNShortId = "bb762105")] + public static extern void SHAddToRecentDocs(SHARD uFlags, IShellItem pv); + /// /// 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.