Using Overlapped I / O in DeviceIoControl
Using Overlapped I / O in DeviceIoControl Various methods can be used, such as synchronizing with events and continuously receiving events through polling, to monitor the frequent events in the kernel driver one by one in user mode . Scenario in question Imagine that you continue to receive events with relatively simple polling. The kernel driver queues the event that occurred, and the user mode application issues the IOCTL to retrieve the contents of the queue. In this type of logic, the user-mode application will While execute the same loop as DeviceIoControl and will continue to communicate with the driver by calling. while ( true ) { BOOL ret = DeviceIoControl(hDevice, IOCTL_RECV, &data, sizeof (DATA), 0 , 0 ,&dwReturn, NULL ); if (ret) { // 처리.. } } DeviceIoControl Blocking 발생 In the previously used logic, DeviceIoControl blocking occurs until an event occurs in the kernel driver ....