Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenzwfile.c
Go to the documentation of this file.
00001 /* 00002 * COPYRIGHT: See COPYING in the top level directory 00003 * PROJECT: ReactOS kernel 00004 * FILE: lib/rossym/zwfile.c 00005 * PURPOSE: File I/O using native functions 00006 * 00007 * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) 00008 */ 00009 00010 #include <precomp.h> 00011 00012 NTSTATUS RosSymStatus; 00013 00014 BOOLEAN 00015 RosSymZwReadFile(PVOID FileContext, PVOID Buffer, ULONG Size) 00016 { 00017 //NTSTATUS Status; 00018 IO_STATUS_BLOCK IoStatusBlock; 00019 00020 RosSymStatus = ZwReadFile(*((HANDLE *) FileContext), 00021 0, 0, 0, 00022 &IoStatusBlock, 00023 Buffer, 00024 Size, 00025 0, 0); 00026 00027 return NT_SUCCESS(RosSymStatus) && IoStatusBlock.Information == Size; 00028 } 00029 00030 BOOLEAN 00031 RosSymZwSeekFile(PVOID FileContext, ULONG_PTR Position) 00032 { 00033 //NTSTATUS Status; 00034 IO_STATUS_BLOCK IoStatusBlock; 00035 FILE_POSITION_INFORMATION NewPosition; 00036 00037 NewPosition.CurrentByteOffset.u.HighPart = 0; 00038 NewPosition.CurrentByteOffset.u.LowPart = Position; 00039 RosSymStatus = ZwSetInformationFile(*((HANDLE *) FileContext), 00040 &IoStatusBlock, 00041 (PVOID) &NewPosition, 00042 sizeof(FILE_POSITION_INFORMATION), 00043 FilePositionInformation); 00044 00045 return NT_SUCCESS(RosSymStatus); 00046 } 00047 00048 /* EOF */ Generated on Sat May 26 2012 04:35:19 for ReactOS by
1.7.6.1
|