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
84ae4b93
Commit
84ae4b93
authored
Jan 23, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Always set bytes written in WriteFile.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c47c74e5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
file.c
dlls/kernel32/file.c
+2
-2
pipe.c
dlls/kernel32/tests/pipe.c
+1
-1
No files found.
dlls/kernel32/file.c
View file @
84ae4b93
...
@@ -577,8 +577,8 @@ BOOL WINAPI WriteFile( HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite,
...
@@ -577,8 +577,8 @@ BOOL WINAPI WriteFile( HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite,
status
=
piosb
->
u
.
Status
;
status
=
piosb
->
u
.
Status
;
}
}
if
(
status
!=
STATUS_PENDING
&&
bytesWritten
)
if
(
bytesWritten
)
*
bytesWritten
=
piosb
->
Information
;
*
bytesWritten
=
overlapped
&&
status
?
0
:
piosb
->
Information
;
if
(
status
&&
status
!=
STATUS_TIMEOUT
)
if
(
status
&&
status
!=
STATUS_TIMEOUT
)
{
{
...
...
dlls/kernel32/tests/pipe.c
View file @
84ae4b93
...
@@ -2767,7 +2767,7 @@ static void _overlapped_write_async(unsigned line, HANDLE writer, void *buf, DWO
...
@@ -2767,7 +2767,7 @@ static void _overlapped_write_async(unsigned line, HANDLE writer, void *buf, DWO
overlapped
->
hEvent
=
CreateEventW
(
NULL
,
TRUE
,
FALSE
,
NULL
);
overlapped
->
hEvent
=
CreateEventW
(
NULL
,
TRUE
,
FALSE
,
NULL
);
res
=
WriteFile
(
writer
,
buf
,
size
,
&
written_bytes
,
overlapped
);
res
=
WriteFile
(
writer
,
buf
,
size
,
&
written_bytes
,
overlapped
);
ok_
(
__FILE__
,
line
)(
!
res
&&
GetLastError
()
==
ERROR_IO_PENDING
,
"WriteFile returned %x(%u)
\n
"
,
res
,
GetLastError
());
ok_
(
__FILE__
,
line
)(
!
res
&&
GetLastError
()
==
ERROR_IO_PENDING
,
"WriteFile returned %x(%u)
\n
"
,
res
,
GetLastError
());
todo_wine
ok_
(
__FILE__
,
line
)(
!
written_bytes
,
"written_bytes = %u
\n
"
,
written_bytes
);
ok_
(
__FILE__
,
line
)(
!
written_bytes
,
"written_bytes = %u
\n
"
,
written_bytes
);
_test_not_signaled
(
line
,
overlapped
->
hEvent
);
_test_not_signaled
(
line
,
overlapped
->
hEvent
);
}
}
...
...
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