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
6315a7f3
Commit
6315a7f3
authored
May 22, 1999
by
Ulrich Weigand
Committed by
Alexandre Julliard
May 22, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix swapped FreeLibary return values. Handle FreeLibrary( 0 ) better.
Fix DLL_PROCESS_DETACH call sequence bugs resulting from nested FreeLibrary calls.
parent
1d586511
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
process.h
include/process.h
+2
-1
module.c
loader/module.c
+7
-4
No files found.
include/process.h
View file @
6315a7f3
...
...
@@ -57,7 +57,7 @@ typedef struct _PDB
WORD
module
;
/* 2a IMTE for the process module */
WORD
threads
;
/* 2c Number of threads */
WORD
running_threads
;
/* 2e Number of running threads */
WORD
unknown3
;
/* 30 Unknown
*/
WORD
free_lib_count
;
/* 30 Recursion depth of FreeLibrary calls
*/
WORD
ring0_threads
;
/* 32 Number of ring 0 threads */
HANDLE
system_heap
;
/* 34 System heap to allocate handles */
HTASK
task
;
/* 38 Win16 task */
...
...
@@ -96,6 +96,7 @@ typedef struct _PDB
}
PDB
;
/* Process flags */
#define PDB32_DEBUGGED 0x0001
/* Process is being debugged */
#define PDB32_WIN16_PROC 0x0008
/* Win16 process */
#define PDB32_DOS_PROC 0x0010
/* Dos process */
#define PDB32_CONSOLE_PROC 0x0020
/* Console process */
...
...
loader/module.c
View file @
6315a7f3
...
...
@@ -1529,17 +1529,19 @@ static void MODULE_FlushModrefs(void)
*/
BOOL
WINAPI
FreeLibrary
(
HINSTANCE
hLibModule
)
{
BOOL
retv
=
TRU
E
;
BOOL
retv
=
FALS
E
;
WINE_MODREF
*
wm
;
EnterCriticalSection
(
&
PROCESS_Current
()
->
crit_section
);
PROCESS_Current
()
->
free_lib_count
++
;
wm
=
MODULE32_LookupHMODULE
(
hLibModule
);
if
(
!
wm
)
if
(
!
wm
||
!
hLibModule
)
SetLastError
(
ERROR_INVALID_HANDLE
);
else
retv
=
MODULE_FreeLibrary
(
wm
);
PROCESS_Current
()
->
free_lib_count
--
;
LeaveCriticalSection
(
&
PROCESS_Current
()
->
crit_section
);
return
retv
;
...
...
@@ -1588,13 +1590,14 @@ BOOL MODULE_FreeLibrary( WINE_MODREF *wm )
MODULE_DecRefCount
(
wm
);
/* Call process detach notifications */
MODULE_DllProcessDetach
(
FALSE
,
NULL
);
if
(
PROCESS_Current
()
->
free_lib_count
<=
1
)
MODULE_DllProcessDetach
(
FALSE
,
NULL
);
MODULE_FlushModrefs
();
TRACE_
(
module
)(
"(%s) - END
\n
"
,
wm
->
modname
);
return
FALS
E
;
return
TRU
E
;
}
...
...
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