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
36105750
Commit
36105750
authored
May 20, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Don't set the DLL flag when creating a fake dll that ends in .exe.
parent
b9271be3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
fakedll.c
dlls/setupapi/fakedll.c
+8
-3
No files found.
dlls/setupapi/fakedll.c
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
);
...
...
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