How to display a pop-up message box from a driver (kernel mode)?

前端 未结 2 1838
慢半拍i
慢半拍i 2021-02-06 13:49

I\'m writing a driver which needs to immediately pop up a dialog to notify the user of an event.
(Kind of similar to NTFS\'s \"Corrupt file\" notification, except t

2条回答
  •  我寻月下人不归
    2021-02-06 14:26

    A kernel driver can not display a MessageBox. If you would like to do that then you have to provide a communication functionality through a user-land application with the kernel driver then show that MessageBox from your user-land application.

    All the talk about [Zw/Nt]RaiseHardError is irrelevant. If you disassembled MessageBox you will notice that this API gets called eventually.

提交回复
热议问题