Undocumented functions of NTDLL

2OO1, 15 January



NtReadFile
NtReadFile

NTSYSAPI 
NTSTATUS
NTAPI

NtReadFile(

IN HANDLE FileHandle, IN HANDLE Event OPTIONAL, IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, IN PVOID ApcContext OPTIONAL, OUT PIO_STATUS_BLOCK IoStatusBlock, OUT PVOID Buffer, IN ULONG Length, IN PLARGE_INTEGER ByteOffset OPTIONAL, IN PULONG Key OPTIONAL );




(Also descripted in Win2000 DDK)
  • FileHandle
  •     HANDLE to File Object opened with FILE_READ_DATA access.
  • Event
  •     Optional HANDLE to Event Object signaled when reading is done.
  • ApcRoutine
  •     User defined APC routine queued for execute after reading is done.
  • ApcContext
  •     User parameter to ApcRoutine.
  • IoStatusBlock
  •     Pointer to IO_STATUS structure received IO status of file reading.
  • Buffer
  •     User-allocated buffer for readed data.
  • Length
  •     Length of Buffer, in bytes.
  • ByteOffset
  •     Offset from begining of file, in bytes.
  • Key
  •     - ??? (In my opinion: use this, if you previously lock file, and now you want read it, but without unlocking).


    Documented by:
    Tomasz Nowak



    Requirements:
    Library: ntdll.lib


    See also:
    NtCreateFile
    NtOpenFile
    NtWriteFile