Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
00346541
Commit
00346541
authored
Jan 15, 2004
by
Marcelo Duarte
Committed by
Alexandre Julliard
Jan 15, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Get rid of W->A calls for shlexec.
- Implementation of FindExecutableW.
parent
f33de52f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
22 deletions
+38
-22
shell.c
dlls/shell32/shell.c
+38
-20
shell32_main.h
dlls/shell32/shell32_main.h
+0
-2
shlexec.c
dlls/shell32/shlexec.c
+0
-0
No files found.
dlls/shell32/shell.c
View file @
00346541
...
...
@@ -611,10 +611,13 @@ DWORD WINAPI RegEnumKey16( HKEY hkey, DWORD index, LPSTR name, DWORD name_len )
/*************************************************************************
* SHELL_Execute16 [Internal]
*/
static
UINT
SHELL_Execute16
(
char
*
lpCmd
,
void
*
env
,
LPSHELLEXECUTEINFOA
sei
,
BOOL
shWait
)
static
UINT
SHELL_Execute16
(
WCHAR
*
lpCmd
,
void
*
env
,
LPSHELLEXECUTEINFOW
seiW
,
BOOL
shWait
)
{
UINT
ret
=
WinExec16
(
lpCmd
,
sei
->
nShow
);
sei
->
hInstApp
=
HINSTANCE_32
(
ret
);
UINT
ret
;
char
sCmd
[
MAX_PATH
];
WideCharToMultiByte
(
CP_ACP
,
0
,
lpCmd
,
-
1
,
sCmd
,
MAX_PATH
,
NULL
,
NULL
);
ret
=
WinExec16
(
sCmd
,
seiW
->
nShow
);
seiW
->
hInstApp
=
HINSTANCE_32
(
ret
);
return
ret
;
}
...
...
@@ -625,23 +628,38 @@ HINSTANCE16 WINAPI ShellExecute16( HWND16 hWnd, LPCSTR lpOperation,
LPCSTR
lpFile
,
LPCSTR
lpParameters
,
LPCSTR
lpDirectory
,
INT16
iShowCmd
)
{
SHELLEXECUTEINFOA
sei
;
SHELLEXECUTEINFOW
seiW
;
WCHAR
*
wVerb
=
NULL
,
*
wFile
=
NULL
,
*
wParameters
=
NULL
,
*
wDirectory
=
NULL
;
HANDLE
hProcess
=
0
;
sei
.
cbSize
=
sizeof
(
sei
);
sei
.
fMask
=
0
;
sei
.
hwnd
=
HWND_32
(
hWnd
);
sei
.
lpVerb
=
lpOperation
;
sei
.
lpFile
=
lpFile
;
sei
.
lpParameters
=
lpParameters
;
sei
.
lpDirectory
=
lpDirectory
;
sei
.
nShow
=
iShowCmd
;
sei
.
lpIDList
=
0
;
sei
.
lpClass
=
0
;
sei
.
hkeyClass
=
0
;
sei
.
dwHotKey
=
0
;
sei
.
hProcess
=
hProcess
;
ShellExecuteExA32
(
&
sei
,
SHELL_Execute16
);
return
HINSTANCE_16
(
sei
.
hInstApp
);
if
(
lpOperation
)
seiW
.
lpVerb
=
__SHCloneStrAtoW
(
&
wVerb
,
lpOperation
);
if
(
lpFile
)
seiW
.
lpFile
=
__SHCloneStrAtoW
(
&
wFile
,
lpFile
);
if
(
lpParameters
)
seiW
.
lpParameters
=
__SHCloneStrAtoW
(
&
wParameters
,
lpParameters
);
if
(
lpDirectory
)
seiW
.
lpDirectory
=
__SHCloneStrAtoW
(
&
wDirectory
,
lpDirectory
);
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
;
ShellExecuteExW32
(
&
seiW
,
SHELL_Execute16
);
if
(
wVerb
)
SHFree
(
wVerb
);
if
(
wFile
)
SHFree
(
wFile
);
if
(
wParameters
)
SHFree
(
wParameters
);
if
(
wDirectory
)
SHFree
(
wDirectory
);
return
HINSTANCE_16
(
seiW
.
hInstApp
);
}
dlls/shell32/shell32_main.h
View file @
00346541
...
...
@@ -235,8 +235,6 @@ inline static WCHAR * __SHCloneStrAtoW(WCHAR ** target, const char * source)
#define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16))
#define HINSTANCE_16(h32) (LOWORD(h32))
typedef
UINT
(
*
SHELL_ExecuteA1632
)(
char
*
lpCmd
,
void
*
env
,
LPSHELLEXECUTEINFOA
sei
,
BOOL
shWait
);
BOOL
WINAPI
ShellExecuteExA32
(
LPSHELLEXECUTEINFOA
sei
,
SHELL_ExecuteA1632
execfunc
);
typedef
UINT
(
*
SHELL_ExecuteW32
)(
WCHAR
*
lpCmd
,
void
*
env
,
LPSHELLEXECUTEINFOW
sei
,
BOOL
shWait
);
BOOL
WINAPI
ShellExecuteExW32
(
LPSHELLEXECUTEINFOW
sei
,
SHELL_ExecuteW32
execfunc
);
...
...
dlls/shell32/shlexec.c
View file @
00346541
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment