Using HalDisplayString for Custom Blue Screen of Death

I read for some time somewhere on the Internet that you can make your own BSOD. I don’t remember where, but I know that he has something with a HalDisplayString call, which will switch to bluescreen and print the message. I tried calling HalDisplayString from a simple driver, but nothing happens. I was wondering if anyone could point me in the right direction. Here is the code for the driver.

#include "ntddk.h"
#include "wdm.h"
NTSYSAPI VOID NTAPI HalDisplayString( PCHAR String );
NTSYSAPI VOID NTAPI NtDisplayString( PCHAR String );
DRIVER_INITIALIZE DriverEntry;
NTSTATUS DriverEntry( 
    __in struct _DRIVER_OBJECT  *DriverObject,
    __in PUNICODE_STRING  RegistryPath 
    )
  {

   HalDisplayString("Hello world!");
return 0;  
}

Thanks in advance!

+5
source share
2 answers

You cannot show the BSOD with this function, it only displays text at boot time until the login screen appears. This link should provide you with some information.

+2

ZippyV, , . HalDisplayString bluescreen , bluescreen bluescreen. - , ddk , bluescreen HalDisplayString.

#include "ntddk.h"
#include "wdm.h"
VOID HalDisplayString(PSZ text); 
VOID InbvAcquireDisplayOwnership(VOID);
VOID InbvResetDisplay(VOID);
INT InbvSetTextColor(INT color); //IRBG
VOID InbvDisplayString(PSZ text);
VOID InbvSolidColorFill(ULONG left,ULONG top,ULONG width,ULONG height,ULONG color);
VOID InbvSetScrollRegion(ULONG left,ULONG top,ULONG width,ULONG height);
VOID InbvInstallDisplayStringFilter(ULONG b);
VOID InbvEnableDisplayString(ULONG b);
DRIVER_INITIALIZE DriverEntry;
NTSTATUS DriverEntry( 
    __in struct _DRIVER_OBJECT  *DriverObject,
    __in PUNICODE_STRING  RegistryPath 
    )
  {

InbvAcquireDisplayOwnership(); //Takes control of screen
InbvResetDisplay(); //Clears screen
InbvSolidColorFill(0,0,639,479,4); //Colors the screen blue
InbvSetTextColor(15); //Sets text color to white
InbvInstallDisplayStringFilter(0); //Not sure but nessecary
InbvEnableDisplayString(1); //Enables printing text to screen
InbvSetScrollRegion(0,0,639,475); //Not sure, would recommend keeping
InbvDisplayString("I print text!\n"); //Prints text
HalDisplayString("And so do I!!!"); //Prints text

return 0;  
}

, , , ( 2 ), , . Windows DDK . , ( -?). , IRBG (Intensity Red Green Blue). , bluescreen, , , - , !

+5

All Articles