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
8db14f4e
Commit
8db14f4e
authored
Sep 25, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Make export directory writable to set FT_Thunk to 0.
But don't bother on non-i386 platforms. Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
98d7f90d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
kernel_main.c
dlls/kernel32/kernel_main.c
+8
-2
No files found.
dlls/kernel32/kernel_main.c
View file @
8db14f4e
...
...
@@ -44,6 +44,7 @@ static STARTUPINFOA startup_infoA;
/***********************************************************************
* set_entry_point
*/
#ifdef __i386__
static
void
set_entry_point
(
HMODULE
module
,
const
char
*
name
,
DWORD
rva
)
{
IMAGE_EXPORT_DIRECTORY
*
exports
;
...
...
@@ -64,9 +65,12 @@ static void set_entry_point( HMODULE module, const char *name, DWORD rva )
if
(
!
(
res
=
strcmp
(
ename
,
name
)))
{
WORD
ordinal
=
ordinals
[
pos
];
assert
(
ordinal
<
exports
->
NumberOfFunctions
);
DWORD
oldprot
;
TRACE
(
"setting %s at %p to %08x
\n
"
,
name
,
&
functions
[
ordinal
],
rva
);
VirtualProtect
(
functions
+
ordinal
,
sizeof
(
*
functions
),
PAGE_READWRITE
,
&
oldprot
);
functions
[
ordinal
]
=
rva
;
VirtualProtect
(
functions
+
ordinal
,
sizeof
(
*
functions
),
oldprot
,
NULL
);
return
;
}
if
(
res
>
0
)
max
=
pos
-
1
;
...
...
@@ -74,6 +78,7 @@ static void set_entry_point( HMODULE module, const char *name, DWORD rva )
}
}
}
#endif
/***********************************************************************
...
...
@@ -134,6 +139,7 @@ static BOOL process_attach( HMODULE module )
copy_startup_info
();
#ifdef __i386__
if
(
!
(
GetVersion
()
&
0x80000000
))
{
/* Securom checks for this one when version is NT */
...
...
@@ -146,7 +152,7 @@ static BOOL process_attach( HMODULE module )
if
(
LdrFindEntryForAddress
(
GetModuleHandleW
(
0
),
&
ldr
)
||
!
(
ldr
->
Flags
&
LDR_WINE_INTERNAL
))
LoadLibraryA
(
"krnl386.exe16"
);
}
#endif
return
TRUE
;
}
...
...
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