How to communicate with the driver by sending IOCTL codes?
Communicating with the device drivers from the user-mode apps in Windows can be done by either sending standard I/O requests: Read, Write, or by sending dedicated I/O control codes (IOCTLs).
Sending standard I/O requests are required when writing standard filesystem drivers. Custom I/O Control Codes can be used when communicating with non-standard (custom) drivers.