Commit a06f76d6 authored by Martin Fuchs's avatar Martin Fuchs Committed by Alexandre Julliard

Expand environment strings in command, parameter and directory strings

of ShellExecuteExW32().
parent b040e4bc
...@@ -611,13 +611,14 @@ DWORD WINAPI RegEnumKey16( HKEY hkey, DWORD index, LPSTR name, DWORD name_len ) ...@@ -611,13 +611,14 @@ DWORD WINAPI RegEnumKey16( HKEY hkey, DWORD index, LPSTR name, DWORD name_len )
/************************************************************************* /*************************************************************************
* SHELL_Execute16 [Internal] * SHELL_Execute16 [Internal]
*/ */
static UINT SHELL_Execute16(WCHAR *lpCmd, void* env, LPSHELLEXECUTEINFOW seiW, BOOL shWait) static UINT SHELL_Execute16(const WCHAR *lpCmd, void *env, BOOL shWait,
LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out)
{ {
UINT ret; UINT ret;
char sCmd[MAX_PATH]; char sCmd[MAX_PATH];
WideCharToMultiByte(CP_ACP, 0, lpCmd, -1, sCmd, MAX_PATH, NULL, NULL); WideCharToMultiByte(CP_ACP, 0, lpCmd, -1, sCmd, MAX_PATH, NULL, NULL);
ret = WinExec16(sCmd, seiW->nShow); ret = WinExec16(sCmd, (UINT16)psei->nShow);
seiW->hInstApp = HINSTANCE_32(ret); psei_out->hInstApp = HINSTANCE_32(ret);
return ret; return ret;
} }
......
...@@ -228,8 +228,10 @@ inline static WCHAR * __SHCloneStrAtoW(WCHAR ** target, const char * source) ...@@ -228,8 +228,10 @@ inline static WCHAR * __SHCloneStrAtoW(WCHAR ** target, const char * source)
#define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16)) #define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16))
#define HINSTANCE_16(h32) (LOWORD(h32)) #define HINSTANCE_16(h32) (LOWORD(h32))
typedef UINT (*SHELL_ExecuteW32)(WCHAR *lpCmd, void *env, LPSHELLEXECUTEINFOW sei, BOOL shWait); typedef UINT (*SHELL_ExecuteW32)(const WCHAR *lpCmd, void *env, BOOL shWait,
BOOL WINAPI ShellExecuteExW32 (LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc); LPSHELLEXECUTEINFOW sei, LPSHELLEXECUTEINFOW sei_out);
BOOL WINAPI ShellExecuteExW32(LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc);
extern WCHAR swShell32Name[MAX_PATH]; extern WCHAR swShell32Name[MAX_PATH];
extern char sShell32Name[MAX_PATH]; extern char sShell32Name[MAX_PATH];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment