Hi all,
I know this has been discussed several times in the
list,
but Im still not able to get the hang of it.
Do ZwDisplayString/HalDisplayString work under W2K.
Or is there some other way to display the message on
the boot up screen and wait for some user input.
Inbv* functions??If yes then how do we use them?
regards
V.S.
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
> Do ZwDisplayString/HalDisplayString work under W2K.
Yes, if you will call InbvEnableDisplayString(TRUE) first. The function
switches the boot GUI to a mode where ZwDisplayString works (like AUTOCHK).
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
Yup Max,
I did that.
But Im not seeing anything.
I used the code which was posted in the archives
sometime back.
The author said that they were written by you only.
I did just as is specified in these lines.
Any suggestions where I could have gone wrong??
regards
V.S.
You need to get a pointer to the function required
to enable the display
string function (Max wrote these functions):
// Pointer to InbvEnableDisplayString function
typedef VOID (*INBV_ENABLE_DISPLAY_STRING)(BOOLEAN);
// Points to the real InbvEnableDisplayString
function for this OS
version
// NULL if no such function
static INBV_ENABLE_DISPLAY_STRING
InbvEnableDisplayStringProc;
DriverEntry(…)
{
…
RtlInitUnicodeString(&Str,
L"InbvEnableDisplayString");
InbvEnableDisplayStringProc =
MmGetSystemRoutineAddress(&Str);
…
}
// Acquires a boot-stage display for ZwDisplayString
VOID AcquireDisplay(VOID)
{
if( InbvEnableDisplayStringProc != NULL )
(InbvEnableDisplayStringProc)(TRUE);
// Do nothing
return;
}
// Release a boot-stage display for ZwDisplayString
VOID ReleaseDisplay(VOID)
{
if( InbvEnableDisplayStringProc != NULL )
(InbvEnableDisplayStringProc)(FALSE);
// Do nothing
return;
}
sample(PUNICODE_STRING MyString)
{
…
AcquireDisplay();
ZwDisplayString(MyString);
// Do as much display work as you like using
ZwDisplayString()
// and release the display when you are done.
ReleaseDisplay();
…
}
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com