Wednesday, October 13, 2004
Displaying a string on boot screen
Do you have a driver that does something neat that needs to display a message to the screen (maybe informing them that they should wait)? This method only works before the Login dialog box appears. Once the GUI is up and running you can no longer display to the boot screen.
Here are the prototypes
BOOLEAN InbvEnableDisplayString(IN BOOLEAN Enable);
VOID HalDisplayString(PSZ Buffer);
On Microsoft Windows 2000 and above, you need to request access to the screen otherwise your writing to it will never be shown to the user.
And then printing is easy…
HalDisplayString ("Hello there!\n");
A couple of notes
1. The first line always behaves funny when printing to. IOW the color shows up wrong, the background is black, so on. I just skip it and start everything on the second line.
2. Not all escape codes are supported. Specifically \b (backspace) is not supported
3. If any characters show up after \r then from it to the end of the line is erased, so you can not use it to try and just update a portion of the screen (such as progress bar). You have to redisplay the entire line.
4. I have never tried to call InbvEnableDisplayString(0); so I don’t know what happens.