Windows Driver Development-Fundamentals 2

Source: Internet
Author: User

noun: IRP; PDO; FiDO1; FDO;

The Windows kernel design itself is not interacting with the device. The device driver detects the connected device, which provides a client-side feature interface that communicates indirectly with the Windows kernel. Windows provides an abstract device support interface to call the driver model. The driver developer's job is to provide a specific requirement to implement the device that the interface already supports.



。 Equipment stack (device stack)

Each time the device is driven, a device stack is generated.

I/O Request

(1) Write a request

Win Api:writefile

(2) Read request

Win Api:readfile

(3) device I/O control

Win Api:deviceiocontrol


IRP:I/O Request Packet

typedef struct _IRP {  .  .  PMDL  mdladdress;  ULONG  Flags;  Union {    struct _irp  *masterirp;    PVOID  systembuffer;  } AssociatedIrp,  ...  .  Io_status_block  IoStatus;  Kprocessor_mode  Requestormode;  BOOLEAN pendingreturned;  .  BOOLEAN  Cancel;  KIRQL  cancelirql;  Pdriver_cancel  Cancelroutine;  PVOID UserBuffer;  Union {    struct {    .    .    Union {      Kdevice_queue_entry devicequeueentry;      struct {        PVOID  drivercontext[4];      };    };    .    .    Pethread  Thread;    .    List_entry  listentry;    .    .    } Overlay,  ...  } Tail;} IRP, *PIRP;    


IRP structure See "IRP"



Fido:filter Device Object (Upper)

Fdo:functional Device Object

Fido:filter Device Object (Lower)

Pdo:physical Device Object



Reference documents:

1. Programming the Microsoft Windows Driver Model (2nd)

1Chapter 2-basic Structure of a WDM Driver >> how the System Finds and Loads Drivers


Windows Driver Development-Fundamentals 2

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.