ZippyV, you were right, and also wrong. Calling HalDisplayString won't cause the computer to switch to a bluescreen and print the text, but it will print text after the initial bluescreen on a custom bluescreen. Here is some code that once compiled by the ddk and run as a driver will create a bluescreen and print text using 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;
}
All of these functions used here are undocumented and I had to figure them out myself (and look 2 of them up in the reactos source code) so be careful calling them. You can compile this code with the windows DDK and load the driver with any old driver loader. You can change the background and text color by changing the color function parameters(Green screen of death anyone?). I think that they use an IRBG(Intensity Red Green Blue) system. Also remember this is like a real bluescreen and the only way I know how to get rid of it is by restarting the computer, so be careful and have fun!