kernel32: Implemented ReadFileScatter and WriteFileGather.
This commit is contained in:
parent
db1b9a9f62
commit
5c5b997dc2
|
@ -389,6 +389,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.@)
|
||||
*/
|
||||
|
@ -477,6 +501,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.@)
|
||||
*/
|
||||
|
|
|
@ -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)
|
||||
@ stub ReadFileScatter
|
||||
@ stdcall 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)
|
||||
@ stub WriteFileGather
|
||||
@ stdcall WriteFileGather(long ptr long ptr ptr)
|
||||
@ stdcall WritePrivateProfileSectionA(str str str)
|
||||
@ stdcall WritePrivateProfileSectionW(wstr wstr wstr)
|
||||
@ stdcall WritePrivateProfileStringA(str str str str)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue