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
c5868eed
Commit
c5868eed
authored
Aug 07, 2016
by
André Hentschel
Committed by
Alexandre Julliard
Aug 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Use SetFilePointer instead of GetFileSize with WriteFile.
Signed-off-by:
André Hentschel
<
nerv@dawncrow.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e685bed6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
14 deletions
+4
-14
loader.c
dlls/kernel32/tests/loader.c
+4
-14
No files found.
dlls/kernel32/tests/loader.c
View file @
c5868eed
...
@@ -2744,12 +2744,7 @@ static void test_ResolveDelayLoadedAPI(void)
...
@@ -2744,12 +2744,7 @@ static void test_ResolveDelayLoadedAPI(void)
ok
(
ret
,
"WriteFile error %d
\n
"
,
GetLastError
());
ok
(
ret
,
"WriteFile error %d
\n
"
,
GetLastError
());
/* fill up to delay data */
/* fill up to delay data */
file_size
=
GetFileSize
(
hfile
,
NULL
);
SetFilePointer
(
hfile
,
nt_header
.
OptionalHeader
.
DataDirectory
[
IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT
].
VirtualAddress
,
NULL
,
SEEK_SET
);
SetLastError
(
0xdeadbeef
);
ret
=
WriteFile
(
hfile
,
filler
,
nt_header
.
OptionalHeader
.
DataDirectory
[
IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT
].
VirtualAddress
-
file_size
,
&
dummy
,
NULL
);
ok
(
ret
,
"WriteFile error %d
\n
"
,
GetLastError
());
/* delay data */
/* delay data */
idd
.
Attributes
.
AllAttributes
=
1
;
idd
.
Attributes
.
AllAttributes
=
1
;
...
@@ -2770,10 +2765,7 @@ static void test_ResolveDelayLoadedAPI(void)
...
@@ -2770,10 +2765,7 @@ static void test_ResolveDelayLoadedAPI(void)
ok
(
ret
,
"WriteFile error %d
\n
"
,
GetLastError
());
ok
(
ret
,
"WriteFile error %d
\n
"
,
GetLastError
());
/* fill up to extended delay data */
/* fill up to extended delay data */
file_size
=
GetFileSize
(
hfile
,
NULL
);
SetFilePointer
(
hfile
,
idd
.
DllNameRVA
,
NULL
,
SEEK_SET
);
SetLastError
(
0xdeadbeef
);
ret
=
WriteFile
(
hfile
,
filler
,
idd
.
DllNameRVA
-
file_size
,
&
dummy
,
NULL
);
ok
(
ret
,
"WriteFile error %d
\n
"
,
GetLastError
());
/* extended delay data */
/* extended delay data */
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
...
@@ -2810,10 +2802,8 @@ static void test_ResolveDelayLoadedAPI(void)
...
@@ -2810,10 +2802,8 @@ static void test_ResolveDelayLoadedAPI(void)
ok
(
ret
,
"WriteFile error %d
\n
"
,
GetLastError
());
ok
(
ret
,
"WriteFile error %d
\n
"
,
GetLastError
());
/* fill up to eof */
/* fill up to eof */
file_size
=
GetFileSize
(
hfile
,
NULL
);
SetFilePointer
(
hfile
,
section
.
VirtualAddress
+
section
.
Misc
.
VirtualSize
,
NULL
,
SEEK_SET
);
SetLastError
(
0xdeadbeef
);
SetEndOfFile
(
hfile
);
ret
=
WriteFile
(
hfile
,
filler
,
section
.
VirtualAddress
+
section
.
Misc
.
VirtualSize
-
file_size
,
&
dummy
,
NULL
);
ok
(
ret
,
"WriteFile error %d
\n
"
,
GetLastError
());
CloseHandle
(
hfile
);
CloseHandle
(
hfile
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
...
...
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