Question regarding InitSafeBootMode usage

OK… here’s some Microsoft-inspired confusion.

In their KB article here:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;837643

Microsoft tells how to determine if the system is booting in safe mode
from your driver.

Hector from OSR also mentions the same thing in a memo here:
http://www.osronline.com/article.cfm?id=300

BUT in their latest hardware newsletter, Microsoft posted a link to a
page listing illegal kernel driver imports:
http://www.microsoft.com/whdc/driver/kernel/km-fns.mspx

Lo and behold… InitSafeBootMode is declared as being illegal, and
supposedly WHQL won’t sign the driver if it imports it.

In the doc that lists the illegal imports, the alternative to importing
this symbol is stated as “For information about the correct interfaces
to use, see the DDK documentation.”

Maybe I’m missing something, but this doesn’t appear to be in the DDK?

Can someone (from Microsoft or anywhere else) share some info on the
correct and WHQL-able way to determine if your driver is loaded in safe
mode?

Thanks,
sean

The same paper lists the following prohibited functions but doesn’t
tell the right way to get the same functionality:

KeQueryActiveProcessors
ZwFreeVirtualMemory (but ZwAllocateVirtualMemory is not listed!)

The latest WinHEC 3790.1173 DDK doesn’t mention the replacements either.
KeQueryActiveProcessors is not marked deprecated.

Dmitriy Budko, VMware

-----Original Message-----
From: Sean Bullington [mailto:xxxxx@stg.com]
Sent: Thursday, July 15, 2004 2:16 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Question regarding InitSafeBootMode usage

OK… here’s some Microsoft-inspired confusion.
[deleted]

BUT in their latest hardware newsletter, Microsoft posted a link to a
page listing illegal kernel driver imports:
http://www.microsoft.com/whdc/driver/kernel/km-fns.mspx

Lo and behold… InitSafeBootMode is declared as being illegal, and
supposedly WHQL won’t sign the driver if it imports it.

In the doc that lists the illegal imports, the alternative to
importing
this symbol is stated as “For information about the correct
interfaces
to use, see the DDK documentation.”

Maybe I’m missing something, but this doesn’t appear to be in the DDK?