Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
36105750
Commit
36105750
authored
11 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
setupapi: Don't set the DLL flag when creating a fake dll that ends in .exe.
parent
b9271be3
No related branches found
Branches containing commit
Tags
wine-1.1.37
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/setupapi/fakedll.c
+8
-3
8 additions, 3 deletions
dlls/setupapi/fakedll.c
with
8 additions
and
3 deletions
dlls/setupapi/fakedll.c
+
8
−
3
View file @
36105750
...
...
@@ -245,11 +245,13 @@ done:
}
/* build a complete fake dll from scratch */
static
BOOL
build_fake_dll
(
HANDLE
file
)
static
BOOL
build_fake_dll
(
HANDLE
file
,
const
WCHAR
*
name
)
{
static
const
WCHAR
dotexeW
[]
=
{
'.'
,
'e'
,
'x'
,
'e'
,
0
};
IMAGE_DOS_HEADER
*
dos
;
IMAGE_NT_HEADERS
*
nt
;
struct
dll_info
info
;
const
WCHAR
*
ext
;
BYTE
*
buffer
;
BOOL
ret
=
FALSE
;
DWORD
lfanew
=
(
sizeof
(
*
dos
)
+
sizeof
(
fakedll_signature
)
+
15
)
&
~
15
;
...
...
@@ -279,7 +281,7 @@ static BOOL build_fake_dll( HANDLE file )
nt
->
FileHeader
.
Machine
=
IMAGE_FILE_MACHINE_I386
;
#endif
nt
->
FileHeader
.
TimeDateStamp
=
0
;
nt
->
FileHeader
.
Characteristics
=
IMAGE_FILE_DLL
;
nt
->
FileHeader
.
Characteristics
=
0
;
nt
->
OptionalHeader
.
MajorLinkerVersion
=
1
;
nt
->
OptionalHeader
.
MinorLinkerVersion
=
0
;
nt
->
OptionalHeader
.
MajorOperatingSystemVersion
=
1
;
...
...
@@ -312,6 +314,9 @@ static BOOL build_fake_dll( HANDLE file )
nt
->
OptionalHeader
.
AddressOfEntryPoint
=
info
.
mem_pos
;
nt
->
OptionalHeader
.
BaseOfCode
=
info
.
mem_pos
;
ext
=
strrchrW
(
name
,
'.'
);
if
(
!
ext
||
strcmpiW
(
ext
,
dotexeW
))
nt
->
FileHeader
.
Characteristics
|=
IMAGE_FILE_DLL
;
if
(
nt
->
FileHeader
.
Characteristics
&
IMAGE_FILE_DLL
)
{
size
=
sizeof
(
dll_code_section
);
...
...
@@ -963,7 +968,7 @@ BOOL create_fake_dll( const WCHAR *name, const WCHAR *source )
else
{
WARN
(
"fake dll %s not found for %s
\n
"
,
debugstr_w
(
source
),
debugstr_w
(
name
)
);
ret
=
build_fake_dll
(
h
);
ret
=
build_fake_dll
(
h
,
name
);
}
CloseHandle
(
h
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment