Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
cd6295d2
Commit
cd6295d2
authored
Feb 24, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Add support for loading stand-alone 16-bit modules.
parent
af2e40ea
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
ne_module.c
dlls/kernel32/ne_module.c
+19
-3
No files found.
dlls/kernel32/ne_module.c
View file @
cd6295d2
...
@@ -1045,7 +1045,7 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_
...
@@ -1045,7 +1045,7 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_
NE_MODULE
*
pModule
;
NE_MODULE
*
pModule
;
const
IMAGE_DOS_HEADER
*
descr
=
NULL
;
const
IMAGE_DOS_HEADER
*
descr
=
NULL
;
const
char
*
file_name
=
NULL
;
const
char
*
file_name
=
NULL
;
char
dllname
[
20
],
owner
[
20
],
*
p
;
char
dllname
[
32
],
owner
[
20
],
*
p
;
const
char
*
basename
;
const
char
*
basename
;
int
owner_exists
=
FALSE
;
int
owner_exists
=
FALSE
;
...
@@ -1056,14 +1056,30 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_
...
@@ -1056,14 +1056,30 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_
if
((
p
=
strrchr
(
basename
,
'\\'
)))
basename
=
p
+
1
;
if
((
p
=
strrchr
(
basename
,
'\\'
)))
basename
=
p
+
1
;
if
((
p
=
strrchr
(
basename
,
'/'
)))
basename
=
p
+
1
;
if
((
p
=
strrchr
(
basename
,
'/'
)))
basename
=
p
+
1
;
if
(
strlen
(
basename
)
<
sizeof
(
dllname
)
-
4
)
if
(
strlen
(
basename
)
<
sizeof
(
dllname
)
-
6
)
{
{
strcpy
(
dllname
,
basename
);
strcpy
(
dllname
,
basename
);
p
=
strrchr
(
dllname
,
'.'
);
p
=
strrchr
(
dllname
,
'.'
);
if
(
!
p
)
strcat
(
dllname
,
".dll"
);
if
(
!
p
)
strcat
(
dllname
,
".dll"
);
for
(
p
=
dllname
;
*
p
;
p
++
)
if
(
*
p
>=
'A'
&&
*
p
<=
'Z'
)
*
p
+=
32
;
for
(
p
=
dllname
;
*
p
;
p
++
)
if
(
*
p
>=
'A'
&&
*
p
<=
'Z'
)
*
p
+=
32
;
if
(
wine_dll_get_owner
(
dllname
,
owner
,
sizeof
(
owner
),
&
owner_exists
)
!=
-
1
)
strcpy
(
p
,
"16"
);
if
((
mod32
=
LoadLibraryA
(
dllname
)))
{
if
(
!
(
descr
=
(
void
*
)
GetProcAddress
(
mod32
,
"__wine_spec_dos_header"
)))
{
WARN
(
"loaded %s but does not contain a 16-bit module
\n
"
,
debugstr_a
(
dllname
)
);
FreeLibrary
(
mod32
);
}
else
{
TRACE
(
"found %s with embedded 16-bit module
\n
"
,
debugstr_a
(
dllname
)
);
file_name
=
basename
;
}
}
*
p
=
0
;
if
(
!
descr
&&
wine_dll_get_owner
(
dllname
,
owner
,
sizeof
(
owner
),
&
owner_exists
)
!=
-
1
)
{
{
mod32
=
LoadLibraryA
(
owner
);
mod32
=
LoadLibraryA
(
owner
);
if
(
mod32
)
if
(
mod32
)
...
...
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