title: How IOCTL works?
body: <p>I want to know how IOCTL works.
  I know the basics:</p>
  
  <p>DeviceIoControl() -> kernel32.dll -> ntdll.dll -> the moment it gets from user mode to kernel mode -> I/O Manager -> IRP</p>
  
  <p>Question is how IOCTL gets form user mode to the kernel mode? Is it interrupt gate, call gate, or something else?</p>
  
  <p>If you know any article/book that explains details of IOCTL (more than Windows Internals) please post a link.</p>