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
04689b26
Commit
04689b26
authored
Mar 28, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always load the 32-bit dll containing a given 16-bit builtin.
Check the module name in addition to the file name when loading a 16-bit builtin dll.
parent
4d73ba6e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
44 deletions
+36
-44
user.spec
dlls/user/user.spec
+1
-1
builtin.c
if1632/builtin.c
+35
-17
builtin16.h
include/builtin16.h
+0
-1
spec16.c
tools/winebuild/spec16.c
+0
-1
user.c
windows/user.c
+0
-24
No files found.
dlls/user/user.spec
View file @
04689b26
...
...
@@ -362,7 +362,7 @@ rsrc resources/version16.res
371 pascal16 SetWindowPlacement(word ptr) SetWindowPlacement16
372 stub GetInternalIconHeader
373 pascal16 SubtractRect(ptr ptr ptr) SubtractRect16
374 pascal DllEntryPoint(long word word word long word) USER_
DllEntryPoint
#374
DllEntryPoint
375 stub DrawTextEx
376 stub SetMessageExtraInfo
378 stub SetPropEx
...
...
if1632/builtin.c
View file @
04689b26
...
...
@@ -67,8 +67,6 @@ static HMODULE16 BUILTIN_DoLoadModule16( const BUILTIN16_DESCRIPTOR *descr )
/* NOTE: (Ab)use the hRsrcMap parameter for resource data pointer */
pModule
->
hRsrcMap
=
(
void
*
)
descr
->
rsrc
;
TRACE
(
"Built-in %s: hmodule=%04x
\n
"
,
descr
->
name
,
hModule
);
/* Allocate the code segment */
pSegTable
=
NE_SEG_TABLE
(
pModule
);
...
...
@@ -96,20 +94,51 @@ static HMODULE16 BUILTIN_DoLoadModule16( const BUILTIN16_DESCRIPTOR *descr )
if
(
descr
->
rsrc
)
NE_InitResourceHandler
(
hModule
);
NE_RegisterModule
(
pModule
);
/* make sure the 32-bit library containing this one is loaded too */
LoadLibraryA
(
descr
->
owner
);
return
hModule
;
}
/***********************************************************************
* find_dll_descr
*
* Find a descriptor in the list
*/
static
const
BUILTIN16_DESCRIPTOR
*
find_dll_descr
(
const
char
*
dllname
)
{
int
i
;
for
(
i
=
0
;
i
<
nb_dlls
;
i
++
)
{
const
BUILTIN16_DESCRIPTOR
*
descr
=
builtin_dlls
[
i
];
NE_MODULE
*
pModule
=
(
NE_MODULE
*
)
descr
->
module_start
;
OFSTRUCT
*
pOfs
=
(
OFSTRUCT
*
)((
LPBYTE
)
pModule
+
pModule
->
fileinfo
);
BYTE
*
name_table
=
(
BYTE
*
)
pModule
+
pModule
->
name_table
;
/* check the dll file name */
if
(
!
FILE_strcasecmp
(
pOfs
->
szPathName
,
dllname
))
return
descr
;
/* check the dll module name (without extension) */
if
(
!
FILE_strncasecmp
(
dllname
,
name_table
+
1
,
*
name_table
)
&&
!
strcmp
(
dllname
+
*
name_table
,
".dll"
))
return
descr
;
}
return
NULL
;
}
/***********************************************************************
* BUILTIN_LoadModule
*
* Load a built-in module.
*/
HMODULE16
BUILTIN_LoadModule
(
LPCSTR
name
)
{
const
BUILTIN16_DESCRIPTOR
*
descr
;
char
dllname
[
20
],
*
p
;
void
*
handle
;
int
i
;
/* Fix the name in case we have a full path and extension */
...
...
@@ -123,25 +152,14 @@ HMODULE16 BUILTIN_LoadModule( LPCSTR name )
if
(
!
p
)
strcat
(
dllname
,
".dll"
);
for
(
p
=
dllname
;
*
p
;
p
++
)
*
p
=
FILE_tolower
(
*
p
);
for
(
i
=
0
;
i
<
nb_dlls
;
i
++
)
{
const
BUILTIN16_DESCRIPTOR
*
descr
=
builtin_dlls
[
i
];
NE_MODULE
*
pModule
=
(
NE_MODULE
*
)
descr
->
module_start
;
OFSTRUCT
*
pOfs
=
(
OFSTRUCT
*
)((
LPBYTE
)
pModule
+
pModule
->
fileinfo
);
if
(
!
FILE_strcasecmp
(
pOfs
->
szPathName
,
dllname
))
if
((
descr
=
find_dll_descr
(
dllname
)))
return
BUILTIN_DoLoadModule16
(
descr
);
}
if
((
handle
=
BUILTIN32_dlopen
(
dllname
)))
{
for
(
i
=
0
;
i
<
nb_dlls
;
i
++
)
{
const
BUILTIN16_DESCRIPTOR
*
descr
=
builtin_dlls
[
i
];
NE_MODULE
*
pModule
=
(
NE_MODULE
*
)
descr
->
module_start
;
OFSTRUCT
*
pOfs
=
(
OFSTRUCT
*
)((
LPBYTE
)
pModule
+
pModule
->
fileinfo
);
if
(
!
FILE_strcasecmp
(
pOfs
->
szPathName
,
dllname
))
if
((
descr
=
find_dll_descr
(
dllname
)))
return
BUILTIN_DoLoadModule16
(
descr
);
}
ERR
(
"loaded .so but dll %s still not found
\n
"
,
dllname
);
BUILTIN32_dlclose
(
handle
);
}
...
...
include/builtin16.h
View file @
04689b26
...
...
@@ -56,7 +56,6 @@ typedef struct
typedef
struct
{
const
char
*
name
;
/* DLL name */
void
*
module_start
;
/* 32-bit address of the module data */
int
module_size
;
/* Size of the module data */
void
*
code_start
;
/* 32-bit address of DLL code */
...
...
tools/winebuild/spec16.c
View file @
04689b26
...
...
@@ -776,7 +776,6 @@ void BuildSpec16File( FILE *outfile )
/* Output the DLL descriptor */
fprintf
(
outfile
,
"
\n
static const BUILTIN16_DESCRIPTOR descriptor =
\n
{
\n
"
);
fprintf
(
outfile
,
"
\"
%s
\"
,
\n
"
,
DLLName
);
fprintf
(
outfile
,
" Module,
\n
"
);
fprintf
(
outfile
,
" sizeof(Module),
\n
"
);
fprintf
(
outfile
,
" &Code_Segment,
\n
"
);
...
...
windows/user.c
View file @
04689b26
...
...
@@ -235,30 +235,6 @@ WORD WINAPI UserSignalProc( UINT uCode, DWORD dwThreadOrProcessID,
}
/***********************************************************************
* DllEntryPoint (USER.374)
*/
BOOL
WINAPI
USER_DllEntryPoint
(
DWORD
dwReason
,
HINSTANCE
hInstDLL
,
WORD
ds
,
WORD
wHeapSize
,
DWORD
dwReserved1
,
WORD
wReserved2
)
{
switch
(
dwReason
)
{
case
DLL_PROCESS_ATTACH
:
/*
* We need to load the 32-bit library so as to be able
* to access the system resources stored there!
*/
if
(
!
LoadLibraryA
(
"USER32.DLL"
)
)
{
ERR_
(
win
)(
"Could not load USER32.DLL
\n
"
);
return
FALSE
;
}
}
return
TRUE
;
}
/***********************************************************************
* ExitWindows (USER.7)
*/
BOOL16
WINAPI
ExitWindows16
(
DWORD
dwReturnCode
,
UINT16
wReserved
)
...
...
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