Hello everyone!
I'm really new about drivers and working on maintenance NDIS
Intermediate driver.
The driver has a problem that it prevents the system to get suspended
on windows xp.
This driver was written few years ago by someone.
The driver seems to be written from passthru released on 1992.(very
old.)
And I have to build it with Windows 2003 Server DDK.
And the driver supports NDIS4.0.
(I noticed that the passthru of WS2003DDK have been modified here and
there from the old passthru.
And I'm wondering these changes could be necessary for my legacy
driver to handle power-management correctly on windows xp.)
I found that my driver gets IRP_MJ_POWER with IRP_MN_SET_POWER when
the system is about suspending.
(The WS2003DDK's passthru does not get those IRPs.It only gets
OID_PNP_SET_POWER on the miniport-edge. why?)
I also found that someone blocks forever during the IRP_MJ_POWER
handling process.
I found this by installing my DispatchPower handler as following.
pDefaultDispPower = DispatchTable[IRP_MJ_POWER];
DispatchTable[IRP_MJ_POWER] = MyDispatchPower;
MyDispatchPower()
{
KdPrint(("MyDispatchPower"));
Status=pDefaultDispPower(...);
KdPrintf(("pDefaultDispPower result=0x%08x", Status));
}
The pDefaultDispPower() never return when it gets IRP_MJ_POWER with
IRP_MN_SET_POWER.
Could you tell me why does it block?
Thanks!