Posts

Showing posts with the label kernel

Using Overlapped I / O in DeviceIoControl

Image
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  ....

What is a driver?

driver The driver is ... So long ago, I needed something to buy and use a new device on my computer.  In the box of the new device you purchased, the manual and warranty card are enclosed, and a floppy disk or CD-ROM is included.  You could use the device by inserting a floppy disk or CD into the computer and installing something.  This is a device driver program.  Device drivers make certain devices available to your computer. When you hear the word driver, the first thing that comes to mind is not a program.  A screwdriver that turns like a screw comes to mind first.  It is a computer term that is not translated into Korean.  It confuses us from here.  It is a word that reads a book and goes to MDSN to learn the concept, but does not reach the heart.  However, fortunately, the friends in the north translated it in Korean and used it as "device driver" or "device driver program".  Their interpretation is probably kneeling!  It...