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
8885a4a2
Commit
8885a4a2
authored
Nov 10, 2014
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Dec 03, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winetest: Skip over stub dll if detected.
parent
0ab2311c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
main.c
programs/winetest/main.c
+40
-0
No files found.
programs/winetest/main.c
View file @
8885a4a2
...
@@ -308,6 +308,35 @@ static BOOL is_native_dll( HMODULE module )
...
@@ -308,6 +308,35 @@ static BOOL is_native_dll( HMODULE module )
return
TRUE
;
return
TRUE
;
}
}
/*
* Windows 8 has a concept of stub DLLs. When DLLMain is called the user is prompted
* to install that component. To bypass this check we need to look at the version resource.
*/
static
BOOL
is_stub_dll
(
const
char
*
filename
)
{
DWORD
size
,
ver
;
BOOL
isstub
=
FALSE
;
char
*
p
,
*
data
;
size
=
GetFileVersionInfoSizeA
(
filename
,
&
ver
);
if
(
!
size
)
return
FALSE
;
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
data
)
return
FALSE
;
if
(
GetFileVersionInfoA
(
filename
,
ver
,
size
,
data
))
{
char
buf
[
256
];
sprintf
(
buf
,
"
\\
StringFileInfo
\\
%04x%04x
\\
OriginalFilename"
,
MAKELANGID
(
LANG_ENGLISH
,
SUBLANG_ENGLISH_US
),
1200
);
if
(
VerQueryValueA
(
data
,
buf
,
(
void
**
)
&
p
,
&
size
))
isstub
=
!
lstrcmpiA
(
"wcodstub.dll"
,
p
);
}
HeapFree
(
GetProcessHeap
(),
0
,
data
);
return
isstub
;
}
static
void
print_version
(
void
)
static
void
print_version
(
void
)
{
{
#ifdef __i386__
#ifdef __i386__
...
@@ -911,6 +940,17 @@ extract_test_proc (HMODULE hModule, LPCSTR lpszType, LPSTR lpszName, LONG_PTR lP
...
@@ -911,6 +940,17 @@ extract_test_proc (HMODULE hModule, LPCSTR lpszType, LPSTR lpszName, LONG_PTR lP
}
}
return
TRUE
;
return
TRUE
;
}
}
if
(
is_stub_dll
(
dllname
))
{
FreeLibrary
(
dll
);
xprintf
(
" %s=dll is a stub
\n
"
,
dllname
);
if
(
actctx
!=
INVALID_HANDLE_VALUE
)
{
pDeactivateActCtx
(
0
,
cookie
);
pReleaseActCtx
(
actctx
);
}
return
TRUE
;
}
if
(
is_native_dll
(
dll
))
if
(
is_native_dll
(
dll
))
{
{
FreeLibrary
(
dll
);
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