mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-22 03:28:24 +00:00
shell32: Add implementation of WOWShellExecute.
The callback is probably not fully compatible, but apps are not supposed to use that function anyway.
This commit is contained in:
parent
b2d35c3620
commit
b1d96f6ffa
|
@ -48,6 +48,9 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
||||||
|
|
||||||
|
extern HINSTANCE WINAPI WOWShellExecute(HWND hWnd, LPCSTR lpOperation,LPCSTR lpFile,
|
||||||
|
LPCSTR lpParameters,LPCSTR lpDirectory,
|
||||||
|
INT iShowCmd, void *callback);
|
||||||
|
|
||||||
typedef struct { /* structure for dropped files */
|
typedef struct { /* structure for dropped files */
|
||||||
WORD wSize;
|
WORD wSize;
|
||||||
|
@ -600,31 +603,6 @@ HINSTANCE16 WINAPI ShellExecute16( HWND16 hWnd, LPCSTR lpOperation,
|
||||||
LPCSTR lpFile, LPCSTR lpParameters,
|
LPCSTR lpFile, LPCSTR lpParameters,
|
||||||
LPCSTR lpDirectory, INT16 iShowCmd )
|
LPCSTR lpDirectory, INT16 iShowCmd )
|
||||||
{
|
{
|
||||||
SHELLEXECUTEINFOW seiW;
|
return HINSTANCE_16( WOWShellExecute( HWND_32(hWnd), lpOperation, lpFile, lpParameters,
|
||||||
WCHAR *wVerb = NULL, *wFile = NULL, *wParameters = NULL, *wDirectory = NULL;
|
lpDirectory, iShowCmd, SHELL_Execute16 ));
|
||||||
HANDLE hProcess = 0;
|
|
||||||
|
|
||||||
seiW.lpVerb = lpOperation ? __SHCloneStrAtoW(&wVerb, lpOperation) : NULL;
|
|
||||||
seiW.lpFile = lpFile ? __SHCloneStrAtoW(&wFile, lpFile) : NULL;
|
|
||||||
seiW.lpParameters = lpParameters ? __SHCloneStrAtoW(&wParameters, lpParameters) : NULL;
|
|
||||||
seiW.lpDirectory = lpDirectory ? __SHCloneStrAtoW(&wDirectory, lpDirectory) : NULL;
|
|
||||||
|
|
||||||
seiW.cbSize = sizeof(seiW);
|
|
||||||
seiW.fMask = 0;
|
|
||||||
seiW.hwnd = HWND_32(hWnd);
|
|
||||||
seiW.nShow = iShowCmd;
|
|
||||||
seiW.lpIDList = 0;
|
|
||||||
seiW.lpClass = 0;
|
|
||||||
seiW.hkeyClass = 0;
|
|
||||||
seiW.dwHotKey = 0;
|
|
||||||
seiW.hProcess = hProcess;
|
|
||||||
|
|
||||||
SHELL_execute( &seiW, SHELL_Execute16 );
|
|
||||||
|
|
||||||
SHFree(wVerb);
|
|
||||||
SHFree(wFile);
|
|
||||||
SHFree(wParameters);
|
|
||||||
SHFree(wDirectory);
|
|
||||||
|
|
||||||
return HINSTANCE_16(seiW.hInstApp);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -438,4 +438,4 @@
|
||||||
@ stdcall StrStrIA(str str) shlwapi.StrStrIA
|
@ stdcall StrStrIA(str str) shlwapi.StrStrIA
|
||||||
@ stdcall StrStrIW(wstr wstr) shlwapi.StrStrIW
|
@ stdcall StrStrIW(wstr wstr) shlwapi.StrStrIW
|
||||||
@ stdcall StrStrW(wstr wstr) shlwapi.StrStrW
|
@ stdcall StrStrW(wstr wstr) shlwapi.StrStrW
|
||||||
@ stub WOWShellExecute
|
@ stdcall WOWShellExecute(long str str str str long ptr)
|
||||||
|
|
|
@ -1955,6 +1955,42 @@ HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, LPCWSTR lpFile,
|
||||||
return sei.hInstApp;
|
return sei.hInstApp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* WOWShellExecute [SHELL32.@]
|
||||||
|
*
|
||||||
|
* FIXME: the callback function most likely doesn't work the same way on Windows.
|
||||||
|
*/
|
||||||
|
HINSTANCE WINAPI WOWShellExecute(HWND hWnd, LPCSTR lpOperation,LPCSTR lpFile,
|
||||||
|
LPCSTR lpParameters,LPCSTR lpDirectory, INT iShowCmd, void *callback)
|
||||||
|
{
|
||||||
|
SHELLEXECUTEINFOW seiW;
|
||||||
|
WCHAR *wVerb = NULL, *wFile = NULL, *wParameters = NULL, *wDirectory = NULL;
|
||||||
|
HANDLE hProcess = 0;
|
||||||
|
|
||||||
|
seiW.lpVerb = lpOperation ? __SHCloneStrAtoW(&wVerb, lpOperation) : NULL;
|
||||||
|
seiW.lpFile = lpFile ? __SHCloneStrAtoW(&wFile, lpFile) : NULL;
|
||||||
|
seiW.lpParameters = lpParameters ? __SHCloneStrAtoW(&wParameters, lpParameters) : NULL;
|
||||||
|
seiW.lpDirectory = lpDirectory ? __SHCloneStrAtoW(&wDirectory, lpDirectory) : NULL;
|
||||||
|
|
||||||
|
seiW.cbSize = sizeof(seiW);
|
||||||
|
seiW.fMask = 0;
|
||||||
|
seiW.hwnd = hWnd;
|
||||||
|
seiW.nShow = iShowCmd;
|
||||||
|
seiW.lpIDList = 0;
|
||||||
|
seiW.lpClass = 0;
|
||||||
|
seiW.hkeyClass = 0;
|
||||||
|
seiW.dwHotKey = 0;
|
||||||
|
seiW.hProcess = hProcess;
|
||||||
|
|
||||||
|
SHELL_execute( &seiW, callback );
|
||||||
|
|
||||||
|
SHFree(wVerb);
|
||||||
|
SHFree(wFile);
|
||||||
|
SHFree(wParameters);
|
||||||
|
SHFree(wDirectory);
|
||||||
|
return seiW.hInstApp;
|
||||||
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* OpenAs_RunDLLA [SHELL32.@]
|
* OpenAs_RunDLLA [SHELL32.@]
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue