Undocumented functions of NTDLL

2OO7, 29 April


Gridstore - NonStop Storage

NtRemoveIoCompletion
NtRemoveIoCompletion

NTSYSAPI 
NTSTATUS
NTAPI

NtRemoveIoCompletion(

IN HANDLE IoCompletionHandle, OUT PULONG CompletionKey, OUT PULONG CompletionValue, OUT PIO_STATUS_BLOCK IoStatusBlock, IN PLARGE_INTEGER Timeout OPTIONAL );




Function NtRemoveIoCompletion is one of waiting calls and it's finished when at least one completion record will be avaiable in specified Io Completion object. Records are added when I/O operation is finished, but previously File object have to been associated with Io Completion object.
Association between File and Io Completion objects is maded by call to NtSetInformationFile with FileCompletionInformation information class. Additionally every assotiation have to have unique Key defined. This functionality allows to use one Io Completion object with different File objects.
Every one File object can have only one Io Completion associated with it.
I/O operations won't be appended to Io Completion object except file operations will be called with non-zero value in ApcContext parameters.



  • IoCompletionHandle
  •     HANDLE to previously created or opened Io Completion object.
  • CompletionKey
  •     Receives completion Key informing about File object who finishes I/O.
  • CompletionValue
  •     Value of ApcContext file operation parameter. CompletionValue informs about operation finished.
  • IoStatusBlock
  •     Io status of finished operation.
  • Timeout
  •     Optionally pointer to time out value.


    Supported on system versions:
    NT 4.0,Win 2000,Win XP/2003



    Documented by:
    Tomasz Nowak



    Requirements:
    Library: ntdll.lib


    See also:
    FILE_COMPLETION_INFORMATION
    FILE_INFORMATION_CLASS
    NtCreateIoCompletion
    NtOpenIoCompletion
    NtReadFile
    NtSetInformationFile
    NtSetIoCompletion
    NtWriteFile