@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: Searches the current PATH for the specified file !!!!C# Signature: [DllImport("shlwapi.dll", CharSet=CharSet.Auto, SetLastError=false)] static extern bool PathFindOnPath([In, Out] StringBuilder pszFile, [In] String [] ppszOtherDirs); !!!!VB Signature: Declare Function PathFindOnPath Lib "shlwapi.dll" (TODO) As TODO !!!!Notes: Make sure pszFile has enough space for [MAX_PATH] characters. ppszOtherDirs is a list of specific directories to search first. It can be null if you want to search only the PATH. This function does not include the current dir or the application launch dir in its search. !!!!Tips & Tricks: None. !!!!Sample Code: int MAX_PATH=260; StringBuilder sb = new StringBuilder("somefile.dll", MAX_PATH); bool found = PathFindOnPath(sb, new String [] {"c:\\test", "c:\\junk"} ); if (found) { Console.WriteLine("File was found at: " + sb.ToString()); } else { Console.WriteLine("File was not found"); } !!!!Alternative Managed API: None that I could find. Documentation: MSDN http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/shlwapi/path/pathfindonpath.asp
Edit shlwapi.PathFindO...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.