Invoke Blue Screen of Death using Managed Code

后端 未结 11 2210
轮回少年
轮回少年 2020-12-30 01:25

Just curious here: is it possible to invoke a Windows Blue Screen of Death using .net managed code under Windows XP/Vista? And if it is possible, what could the example code

11条回答
  •  误落风尘
    2020-12-30 02:09

    As far as I know a real BSOD requires failure in kernel mode code. Vista still has BSOD's but they're less frequent because the new driver model has less drivers in kernel mode. Any user-mode failures will just result in your application being killed.

    You can't run managed code in kernel mode. So if you want to BSOD you need to use PInvoke. But even this is quite difficult. You need to do some really fancy PInvokes to get something in kernel mode to barf.

    But among the thousands of SO users there is probably someone who has done this :-)

提交回复
热议问题