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
e3dcfcaa
Commit
e3dcfcaa
authored
Apr 01, 1999
by
Ulrich Weigand
Committed by
Alexandre Julliard
Apr 01, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made Universal Thunk list per-process, not system global.
parent
6f57fe7b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
process.h
include/process.h
+2
-1
utthunk.c
relay32/utthunk.c
+11
-12
No files found.
include/process.h
View file @
e3dcfcaa
...
...
@@ -12,6 +12,7 @@
struct
_NE_MODULE
;
struct
_THREAD_ENTRY
;
struct
_UTINFO
;
/* Current Process pseudo-handle - Returned by GetCurrentProcess*/
#define CURRENT_PROCESS_PSEUDOHANDLE ((HANDLE)0x7fffffff)
...
...
@@ -85,7 +86,7 @@ typedef struct _PDB
WORD
env_selector
;
/* b4 Selector to process environment */
WORD
error_mode
;
/* b6 Error mode */
HANDLE
load_done_evt
;
/* b8 Event for process loading done */
DWORD
unknown7
;
/* bc Unknown
*/
struct
_UTINFO
*
UTState
;
/* bc Head of Univeral Thunk list
*/
DWORD
unknown8
;
/* c0 Unknown (NT) */
LCID
locale
;
/* c4 Locale to be queried by GetThreadLocale (NT) */
/* The following are Wine-specific fields */
...
...
relay32/utthunk.c
View file @
e3dcfcaa
...
...
@@ -9,6 +9,7 @@
#include "module.h"
#include "selectors.h"
#include "callback.h"
#include "process.h"
#include "debug.h"
#include "debugstr.h"
...
...
@@ -38,9 +39,9 @@ typedef struct
#pragma pack(4)
typedef
struct
tag
UTINFO
typedef
struct
_
UTINFO
{
struct
tagUTINFO
*
next
;
struct
_UTINFO
*
next
;
HMODULE
hModule
;
HMODULE16
hModule16
;
...
...
@@ -49,8 +50,6 @@ typedef struct tagUTINFO
}
UTINFO
;
static
UTINFO
*
utAnchor
;
BOOL
WINAPI
UTRegister
(
HMODULE
hModule
,
LPSTR
lpsz16BITDLL
,
LPSTR
lpszInitName
,
LPSTR
lpszProcName
,
FARPROC
*
ppfn32Thunk
,
FARPROC
pfnUT32CallBack
,
...
...
@@ -158,8 +157,8 @@ static UTINFO *UTAlloc( HMODULE hModule, HMODULE16 hModule16,
ut
->
ut32
.
jmp
=
0xe9
;
ut
->
ut32
.
utglue32
=
(
DWORD
)
UTGlue32
-
((
DWORD
)
&
ut
->
ut32
.
utglue32
+
sizeof
(
DWORD
));
ut
->
next
=
utAnchor
;
utAnchor
=
ut
;
ut
->
next
=
PROCESS_Current
()
->
UTState
;
PROCESS_Current
()
->
UTState
=
ut
;
return
ut
;
}
...
...
@@ -171,7 +170,7 @@ static void UTFree( UTINFO *ut )
{
UTINFO
**
ptr
;
for
(
ptr
=
&
utAnchor
;
*
ptr
;
ptr
=
&
(
*
ptr
)
->
next
)
for
(
ptr
=
&
PROCESS_Current
()
->
UTState
;
*
ptr
;
ptr
=
&
(
*
ptr
)
->
next
)
if
(
*
ptr
==
ut
)
{
*
ptr
=
ut
->
next
;
...
...
@@ -188,7 +187,7 @@ static UTINFO *UTFind( HMODULE hModule )
{
UTINFO
*
ut
;
for
(
ut
=
utAnchor
;
ut
;
ut
=
ut
->
next
)
for
(
ut
=
PROCESS_Current
()
->
UTState
;
ut
;
ut
=
ut
->
next
)
if
(
ut
->
hModule
==
hModule
)
break
;
...
...
@@ -216,12 +215,12 @@ BOOL WINAPI UTRegister( HMODULE hModule, LPSTR lpsz16BITDLL,
/* Allocate UTINFO struct */
HeapLock
(
SegptrHeap
);
/* FIXME: a bit overkill */
EnterCriticalSection
(
&
PROCESS_Current
()
->
crit_section
);
if
(
(
ut
=
UTFind
(
hModule
))
!=
NULL
)
ut
=
NULL
;
else
ut
=
UTAlloc
(
hModule
,
hModule16
,
target16
,
pfnUT32CallBack
);
HeapUnlock
(
SegptrHeap
);
LeaveCriticalSection
(
&
PROCESS_Current
()
->
crit_section
);
if
(
!
ut
)
{
...
...
@@ -261,14 +260,14 @@ VOID WINAPI UTUnRegister( HMODULE hModule )
UTINFO
*
ut
;
HMODULE16
hModule16
=
0
;
HeapLock
(
SegptrHeap
);
/* FIXME: a bit overkill */
EnterCriticalSection
(
&
PROCESS_Current
()
->
crit_section
);
ut
=
UTFind
(
hModule
);
if
(
!
ut
)
{
hModule16
=
ut
->
hModule16
;
UTFree
(
ut
);
}
HeapUnlock
(
SegptrHeap
);
LeaveCriticalSection
(
&
PROCESS_Current
()
->
crit_section
);
if
(
hModule16
)
FreeLibrary16
(
hModule16
);
...
...
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