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
d5711a81
Commit
d5711a81
authored
Oct 20, 2020
by
Esme Povirk
Committed by
Alexandre Julliard
Oct 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscoree: Implement GetTokenForVTableEntry.
Signed-off-by:
Esme Povirk
<
esme@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
21822554
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
1 deletion
+41
-1
corruntimehost.c
dlls/mscoree/corruntimehost.c
+40
-0
mscoree.spec
dlls/mscoree/mscoree.spec
+1
-1
No files found.
dlls/mscoree/corruntimehost.c
View file @
d5711a81
...
...
@@ -56,6 +56,16 @@ struct DomainEntry
static
HANDLE
dll_fixup_heap
;
/* using a separate heap so we can have execute permission */
static
CRITICAL_SECTION
fixup_list_cs
;
static
CRITICAL_SECTION_DEBUG
fixup_list_cs_debug
=
{
0
,
0
,
&
fixup_list_cs
,
{
&
fixup_list_cs_debug
.
ProcessLocksList
,
&
fixup_list_cs_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": fixup_list_cs"
)
}
};
static
CRITICAL_SECTION
fixup_list_cs
=
{
&
fixup_list_cs_debug
,
-
1
,
0
,
0
,
0
,
0
};
static
struct
list
dll_fixups
;
WCHAR
**
private_path
=
NULL
;
...
...
@@ -1222,6 +1232,34 @@ static const struct vtable_fixup_thunk thunk_template = {0};
#endif
DWORD
WINAPI
GetTokenForVTableEntry
(
HINSTANCE
hinst
,
BYTE
**
ppVTEntry
)
{
struct
dll_fixup
*
fixup
;
DWORD
result
=
0
;
DWORD
rva
;
int
i
;
TRACE
(
"%p,%p
\n
"
,
hinst
,
ppVTEntry
);
rva
=
(
BYTE
*
)
ppVTEntry
-
(
BYTE
*
)
hinst
;
EnterCriticalSection
(
&
fixup_list_cs
);
LIST_FOR_EACH_ENTRY
(
fixup
,
&
dll_fixups
,
struct
dll_fixup
,
entry
)
{
if
(
fixup
->
dll
!=
hinst
)
continue
;
if
(
rva
<
fixup
->
fixup
->
rva
||
(
rva
-
fixup
->
fixup
->
rva
>=
fixup
->
fixup
->
count
*
sizeof
(
ULONG_PTR
)))
continue
;
i
=
(
rva
-
fixup
->
fixup
->
rva
)
/
sizeof
(
ULONG_PTR
);
result
=
((
ULONG_PTR
*
)
fixup
->
tokens
)[
i
];
break
;
}
LeaveCriticalSection
(
&
fixup_list_cs
);
TRACE
(
"<-- %x
\n
"
,
result
);
return
result
;
}
static
void
CDECL
ReallyFixupVTable
(
struct
dll_fixup
*
fixup
)
{
HRESULT
hr
=
S_OK
;
...
...
@@ -1356,7 +1394,9 @@ static void FixupVTableEntry(HMODULE hmodule, VTableFixup *vtable_fixup)
return
;
}
EnterCriticalSection
(
&
fixup_list_cs
);
list_add_tail
(
&
dll_fixups
,
&
fixup
->
entry
);
LeaveCriticalSection
(
&
fixup_list_cs
);
}
static
void
FixupVTable_Assembly
(
HMODULE
hmodule
,
ASSEMBLY
*
assembly
)
...
...
dlls/mscoree/mscoree.spec
View file @
d5711a81
...
...
@@ -64,7 +64,7 @@
@ stub GetRequestedRuntimeVersionForCLSID
@ stub GetStartupFlags
@ stub GetTargetForVTableEntry
@ st
ub GetTokenForVTableEntry
@ st
dcall GetTokenForVTableEntry(ptr ptr)
@ stdcall GetVersionFromProcess(ptr ptr long ptr)
@ stub GetXMLElement
@ stub GetXMLElementAttribute
...
...
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