2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: lib/rossym/zwfile.c
5 * PURPOSE: File I/O using native functions
7 * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com)
12 #include <reactos/rossym.h>
13 #include "rossympriv.h"
16 RosSymZwReadFile(PVOID FileContext
, PVOID Buffer
, ULONG Size
)
19 IO_STATUS_BLOCK IoStatusBlock
;
21 Status
= ZwReadFile(*((HANDLE
*) FileContext
),
28 return NT_SUCCESS(Status
) && IoStatusBlock
.Information
== Size
;
32 RosSymZwSeekFile(PVOID FileContext
, ULONG_PTR Position
)
35 IO_STATUS_BLOCK IoStatusBlock
;
36 FILE_POSITION_INFORMATION NewPosition
;
38 NewPosition
.CurrentByteOffset
.u
.HighPart
= 0;
39 NewPosition
.CurrentByteOffset
.u
.LowPart
= Position
;
40 Status
= ZwSetInformationFile(*((HANDLE
*) FileContext
),
43 sizeof(FILE_POSITION_INFORMATION
),
44 FilePositionInformation
);
46 return NT_SUCCESS(Status
);