Web - Amazon

We provide Linux to the World


We support WINRAR [What is this] - [Download .exe file(s) for Windows]

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
SITEMAP
Audiobooks by Valerio Di Stefano: Single Download - Complete Download [TAR] [WIM] [ZIP] [RAR] - Alphabetical Download  [TAR] [WIM] [ZIP] [RAR] - Download Instructions

Make a donation: IBAN: IT36M0708677020000000008016 - BIC/SWIFT:  ICRAITRRU60 - VALERIO DI STEFANO or
Privacy Policy Cookie Policy Terms and Conditions
UMDF - Wikipedia

UMDF

维基百科,自由的百科全书

User-Mode Driver Framework(使用者模式驅動程式架構,簡稱UMDF),是美國微軟公司所提出視窗驅動程式基礎Windows Driver Foundation)的一部份,執行於使用者模式(user mode),僅能存取使用者位址空間,是核心模式驅動程式框架(Kernel-Mode Driver Framework,KMDF)的子集合(subset),因此UMDF所提供的函數支援少於KMDF,兩者使用相同的狀態機器、使用相同的 I/O 模型。

UMDF提供隨插即用(PNP)、電源管理(Power Manager)、非同步輸出輸入等功能,可設定 I/O 佇列,但他的限制在於不處理中斷 (Interrupt)、不執行 DMA(直接記憶體存取Direct Memory Access),且不能使用核心模式資源如:未分頁集區(NonPaged Pool),也不完全支援同步化領域(Synchronization scope),在技術上UMDF使用COM(Component Object Model)的動態連結程序庫(DLL)為基底技術。

目录

[编辑] COM架構

UMDF驅動程式是一個基於COM架構的動態連結檔(DLL),但UMDF並不使用COM的動態時期執行函式(runtime library),單僅是借用了COM的樣式。

UMDF 呼叫 DllGetClassObject API取得一個指標(pointer),這個指標指向一個IClassFactory的介面,並且啟用 CreateInstance 這個屬於IClassFactory 介面的函式來產生一個驅動程式的記憶體實體(instance)。DLL 照例提供一些函式可以讓COM 使用IWDFDriver-based的物件:

  • DllCanUnloadNow
  • DllGetClassObject
  • DllRegisterServer
  • DllUnregisterServer

[编辑] DllMain

UMDF 驅動程式是一個動態連結庫Dynamic Link Library),執行的時候如同一個行程內(in-process)的 COM server,其程式碼中包括了DllMain,這是著名的DLL檔的進入點(entry point)。

BOOL WINAPI DllMain(
       HINSTANCE ModuleHandle,
       DWORD Reason,
       PVOID /* Reserved */)
{
  if (DLL_PROCESS_ATTACH == Reason) {

    WPP_INIT_TRACING(MYDRIVER_TRACING_ID);

    g_ModuleHandle = ModuleHandle;
  }
  else if (DLL_PROCESS_DETACH == Reason) {

    WPP_CLEANUP();
  }

  return TRUE;
};

[编辑] UMDF介面

  • IWDFObject: 定義基本的 WDF 物件類型 (WDF object)
  • IWDFDriver: 代表驅動程式物件 (driver object)
  • IWDFDevice: 代表裝置物件(device object)
  • IWDFFile: 代表檔案物件 (file object)
  • IWDFIoQueue: 代表 I/O 要求的佇列 (IO Request Queue)
  • IWDFIoRequest: I/O 要求描述 (IO Request Description)
  • IWDFIoTarget: 代表 I/O 要求的目標驅動程式 (IO Target)
  • IWDFMemory: 提供存取記憶體區域 (Memory)

[编辑] 相關連結

Our "Network":

Project Gutenberg
https://gutenberg.classicistranieri.com

Encyclopaedia Britannica 1911
https://encyclopaediabritannica.classicistranieri.com

Librivox Audiobooks
https://librivox.classicistranieri.com

Linux Distributions
https://old.classicistranieri.com

Magnatune (MP3 Music)
https://magnatune.classicistranieri.com

Static Wikipedia (June 2008)
https://wikipedia.classicistranieri.com

Static Wikipedia (March 2008)
https://wikipedia2007.classicistranieri.com/mar2008/

Static Wikipedia (2007)
https://wikipedia2007.classicistranieri.com

Static Wikipedia (2006)
https://wikipedia2006.classicistranieri.com

Liber Liber
https://liberliber.classicistranieri.com

ZIM Files for Kiwix
https://zim.classicistranieri.com


Other Websites:

Bach - Goldberg Variations
https://www.goldbergvariations.org

Lazarillo de Tormes
https://www.lazarillodetormes.org

Madame Bovary
https://www.madamebovary.org

Il Fu Mattia Pascal
https://www.mattiapascal.it

The Voice in the Desert
https://www.thevoiceinthedesert.org

Confessione d'un amore fascista
https://www.amorefascista.it

Malinverno
https://www.malinverno.org

Debito formativo
https://www.debitoformativo.it

Adina Spire
https://www.adinaspire.com