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
5c5b997d
Commit
5c5b997d
authored
Mar 14, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Implemented ReadFileScatter and WriteFileGather.
parent
db1b9a9f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
2 deletions
+52
-2
file.c
dlls/kernel32/file.c
+48
-0
kernel32.spec
dlls/kernel32/kernel32.spec
+2
-2
winbase.h
include/winbase.h
+2
-0
No files found.
dlls/kernel32/file.c
View file @
5c5b997d
...
...
@@ -390,6 +390,30 @@ BOOL WINAPI ReadFileEx(HANDLE hFile, LPVOID buffer, DWORD bytesToRead,
/***********************************************************************
* ReadFileScatter (KERNEL32.@)
*/
BOOL
WINAPI
ReadFileScatter
(
HANDLE
file
,
FILE_SEGMENT_ELEMENT
*
segments
,
DWORD
count
,
LPDWORD
reserved
,
LPOVERLAPPED
overlapped
)
{
PIO_STATUS_BLOCK
io_status
;
LARGE_INTEGER
offset
;
NTSTATUS
status
;
TRACE
(
"(%p %p %u %p)
\n
"
,
file
,
segments
,
count
,
overlapped
);
offset
.
u
.
LowPart
=
overlapped
->
u
.
s
.
Offset
;
offset
.
u
.
HighPart
=
overlapped
->
u
.
s
.
OffsetHigh
;
io_status
=
(
PIO_STATUS_BLOCK
)
overlapped
;
io_status
->
u
.
Status
=
STATUS_PENDING
;
io_status
->
Information
=
0
;
status
=
NtReadFileScatter
(
file
,
NULL
,
NULL
,
NULL
,
io_status
,
segments
,
count
,
&
offset
,
NULL
);
if
(
status
)
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
!
status
;
}
/***********************************************************************
* ReadFile (KERNEL32.@)
*/
BOOL
WINAPI
ReadFile
(
HANDLE
hFile
,
LPVOID
buffer
,
DWORD
bytesToRead
,
...
...
@@ -478,6 +502,30 @@ BOOL WINAPI WriteFileEx(HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite,
/***********************************************************************
* WriteFileGather (KERNEL32.@)
*/
BOOL
WINAPI
WriteFileGather
(
HANDLE
file
,
FILE_SEGMENT_ELEMENT
*
segments
,
DWORD
count
,
LPDWORD
reserved
,
LPOVERLAPPED
overlapped
)
{
PIO_STATUS_BLOCK
io_status
;
LARGE_INTEGER
offset
;
NTSTATUS
status
;
TRACE
(
"%p %p %u %p
\n
"
,
file
,
segments
,
count
,
overlapped
);
offset
.
u
.
LowPart
=
overlapped
->
u
.
s
.
Offset
;
offset
.
u
.
HighPart
=
overlapped
->
u
.
s
.
OffsetHigh
;
io_status
=
(
PIO_STATUS_BLOCK
)
overlapped
;
io_status
->
u
.
Status
=
STATUS_PENDING
;
io_status
->
Information
=
0
;
status
=
NtWriteFileGather
(
file
,
NULL
,
NULL
,
NULL
,
io_status
,
segments
,
count
,
&
offset
,
NULL
);
if
(
status
)
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
!
status
;
}
/***********************************************************************
* WriteFile (KERNEL32.@)
*/
BOOL
WINAPI
WriteFile
(
HANDLE
hFile
,
LPCVOID
buffer
,
DWORD
bytesToWrite
,
...
...
dlls/kernel32/kernel32.spec
View file @
5c5b997d
...
...
@@ -880,7 +880,7 @@
@ stdcall ReadDirectoryChangesW(long ptr long long long ptr ptr ptr)
@ stdcall ReadFile(long ptr long ptr ptr)
@ stdcall ReadFileEx(long ptr long ptr ptr)
@ st
ub ReadFileScatter
@ st
dcall ReadFileScatter(long ptr long ptr ptr)
@ stdcall ReadProcessMemory(long ptr ptr long ptr)
@ stdcall RegisterApplicationRestart(wstr long)
@ stub RegisterConsoleIME
...
...
@@ -1143,7 +1143,7 @@
@ stdcall WriteConsoleW(long ptr long ptr ptr)
@ stdcall WriteFile(long ptr long ptr ptr)
@ stdcall WriteFileEx(long ptr long ptr ptr)
@ st
ub WriteFileGather
@ st
dcall WriteFileGather(long ptr long ptr ptr)
@ stdcall WritePrivateProfileSectionA(str str str)
@ stdcall WritePrivateProfileSectionW(wstr wstr wstr)
@ stdcall WritePrivateProfileStringA(str str str str)
...
...
include/winbase.h
View file @
5c5b997d
...
...
@@ -1936,6 +1936,7 @@ WINADVAPI BOOL WINAPI ReadEventLogW(HANDLE,DWORD,DWORD,LPVOID,DWORD,DWOR
WINBASEAPI
BOOL
WINAPI
ReadDirectoryChangesW
(
HANDLE
,
LPVOID
,
DWORD
,
BOOL
,
DWORD
,
LPDWORD
,
LPOVERLAPPED
,
LPOVERLAPPED_COMPLETION_ROUTINE
);
WINBASEAPI
BOOL
WINAPI
ReadFile
(
HANDLE
,
LPVOID
,
DWORD
,
LPDWORD
,
LPOVERLAPPED
);
WINBASEAPI
BOOL
WINAPI
ReadFileEx
(
HANDLE
,
LPVOID
,
DWORD
,
LPOVERLAPPED
,
LPOVERLAPPED_COMPLETION_ROUTINE
);
WINBASEAPI
BOOL
WINAPI
ReadFileScatter
(
HANDLE
,
FILE_SEGMENT_ELEMENT
*
,
DWORD
,
LPDWORD
,
LPOVERLAPPED
);
WINBASEAPI
BOOL
WINAPI
ReadProcessMemory
(
HANDLE
,
LPCVOID
,
LPVOID
,
SIZE_T
,
SIZE_T
*
);
WINADVAPI
HANDLE
WINAPI
RegisterEventSourceA
(
LPCSTR
,
LPCSTR
);
WINADVAPI
HANDLE
WINAPI
RegisterEventSourceW
(
LPCWSTR
,
LPCWSTR
);
...
...
@@ -2098,6 +2099,7 @@ WINBASEAPI BOOL WINAPI WaitNamedPipeW(LPCWSTR,DWORD);
WINBASEAPI
UINT
WINAPI
WinExec
(
LPCSTR
,
UINT
);
WINBASEAPI
BOOL
WINAPI
WriteFile
(
HANDLE
,
LPCVOID
,
DWORD
,
LPDWORD
,
LPOVERLAPPED
);
WINBASEAPI
BOOL
WINAPI
WriteFileEx
(
HANDLE
,
LPCVOID
,
DWORD
,
LPOVERLAPPED
,
LPOVERLAPPED_COMPLETION_ROUTINE
);
WINBASEAPI
BOOL
WINAPI
WriteFileGather
(
HANDLE
,
FILE_SEGMENT_ELEMENT
*
,
DWORD
,
LPDWORD
,
LPOVERLAPPED
);
WINBASEAPI
BOOL
WINAPI
WritePrivateProfileSectionA
(
LPCSTR
,
LPCSTR
,
LPCSTR
);
WINBASEAPI
BOOL
WINAPI
WritePrivateProfileSectionW
(
LPCWSTR
,
LPCWSTR
,
LPCWSTR
);
#define WritePrivateProfileSection WINELIB_NAME_AW(WritePrivateProfileSection)
...
...
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