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
ad72e71f
Commit
ad72e71f
authored
Dec 29, 2000
by
Mike McCormack
Committed by
Alexandre Julliard
Dec 29, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented GetOverlappedResult.
parent
46384145
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
9 deletions
+48
-9
file.c
files/file.c
+48
-9
No files found.
files/file.c
View file @
ad72e71f
...
...
@@ -1100,16 +1100,55 @@ HFILE WINAPI _lclose( HFILE hFile )
/***********************************************************************
* GetOverlappedResult (KERNEL32.360)
*
* Check the result of an Asynchronous data transfer from a file.
*
* RETURNS
* TRUE on success
* FALSE on failure
*
* If successful (and relevant) lpTransfered will hold the number of
* bytes transfered during the async operation.
*
* BUGS
*
* Currently only works for WaitCommEvent, ReadFile, WriteFile
* with communications ports.
*
*/
BOOL
WINAPI
GetOverlappedResult
(
HANDLE
hFile
,
LPOVERLAPPED
lpOverlapped
,
LPDWORD
lpNumberOfBytesTransferred
,
BOOL
bWait
)
{
/* Since all i/o is currently synchronous,
* return true, assuming ReadFile/WriteFile
* have completed the operation */
FIXME
(
"NO Asynch I/O, assuming Read/Write succeeded
\n
"
);
return
TRUE
;
BOOL
WINAPI
GetOverlappedResult
(
HANDLE
hFile
,
/* [I] handle of file to check on */
LPOVERLAPPED
lpOverlapped
,
/* [I/O] pointer to overlapped */
LPDWORD
lpTransferred
,
/* [I/O] number of bytes transfered */
BOOL
bWait
/* [I] wait for the transfer to complete ? */
)
{
DWORD
r
;
TRACE
(
"(%d %p %p %x)
\n
"
,
hFile
,
lpOverlapped
,
lpTransferred
,
bWait
);
if
(
lpOverlapped
==
NULL
)
{
ERR
(
"lpOverlapped was null
\n
"
);
return
FALSE
;
}
if
(
!
lpOverlapped
->
hEvent
)
{
ERR
(
"lpOverlapped->hEvent was null
\n
"
);
return
FALSE
;
}
do
{
TRACE
(
"waiting on %p
\n
"
,
lpOverlapped
);
r
=
WaitForSingleObjectEx
(
lpOverlapped
->
hEvent
,
bWait
?
INFINITE
:
0
,
TRUE
);
TRACE
(
"wait on %p returned %ld
\n
"
,
lpOverlapped
,
r
);
}
while
(
r
==
STATUS_USER_APC
);
if
(
lpTransferred
)
*
lpTransferred
=
lpOverlapped
->
Offset
;
SetLastError
(
lpOverlapped
->
Internal
);
return
(
r
==
WAIT_OBJECT_0
);
}
/***********************************************************************
...
...
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