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
ed8a17fb
Commit
ed8a17fb
authored
Mar 25, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed LoadLibraryEx32W16 to use OpenFile16 to look for the file
instead of DIR_SearchPath.
parent
09d2d477
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
18 deletions
+17
-18
wowthunk.c
dlls/kernel/wowthunk.c
+17
-18
No files found.
dlls/kernel/wowthunk.c
View file @
ed8a17fb
...
@@ -32,7 +32,6 @@
...
@@ -32,7 +32,6 @@
#include "excpt.h"
#include "excpt.h"
#include "winreg.h"
#include "winreg.h"
#include "winternl.h"
#include "winternl.h"
#include "file.h"
#include "miscemu.h"
#include "miscemu.h"
#include "module.h"
#include "module.h"
#include "stackframe.h"
#include "stackframe.h"
...
@@ -756,11 +755,9 @@ DWORD WINAPI GetVDMPointer32W16( SEGPTR vp, UINT16 fMode )
...
@@ -756,11 +755,9 @@ DWORD WINAPI GetVDMPointer32W16( SEGPTR vp, UINT16 fMode )
DWORD
WINAPI
LoadLibraryEx32W16
(
LPCSTR
lpszLibFile
,
DWORD
hFile
,
DWORD
dwFlags
)
DWORD
WINAPI
LoadLibraryEx32W16
(
LPCSTR
lpszLibFile
,
DWORD
hFile
,
DWORD
dwFlags
)
{
{
HMODULE
hModule
;
HMODULE
hModule
;
DOS_FULL_NAME
full_name
;
DWORD
mutex_count
;
DWORD
mutex_count
;
UNICODE_STRING
libfileW
;
OFSTRUCT
ofs
;
LPCWSTR
filenameW
;
const
char
*
p
;
static
const
WCHAR
dllW
[]
=
{
'.'
,
'D'
,
'L'
,
'L'
,
0
};
if
(
!
lpszLibFile
)
if
(
!
lpszLibFile
)
{
{
...
@@ -768,25 +765,27 @@ DWORD WINAPI LoadLibraryEx32W16( LPCSTR lpszLibFile, DWORD hFile, DWORD dwFlags
...
@@ -768,25 +765,27 @@ DWORD WINAPI LoadLibraryEx32W16( LPCSTR lpszLibFile, DWORD hFile, DWORD dwFlags
return
0
;
return
0
;
}
}
if
(
!
RtlCreateUnicodeStringFromAsciiz
(
&
libfileW
,
lpszLibFile
))
{
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
return
0
;
}
/* if the file can not be found, call LoadLibraryExA anyway, since it might be
/* if the file can not be found, call LoadLibraryExA anyway, since it might be
a buil
d
in module. This case is handled in MODULE_LoadLibraryExA */
a buil
t
in module. This case is handled in MODULE_LoadLibraryExA */
filenameW
=
libfileW
.
Buffer
;
if
((
p
=
strrchr
(
lpszLibFile
,
'.'
))
&&
!
strchr
(
p
,
'\\'
))
/* got an extension */
if
(
DIR_SearchPath
(
NULL
,
filenameW
,
dllW
,
&
full_name
,
FALSE
)
)
{
filenameW
=
full_name
.
short_name
;
if
(
OpenFile16
(
lpszLibFile
,
&
ofs
,
OF_EXIST
)
!=
HFILE_ERROR16
)
lpszLibFile
=
ofs
.
szPathName
;
}
else
{
char
buffer
[
MAX_PATH
+
4
];
strcpy
(
buffer
,
lpszLibFile
);
strcat
(
buffer
,
".dll"
);
if
(
OpenFile16
(
buffer
,
&
ofs
,
OF_EXIST
)
!=
HFILE_ERROR16
)
lpszLibFile
=
ofs
.
szPathName
;
}
ReleaseThunkLock
(
&
mutex_count
);
ReleaseThunkLock
(
&
mutex_count
);
hModule
=
LoadLibraryEx
W
(
filenameW
,
(
HANDLE
)
hFile
,
dwFlags
);
hModule
=
LoadLibraryEx
A
(
lpszLibFile
,
(
HANDLE
)
hFile
,
dwFlags
);
RestoreThunkLock
(
mutex_count
);
RestoreThunkLock
(
mutex_count
);
RtlFreeUnicodeString
(
&
libfileW
);
return
(
DWORD
)
hModule
;
return
(
DWORD
)
hModule
;
}
}
...
...
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