We saw this behavior on Vista in our IM driver, which is based off the
passthru NDIS 5.1 DDK sample. Even though we specifically call
NdisMSetAttributesEx with NDIS_ATTRIBUTE_NO_HALT_ON_SUSPEND, MiniportHalt
still gets called.
Installing the barebones passthru sample exhibits the same problem - MPHalt
is called on Sleep/Hibernate. The same happens to the passthru sample from
the latest WDK 6000.
Is this by design? Why is there NDIS_ATTRIBUTE_NO_HALT_ON_SUSPEND at all, if
Vista ignores it?
Well, the answer to your question seems to be plain obvious - NdisMSetAttributesEx() is an obsolete function, although it is still supported for NDIS 5.1 drivers that run under Vista. NDIS 6 drivers cannot use it - instead, they should use NdisMSetMiniportAttributes(), which has similar functionality, but does not take ‘flags’ parameters. Once NdisMSetAttributesEx() is not native for Vista, it has to get translated into NdisMSetMiniportAttributes() by NDIS, so that flags that you have specified in NdisMSetAttributesEx() call are just ignored…
Anton Bassov