windows WDF驅動程式設計

來源:互聯網
上載者:User

 

WDF model  這就是WDF模型,這個驅動模型,在windows WDM驅動設計中,已經講到了WDM模型和WDF模型的區別,從這個模型就可以看出: 對於應用程式來說,下面採用WDM驅動還是WDF驅動模型,是透明的,同樣,對於kernel Subsystems來說,對於WDM和WDF驅動,都是一樣的。 在看下Framework,對於WDF驅動架構來說,架構套件括Object Model,I/O Model ,Pnp/Power Model,Object Model的作用是建立WDF對象,I/O Model 就是輸入輸出,對於WDM和WDF來說,處理IO是不同的,對於wdm,是由IO管理器負責派遣IRP,但是對於WDF來說,是由IRP和IO隊列分發的。對於Pnp電源管理來說,架構模型基本上為我們做完了; 接著看Framework Objects,它是由Object Model建立的;而Callbacks就是我們做驅動程式必須編寫的回呼函數: 比如讀函數,寫函數,及特殊的pnp,電源管理等函數。  WDF  對象•About Methods, Properties, and Events •1) Methods Perform actions on the object. •2) Properties: 3) Events: Are messages that indicate that something has occurred for which a driver might be required to take action.  3.WDM和WDF驅動 
WDFDRIVER Driver object
WDFDEVICE Device object
WDFQUEUE Cancel-safe queue/Dispatching /Serialization/Auto-locking/Synch with PnP
WDFREQUEST IRP
WDFINTERRUPT Interrupt
WDFDPC DPC
WDFWORKITEM Work item
WDFDMAENABLER DMA adapter object
WDFIOTARGET Sending I/O to another driver - IoCallDriver
WDFWAITLOCK Event dispatcher object – passive level lock
WDFSPINLOCK Spinlock
WDFMEMORY Kernel pool - refcounted
WDFKEY Registry access
   4)Why to Port a Driver •Here are a few advantages of porting a driver to KMDF. •1)KMDF Drivers Are Simpler and Easier to Maintain. •2)KMDF Manages Most Interactions with the Operating System. •3)KMDF Supports Versioning and Is Tested for Each Release of the Operating System.  
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.