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
33d91a86
Commit
33d91a86
authored
Oct 13, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winetest: Improve the native dll check to catch .NET dlls too.
parent
fc508934
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
main.c
programs/winetest/main.c
+18
-18
No files found.
programs/winetest/main.c
View file @
33d91a86
...
...
@@ -158,18 +158,20 @@ static int running_on_visible_desktop (void)
return
IsWindowVisible
(
desktop
);
}
/* check for
wine fake dll modul
e */
static
BOOL
is_
fak
e_dll
(
HMODULE
module
)
/* check for
native dll when running under win
e */
static
BOOL
is_
nativ
e_dll
(
HMODULE
module
)
{
static
const
char
fakedll_signature
[]
=
"Wine placeholder DLL"
;
const
IMAGE_DOS_HEADER
*
dos
;
if
(
!
running_under_wine
())
return
FALSE
;
if
(
!
((
ULONG_PTR
)
module
&
1
))
return
FALSE
;
/* not loaded as datafile */
/* builtin dlls can't be loaded as datafile, so we must have native or fake dll */
dos
=
(
const
IMAGE_DOS_HEADER
*
)((
const
char
*
)
module
-
1
);
if
(
dos
->
e_magic
!=
IMAGE_DOS_SIGNATURE
)
return
FALSE
;
if
(
dos
->
e_lfanew
>=
sizeof
(
*
dos
)
+
sizeof
(
fakedll_signature
)
&&
!
memcmp
(
dos
+
1
,
fakedll_signature
,
sizeof
(
fakedll_signature
)
))
return
TRU
E
;
return
FALS
E
;
!
memcmp
(
dos
+
1
,
fakedll_signature
,
sizeof
(
fakedll_signature
)
))
return
FALS
E
;
return
TRU
E
;
}
/* check if Gecko is present, trying to trigger the install if not */
...
...
@@ -656,24 +658,16 @@ extract_test_proc (HMODULE hModule, LPCTSTR lpszType,
if
(
!
dll
)
dll
=
load_com_dll
(
dllname
,
&
wine_tests
[
nr_of_files
].
maindllpath
,
filename
);
if
(
dll
&&
running_under_wine
()
&&
((
ULONG_PTR
)
dll
&
1
))
{
/* builtin dlls can't be loaded as datafile, so we must have native or fake dll */
if
(
!
is_fake_dll
(
dll
))
{
FreeLibrary
(
dll
);
xprintf
(
" %s=load error Configured as native
\n
"
,
dllname
);
return
TRUE
;
}
}
if
(
!
dll
&&
pLoadLibraryShim
)
{
MultiByteToWideChar
(
CP_ACP
,
0
,
dllname
,
-
1
,
dllnameW
,
MAX_PATH
);
if
(
FAILED
(
pLoadLibraryShim
(
dllnameW
,
NULL
,
NULL
,
&
dll
)
))
dll
=
0
;
else
if
(
SUCCEEDED
(
pLoadLibraryShim
(
dllnameW
,
NULL
,
NULL
,
&
dll
)
)
&&
dll
)
{
get_dll_path
(
dll
,
&
wine_tests
[
nr_of_files
].
maindllpath
,
filename
);
FreeLibrary
(
dll
);
dll
=
LoadLibraryExA
(
filename
,
NULL
,
LOAD_LIBRARY_AS_DATAFILE
);
}
else
dll
=
0
;
}
if
(
!
dll
)
...
...
@@ -681,6 +675,12 @@ extract_test_proc (HMODULE hModule, LPCTSTR lpszType,
xprintf
(
" %s=dll is missing
\n
"
,
dllname
);
return
TRUE
;
}
if
(
is_native_dll
(
dll
))
{
FreeLibrary
(
dll
);
xprintf
(
" %s=load error Configured as native
\n
"
,
dllname
);
return
TRUE
;
}
if
(
!
strcmp
(
dllname
,
"mshtml"
)
&&
running_under_wine
()
&&
!
gecko_check
())
{
FreeLibrary
(
dll
);
...
...
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