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"
19 RosSymZwReadFile(PVOID FileContext
, PVOID Buffer
, ULONG Size
)
22 IO_STATUS_BLOCK IoStatusBlock
;
24 Status
= ZwReadFile(*((HANDLE
*) FileContext
),
31 return NT_SUCCESS(Status
) && IoStatusBlock
.Information
== Size
;
35 RosSymZwSeekFile(PVOID FileContext
, ULONG_PTR Position
)
38 IO_STATUS_BLOCK IoStatusBlock
;
39 FILE_POSITION_INFORMATION NewPosition
;
41 NewPosition
.CurrentByteOffset
.u
.HighPart
= 0;
42 NewPosition
.CurrentByteOffset
.u
.LowPart
= Position
;
43 Status
= ZwSetInformationFile(*((HANDLE
*) FileContext
),
46 sizeof(FILE_POSITION_INFORMATION
),
47 FilePositionInformation
);
49 return NT_SUCCESS(Status
);