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
f82ddf5e
Commit
f82ddf5e
authored
Dec 29, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: Get rid of support for loading old style 16-bit files.
parent
a18bbec0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
106 deletions
+1
-106
ne_module.c
dlls/krnl386.exe16/ne_module.c
+1
-106
No files found.
dlls/krnl386.exe16/ne_module.c
View file @
f82ddf5e
...
...
@@ -67,18 +67,6 @@ struct ne_segment_table_entry_s
#define hFirstModule (pThhook->hExeHead)
struct
builtin_dll
{
const
IMAGE_DOS_HEADER
*
header
;
/* module headers */
const
char
*
file_name
;
/* module file name */
};
/* Table of all built-in DLLs */
#define MAX_DLLS 50
static
struct
builtin_dll
builtin_dlls
[
MAX_DLLS
];
static
HINSTANCE16
NE_LoadModule
(
LPCSTR
name
,
BOOL
lib_only
);
static
BOOL16
NE_FreeModule
(
HMODULE16
hModule
,
BOOL
call_wep
);
...
...
@@ -152,79 +140,6 @@ static int NE_strncasecmp( const char *str1, const char *str2, int len )
/***********************************************************************
* find_dll_descr
*
* Find a descriptor in the list
*/
static
const
IMAGE_DOS_HEADER
*
find_dll_descr
(
const
char
*
dllname
,
const
char
**
file_name
)
{
int
i
;
const
IMAGE_DOS_HEADER
*
mz_header
;
const
IMAGE_OS2_HEADER
*
ne_header
;
const
BYTE
*
name_table
;
for
(
i
=
0
;
i
<
MAX_DLLS
;
i
++
)
{
mz_header
=
builtin_dlls
[
i
].
header
;
if
(
mz_header
)
{
ne_header
=
(
const
IMAGE_OS2_HEADER
*
)((
const
char
*
)
mz_header
+
mz_header
->
e_lfanew
);
name_table
=
(
const
BYTE
*
)
ne_header
+
ne_header
->
ne_restab
;
/* check the dll file name */
if
(
!
NE_strcasecmp
(
builtin_dlls
[
i
].
file_name
,
dllname
)
||
/* check the dll module name (without extension) */
(
!
NE_strncasecmp
(
dllname
,
(
const
char
*
)
name_table
+
1
,
*
name_table
)
&&
!
strcmp
(
dllname
+
*
name_table
,
".dll"
)))
{
*
file_name
=
builtin_dlls
[
i
].
file_name
;
return
builtin_dlls
[
i
].
header
;
}
}
}
return
NULL
;
}
/***********************************************************************
* __wine_dll_register_16 (KERNEL32.@)
*
* Register a built-in DLL descriptor.
*/
void
__wine_dll_register_16
(
const
IMAGE_DOS_HEADER
*
header
,
const
char
*
file_name
)
{
int
i
;
for
(
i
=
0
;
i
<
MAX_DLLS
;
i
++
)
{
if
(
builtin_dlls
[
i
].
header
)
continue
;
builtin_dlls
[
i
].
header
=
header
;
builtin_dlls
[
i
].
file_name
=
file_name
;
break
;
}
assert
(
i
<
MAX_DLLS
);
}
/***********************************************************************
* __wine_dll_unregister_16 (KERNEL32.@)
*
* Unregister a built-in DLL descriptor.
*/
void
__wine_dll_unregister_16
(
const
IMAGE_DOS_HEADER
*
header
)
{
int
i
;
for
(
i
=
0
;
i
<
MAX_DLLS
;
i
++
)
{
if
(
builtin_dlls
[
i
].
header
!=
header
)
continue
;
builtin_dlls
[
i
].
header
=
NULL
;
break
;
}
}
/***********************************************************************
* NE_GetPtr
*/
NE_MODULE
*
NE_GetPtr
(
HMODULE16
hModule
)
...
...
@@ -1050,7 +965,7 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_
NE_MODULE
*
pModule
;
const
IMAGE_DOS_HEADER
*
descr
=
NULL
;
const
char
*
file_name
=
NULL
;
char
dllname
[
32
],
owner
[
20
],
*
p
;
char
dllname
[
32
],
*
p
;
const
char
*
basename
,
*
main_module
;
int
owner_exists
=
FALSE
;
...
...
@@ -1103,27 +1018,7 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_
}
}
}
*
p
=
0
;
/* old-style 16-bit placeholders support, to be removed at some point */
if
(
!
mod32
&&
wine_dll_get_owner
(
dllname
,
owner
,
sizeof
(
owner
),
&
owner_exists
)
!=
-
1
)
{
mod32
=
LoadLibraryA
(
owner
);
if
(
mod32
)
{
if
(
!
(
descr
=
find_dll_descr
(
dllname
,
&
file_name
)))
{
FreeLibrary
(
mod32
);
owner_exists
=
0
;
}
}
else
{
/* it's probably disabled by the load order config */
WARN
(
"couldn't load owner %s for 16-bit dll %s
\n
"
,
owner
,
dllname
);
return
ERROR_FILE_NOT_FOUND
;
}
}
/* loading the 32-bit library can have the side effect of loading the module */
/* if so, simply incr the ref count and return the module */
if
(
descr
&&
(
hModule
=
GetModuleHandle16
(
libname
)))
...
...
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