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
208955ca
Commit
208955ca
authored
Sep 10, 2000
by
Eric Pouech
Committed by
Alexandre Julliard
Sep 10, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed loader - broken search for already loaded modules.
parent
26501596
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
module.c
loader/module.c
+24
-2
No files found.
loader/module.c
View file @
208955ca
...
...
@@ -1293,13 +1293,35 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HFILE hfile, DWORD flags )
/* if the filename doesn't have an extension append .DLL */
if
(
!
(
p
=
strrchr
(
filename
,
'.'
))
||
strchr
(
p
,
'/'
)
||
strchr
(
p
,
'\\'
))
strcat
(
filename
,
".DLL"
);
strcat
(
filename
,
".DLL"
);
}
EnterCriticalSection
(
&
PROCESS_Current
()
->
crit_section
);
/* Check for already loaded module */
if
((
pwm
=
MODULE_FindModule
(
filename
)))
if
(
!
(
pwm
=
MODULE_FindModule
(
filename
))
&&
/* no path in libpath */
!
strchr
(
libname
,
'\\'
)
&&
!
strchr
(
libname
,
':'
)
&&
!
strchr
(
libname
,
'/'
))
{
LPSTR
fn
=
HeapAlloc
(
GetProcessHeap
(),
0
,
MAX_PATH
+
1
);
if
(
fn
)
{
/* since the default loading mechanism uses a more detailed algorithm
* than SearchPath (like using PATH, which can even be modified between
* two attempts of loading the same DLL), the look-up above (with
* SearchPath) can have put the file in system directory, whereas it
* has already been loaded but with a different path. So do a specific
* look-up with filename (without any path)
*/
strcpy
(
fn
,
libname
);
/* if the filename doesn't have an extension append .DLL */
if
(
!
strrchr
(
fn
,
'.'
))
strcat
(
fn
,
".dll"
);
if
((
pwm
=
MODULE_FindModule
(
fn
))
!=
NULL
)
strcpy
(
filename
,
fn
);
HeapFree
(
GetProcessHeap
(),
0
,
fn
);
}
}
if
(
pwm
)
{
if
(
!
(
pwm
->
flags
&
WINE_MODREF_MARKER
))
pwm
->
refCount
++
;
...
...
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