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
a9c33bbc
Commit
a9c33bbc
authored
Jul 21, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Try to load a 32-bit builtin in WinExec16 if the file doesn't exist.
parent
a77e369c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
13 deletions
+30
-13
ne_module.c
dlls/kernel32/ne_module.c
+30
-13
No files found.
dlls/kernel32/ne_module.c
View file @
a9c33bbc
...
...
@@ -119,6 +119,15 @@ static inline void patch_code_segment( NE_MODULE *pModule )
/***********************************************************************
* contains_path
*/
static
inline
int
contains_path
(
LPCSTR
name
)
{
return
((
*
name
&&
(
name
[
1
]
==
':'
))
||
strchr
(
name
,
'/'
)
||
strchr
(
name
,
'\\'
));
}
/***********************************************************************
* NE_strcasecmp
*
* locale-independent case conversion for module lookups
...
...
@@ -1674,6 +1683,8 @@ HINSTANCE16 WINAPI WinExec16( LPCSTR lpCmdLine, UINT16 nCmdShow )
int
arglen
;
HINSTANCE16
ret
;
char
buffer
[
MAX_PATH
];
LOADPARAMS16
params
;
WORD
showCmd
[
2
];
if
(
*
lpCmdLine
==
'"'
)
/* has to be only one and only at beginning ! */
{
...
...
@@ -1722,23 +1733,29 @@ HINSTANCE16 WINAPI WinExec16( LPCSTR lpCmdLine, UINT16 nCmdShow )
TRACE
(
"name: '%s', cmdline: '%.*s'
\n
"
,
name
,
cmdline
[
0
],
&
cmdline
[
1
]);
if
(
SearchPathA
(
NULL
,
name
,
".exe"
,
sizeof
(
buffer
),
buffer
,
NULL
))
{
LOADPARAMS16
params
;
WORD
showCmd
[
2
];
showCmd
[
0
]
=
2
;
showCmd
[
1
]
=
nCmdShow
;
showCmd
[
0
]
=
2
;
showCmd
[
1
]
=
nCmdShow
;
params
.
hEnvironment
=
0
;
params
.
cmdLine
=
MapLS
(
cmdline
);
params
.
showCmd
=
MapLS
(
showCmd
);
params
.
reserved
=
0
;
params
.
hEnvironment
=
0
;
params
.
cmdLine
=
MapLS
(
cmdline
);
params
.
showCmd
=
MapLS
(
showCmd
);
params
.
reserved
=
0
;
if
(
SearchPathA
(
NULL
,
name
,
".exe"
,
sizeof
(
buffer
),
buffer
,
NULL
))
{
ret
=
LoadModule16
(
buffer
,
&
params
);
UnMapLS
(
params
.
cmdLine
);
UnMapLS
(
params
.
showCmd
);
}
else
ret
=
GetLastError
();
else
if
(
!
contains_path
(
name
))
/* try 16-bit builtin */
{
lstrcpynA
(
buffer
,
name
,
sizeof
(
buffer
)
);
if
(
strlen
(
buffer
)
<
sizeof
(
buffer
)
-
4
&&
!
strchr
(
buffer
,
'.'
))
strcat
(
buffer
,
".exe"
);
ret
=
LoadModule16
(
buffer
,
&
params
);
if
(
ret
==
ERROR_FILE_NOT_FOUND
)
ret
=
21
;
/* it might be a 32-bit builtin too */
}
else
ret
=
ERROR_FILE_NOT_FOUND
;
UnMapLS
(
params
.
cmdLine
);
UnMapLS
(
params
.
showCmd
);
HeapFree
(
GetProcessHeap
(),
0
,
cmdline
);
if
(
name
!=
lpCmdLine
)
HeapFree
(
GetProcessHeap
(),
0
,
name
);
...
...
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