diff --git a/PInvoke/ShlwApi/Shlwapi.cs b/PInvoke/ShlwApi/Shlwapi.cs index e507231a..a1246db3 100644 --- a/PInvoke/ShlwApi/Shlwapi.cs +++ b/PInvoke/ShlwApi/Shlwapi.cs @@ -1,10 +1,33 @@ using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; +using System.Text; namespace Vanara.PInvoke { public static partial class ShlwApi { + /// Searches for a file. + /// + /// Type: LPTSTR + /// + /// A pointer to a null-terminated string of length MAX_PATH that contains the file name for which to search. If the search is successful, this parameter + /// is used to return the fully qualified path name. + /// + /// + /// + /// Type: LPCTSTR* + /// An optional, null-terminated array of directories to be searched first. This value can be NULL. + /// + /// + /// Type: BOOL + /// Returns TRUE if successful, or FALSE otherwise. + /// + // BOOL PathFindOnPath( _Inout_ LPTSTR pszFile, _In_opt_ LPCTSTR *ppszOtherDirs); + // https://msdn.microsoft.com/en-us/library/windows/desktop/bb773594(v=vs.85).aspx + [PInvokeData("Shlwapi.h", MSDNShortId = "bb773594")] + [DllImport(Lib.Shlwapi, CharSet = CharSet.Auto, SetLastError = false)] + public static extern bool PathFindOnPath(StringBuilder pszFile, [In] string[] ppszOtherDirs); + /// Opens or creates a file and retrieves a stream to read or write to that file. /// A pointer to a null-terminated string that specifies the file name. /// One or more STGM values that are used to specify the file access mode and how the object that exposes the stream is created and deleted.