ReactOS 0.4.15-dev-8241-g63935f8
zwfile.c
Go to the documentation of this file.
1/*
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
6 *
7 * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com)
8 */
9
10#include <wdm.h>
11#include <reactos/rossym.h>
12#include "rossympriv.h"
13
16{
19
20 Status = ZwReadFile(*((HANDLE *) FileContext),
21 NULL, NULL, NULL,
23 Buffer,
24 Size,
25 NULL, NULL);
26
28}
29
32{
35 FILE_POSITION_INFORMATION NewPosition;
36
37 NewPosition.CurrentByteOffset.u.HighPart = 0;
38 NewPosition.CurrentByteOffset.u.LowPart = Position;
39 Status = ZwSetInformationFile(*((HANDLE *) FileContext),
41 (PVOID) &NewPosition,
44
45 return NT_SUCCESS(Status);
46}
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
_In_ PFCB _In_ PCD_NAME _In_ BOOLEAN _Inout_ PFILE_ENUM_CONTEXT FileContext
Definition: cdprocs.h:442
Definition: bufpool.h:45
#define NULL
Definition: types.h:112
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
@ FilePositionInformation
Definition: from_kernel.h:75
Status
Definition: gdiplustypes.h:25
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
BOOLEAN RosSymZwReadFile(PVOID FileContext, PVOID Buffer, ULONG Size)
Definition: zwfile.c:15
BOOLEAN RosSymZwSeekFile(PVOID FileContext, ULONG_PTR Position)
Definition: zwfile.c:31
LARGE_INTEGER CurrentByteOffset
Definition: nt_native.h:955
static COORD Position
Definition: mouse.c:34
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
struct _LARGE_INTEGER::@2306 u
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533