Module: wine Branch: master Commit: df299b73059991c5a734835a78c77e0894028740 URL: http://source.winehq.org/git/wine.git/?a=commit;h=df299b73059991c5a734835a78...
Author: Francois Gouget fgouget@codeweavers.com Date: Thu Dec 14 18:00:12 2006 +0100
shell32: Replace numeric literals with the proper constant.
---
dlls/shell32/shlexec.c | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index f49382a..0c3b5a4 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -342,7 +342,7 @@ static UINT_PTR SHELL_ExecuteW(const WCH { STARTUPINFOW startup; PROCESS_INFORMATION info; - UINT_PTR retval = 31; + UINT_PTR retval = SE_ERR_NOASSOC; UINT gcdret = 0; WCHAR curdir[MAX_PATH];
@@ -497,9 +497,9 @@ static UINT SHELL_FindExecutableByOperat WCHAR verb[MAX_PATH];
if (RegOpenKeyExW(HKEY_CLASSES_ROOT, filetype, 0, 0x02000000, &hkeyClass)) - return 31; /* default - 'No association was found' */ + return SE_ERR_NOASSOC; if (!HCR_GetDefaultVerbW(hkeyClass, lpOperation, verb, sizeof(verb))) - return 31; /* default - 'No association was found' */ + return SE_ERR_NOASSOC; RegCloseKey(hkeyClass);
/* Looking for ...buffer\shell<verb>\command */ @@ -543,7 +543,7 @@ static UINT SHELL_FindExecutableByOperat return 33; /* FIXME see SHELL_FindExecutable() */ }
- return 31; /* default - 'No association was found' */ + return SE_ERR_NOASSOC; }
/************************************************************************* @@ -571,7 +571,7 @@ UINT SHELL_FindExecutable(LPCWSTR lpPath LONG filetypelen = sizeof(filetype); /* length of above */ WCHAR command[1024]; /* command from registry */ WCHAR wBuffer[256]; /* Used to GetProfileString */ - UINT retval = 31; /* default - 'No association was found' */ + UINT retval = SE_ERR_NOASSOC; WCHAR *tok; /* token pointer */ WCHAR xlpFile[256]; /* result of SearchPath */ DWORD attribs; /* file attributes */ @@ -622,8 +622,8 @@ UINT SHELL_FindExecutable(LPCWSTR lpPath
if (extension == NULL || extension[1]==0) { - WARN("Returning 31 - No association\n"); - return 31; /* no association */ + WARN("Returning SE_ERR_NOASSOC\n"); + return SE_ERR_NOASSOC; }
/* Three places to check: */ @@ -790,7 +790,7 @@ static unsigned dde_connect(WCHAR* key, HSZ hszApp, hszTopic; HCONV hConv; HDDEDATA hDdeData; - unsigned ret = 31; + unsigned ret = SE_ERR_NOASSOC; BOOL unicode = !(GetVersion() & 0x80000000);
strcpyW(endkey, wApplication); @@ -830,7 +830,7 @@ static unsigned dde_connect(WCHAR* key, static const WCHAR wIfexec[] = {'\','i','f','e','x','e','c',0}; TRACE("Launching '%s'\n", debugstr_w(start)); ret = execfunc(start, env, TRUE, psei, psei_out); - if (ret < 32) + if (ret <= 32) { TRACE("Couldn't launch\n"); goto error; @@ -895,7 +895,7 @@ static UINT_PTR execute_from_key(LPWSTR { WCHAR cmd[256]; LONG cmdlen = sizeof(cmd); - UINT_PTR retval = 31; + UINT_PTR retval = SE_ERR_NOASSOC;
TRACE("%s %s %s %s %s\n", debugstr_w(key), debugstr_w(lpFile), debugstr_w(env), debugstr_w(szCommandline), debugstr_w(executable_name)); @@ -1006,7 +1006,7 @@ HINSTANCE WINAPI FindExecutableA(LPCSTR */ HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpResult) { - UINT_PTR retval = 31; /* default - 'No association was found' */ + UINT_PTR retval = SE_ERR_NOASSOC; WCHAR old_dir[1024];
TRACE("File %s, Dir %s\n", @@ -1311,7 +1311,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW WCHAR *env; WCHAR lpstrProtocol[256]; LPCWSTR lpFile; - UINT_PTR retval = 31; + UINT_PTR retval = SE_ERR_NOASSOC; WCHAR wcmd[1024]; WCHAR buffer[MAX_PATH]; BOOL done;