sync with Wine:
[reactos.git] / reactos / lib / shell32 / shlexec.c
index 65c0d50..17e9bec 100644 (file)
@@ -334,12 +334,12 @@ static HRESULT SHELL_ResolveShortCutW(LPWSTR wcmd, LPWSTR wargs, LPWSTR wdir, HW
  *     SHELL_ExecuteW [Internal]
  *
  */
-static UINT SHELL_ExecuteW(const WCHAR *lpCmd, WCHAR *env, BOOL shWait,
+static UINT_PTR SHELL_ExecuteW(const WCHAR *lpCmd, WCHAR *env, BOOL shWait,
                            LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out)
 {
     STARTUPINFOW  startup;
     PROCESS_INFORMATION info;
-    UINT retval = 31;
+    UINT_PTR retval = 31;
     UINT gcdret = 0;
     WCHAR curdir[MAX_PATH];
 
@@ -864,13 +864,13 @@ static unsigned dde_connect(WCHAR* key, WCHAR* start, WCHAR* ddeexec,
 /*************************************************************************
  *     execute_from_key [Internal]
  */
-static UINT execute_from_key(LPWSTR key, LPCWSTR lpFile, WCHAR *env, LPCWSTR szCommandline,
+static UINT_PTR execute_from_key(LPWSTR key, LPCWSTR lpFile, WCHAR *env, LPCWSTR szCommandline,
                             SHELL_ExecuteW32 execfunc,
                             LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out)
 {
     WCHAR cmd[1024];
     LONG cmdlen = sizeof(cmd);
-    UINT retval = 31;
+    UINT_PTR retval = 31;
 
     cmd[0] = '\0';
 
@@ -936,7 +936,7 @@ HINSTANCE WINAPI FindExecutableA(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResu
  */
 HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpResult)
 {
-    UINT retval = 31;    /* default - 'No association was found' */
+    UINT_PTR retval = 31;    /* default - 'No association was found' */
     WCHAR old_dir[1024];
 
     TRACE("File %s, Dir %s\n",
@@ -989,7 +989,7 @@ BOOL WINAPI ShellExecuteExW32 (LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfun
     WCHAR *env;
     WCHAR lpstrProtocol[256];
     LPCWSTR lpFile;
-    UINT retval = 31;
+    UINT_PTR retval = 31;
     WCHAR wcmd[1024];
     WCHAR buffer[MAX_PATH];
     const WCHAR* ext;
@@ -1360,7 +1360,6 @@ HINSTANCE WINAPI ShellExecuteA(HWND hWnd, LPCSTR lpOperation,LPCSTR lpFile,
                                LPCSTR lpParameters,LPCSTR lpDirectory, INT iShowCmd)
 {
     SHELLEXECUTEINFOA sei;
-    HANDLE hProcess = 0;
 
     TRACE("%p,%s,%s,%s,%s,%d\n",
           hWnd, debugstr_a(lpOperation), debugstr_a(lpFile),
@@ -1378,7 +1377,7 @@ HINSTANCE WINAPI ShellExecuteA(HWND hWnd, LPCSTR lpOperation,LPCSTR lpFile,
     sei.lpClass = 0;
     sei.hkeyClass = 0;
     sei.dwHotKey = 0;
-    sei.hProcess = hProcess;
+    sei.hProcess = 0;
 
     ShellExecuteExA (&sei);
     return sei.hInstApp;
@@ -1450,7 +1449,6 @@ HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, LPCWSTR lpFile,
                                LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
 {
     SHELLEXECUTEINFOW sei;
-    HANDLE hProcess = 0;
 
     TRACE("\n");
     sei.cbSize = sizeof(sei);
@@ -1465,7 +1463,7 @@ HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, LPCWSTR lpFile,
     sei.lpClass = 0;
     sei.hkeyClass = 0;
     sei.dwHotKey = 0;
-    sei.hProcess = hProcess;
+    sei.hProcess = 0;
 
     ShellExecuteExW32 (&sei, SHELL_ExecuteW);
     return sei.hInstApp;