Author: cwittich Date: Tue Apr 21 13:49:59 2009 New Revision: 40631
URL: http://svn.reactos.org/svn/reactos?rev=40631&view=rev Log: sync SHELL_FindExecutable and SHELL_FindExecutableByOperation with wine 1.1.19
Modified: trunk/reactos/dll/win32/shell32/shell32_main.h trunk/reactos/dll/win32/shell32/shlexec.c
Modified: trunk/reactos/dll/win32/shell32/shell32_main.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32_m... ============================================================================== --- trunk/reactos/dll/win32/shell32/shell32_main.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shell32_main.h [iso-8859-1] Tue Apr 21 13:49:59 2009 @@ -217,9 +217,6 @@
BOOL SHELL_execute(LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc);
-UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation, - LPWSTR lpResult, int resultLen, LPWSTR key, WCHAR **env, LPITEMIDLIST pidl, LPCWSTR args); - extern WCHAR swShell32Name[MAX_PATH];
BOOL UNIXFS_is_rooted_at_desktop(void);
Modified: trunk/reactos/dll/win32/shell32/shlexec.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlexec.c... ============================================================================== --- trunk/reactos/dll/win32/shell32/shlexec.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shlexec.c [iso-8859-1] Tue Apr 21 13:49:59 2009 @@ -449,7 +449,7 @@
if (RegOpenKeyExW(HKEY_CLASSES_ROOT, filetype, 0, 0x02000000, &hkeyClass)) return SE_ERR_NOASSOC; - if (!HCR_GetDefaultVerbW(hkeyClass, lpOperation, verb, sizeof(verb))) + if (!HCR_GetDefaultVerbW(hkeyClass, lpOperation, verb, sizeof(verb)/sizeof(verb[0]))) return SE_ERR_NOASSOC; RegCloseKey(hkeyClass);
@@ -511,7 +511,7 @@ * command (it'll be used afterwards for more information * on the operation) */ -UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation, +static UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation, LPWSTR lpResult, int resultLen, LPWSTR key, WCHAR **env, LPITEMIDLIST pidl, LPCWSTR args) { static const WCHAR wWindows[] = {'w','i','n','d','o','w','s',0}; @@ -565,6 +565,12 @@ } else { + /* Did we get something? Anything? */ + if (xlpFile[0]==0) + { + TRACE("Returning SE_ERR_FNF\n"); + return SE_ERR_FNF; + } /* First thing we need is the file's extension */ extension = wcsrchr(xlpFile, '.'); /* Assume last "." is the one; */ /* File->Run in progman uses */ @@ -609,7 +615,7 @@ * attached */ TRACE("found %s\n", debugstr_w(lpResult)); return 33; - /* Greater than 32 to indicate success */ + /* Greater than 32 to indicate success */ } tok = p; }