Undocumented functions of NTDLL

2OO1, 11 February



NtDeviceIoControlFile
NtDeviceIoControlFile

NTSYSAPI 
NTSTATUS
NTAPI

NtDeviceIoControlFile(

IN HANDLE FileHandle, IN HANDLE Event OPTIONAL, IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, IN PVOID ApcContext OPTIONAL, OUT PIO_STATUS_BLOCK IoStatusBlock, IN ULONG IoControlCode, IN PVOID InputBuffer OPTIONAL, IN ULONG InputBufferLength, OUT PVOID OutputBuffer OPTIONAL, IN ULONG OutputBufferLength );




Function NtDeviceIoControlFile sends IOCTL_* control code to Device Driver. It is primary (but not the best) solution to communicate between application and Device Driver.



  • FileHandle
  •     HANDLE to Device Object opened as a file.
  • Event
  •     Optional HANDLE to Event Object signalled on the end of processing request.
  • ApcRoutine
  •     Optional pointer to user's APC Routine called on the end of processing request.
  • ApcContext
  •     User's parameter to ApcRoutine.
  • IoStatusBlock
  •     IO result of call.
  • IoControlCode
  •     IO Control code [IOCTL_*].
  • InputBuffer
  •     User's allocated buffer with input data.
  • InputBufferLength
  •     Length of InputBuffer, in bytes.
  • OutputBuffer
  •     User's allocated buffer for result data.
  • OutputBufferLength
  •     Length of OutputBuffer, in bytes.



    See also NtFsControlFile.


    Documented by:
    Tomasz Nowak
    Reactos



    Requirements:
    Library: ntdll.lib


    See also:
    NtCreateFile
    NtFsControlFile
    NtOpenFile