驅動程式 - Windows Driver Model (WDM) - ProbeForRead()、ProbeForWrite()



ProbeForRead()

The ProbeForRead routine checks that a user-mode buffer actually resides in the user portion of the address space, and is correctly aligned.

ProbeForWrite()

The ProbeForWrite routine checks that a user-mode buffer actually resides in the user-mode portion of the address space, is writable, and is correctly aligned.

Windows XP系統下的ProbeForRead()

答案很明顯,ProbeForRead()是用來判斷Memory是否位於User或者Kernel位址,並非用來測試Memory是否可以被讀取

Windows 7系統下的ProbeForRead()

基本上,還是一樣用來偵測Memory是否位於Kernel Mode位址

反觀ProbeForWrite(),它是用來偵測該Memory是否可以被寫入