Rf. : [ntdev] RE: ntdev digest: November 18, --2001

Thanks a lot, Jake. That was exactly what I was locking for…

On 2K, at least.
Is this mechanism supported on ME too?


R=E9jean Caron - xxxxx@motus.com
Motus Technologies inc.

=

=20
“Jake Oshins” =

=20
Interest List" =
=20
oft.com> cc : =
=
=20
Envoy=E9 par : Objet : [ntdev]=
RE: ntdev digest: November 18, 2001 =
=20
xxxxx@lis =
=
=20
ts.osr.com =
=
=20
=
=
=20
=
=
=20
2001-11-19 02:53 =
=
=20
Veuillez r=E9pondre =E0 =
=
=20
“NT Developers =
=
=20
Interest List” =
=
=20
=
=
=20
=
=
=20

While I would always encourage you to make your driver completely
support WDM, it sounds like what you’re doing just involves noticing
that the system is leaving the working state and then later re-entering=

it. Dealing with this is actually pretty simple. Use the named
callback object \Callback\PowerState. Your supplied callback function
will be called whenever system-wide power attributes are changed. The
parameters will tell you what is happening. It’s a simple matter to
respond only to the action PO_CB_SYSTEM_STATE_LOCK, which is called on
both entry and exit from a system-wide low-power state. (This callback=

was originally intended to tell interested non-pageable drivers that a
system power transition was coming, so they could lock down any code
that was needed for the state transtition before IRPs started arriving
at DISPATCH_LEVEL from the power policy manager.)

See the DDK on Callback Objects for more detail. (Search for
PO_CB_SYSTEM_STATE_LOCK.)

Jake Oshins
Windows Core OS Team

-----Original Message-----
Subject: Driver Dynamic loading vs PnP managment
From: xxxxx@motus.com
Date: Sun, 18 Nov 2001 13:33:31 -0500
X-Message-Number: 8

Hi everyone,

We developped a driver, and start the driver on NT/2K using the Microso=
=3D
ft
sample instdrv (via the Service control manager).
Everything works fine (basically, the driver only respond to
DeviceIoControl…) but we are facing a problem with the Power managem=
=3D
ent.
Since Win2k supports hibernation, the driver needs to know when the sys=
=3D
tem
will hibernate, because it has to erase whatever it has in memory, befo=
=3D
re
the system writes the memory on the disk and hibernate. This is really=
=3D

important because these informations are session keys for an encryption=
=3D

system.

What I noticed is that the driver never receives IRP_MJ_POWER requests.=
=3D
Is
there something special to do to receive those IRPs? Is that because t=
=3D
he
driver is dynamically installed and started?
Has someone faced that kind of problem?

Thanks a lot,
R=3DE9jean

-------------------------------------------------------
R=3DE9jean Caron - xxxxx@motus.com
Motus Technologies inc.


You are currently subscribed to ntdev as: xxxxx@motus.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

=


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com