Differentiation between S3 Mode and S5 Mode with minlogon

  • Thread starter Thread starter EunHui Kim
  • Start date Start date
E

EunHui Kim

Hello!

Last Year, I tried to do something before entering S3 mode.
But when entering S5, I just leave the default XP shutdown.
So, I hope to defferentiate S3 and S5 mode.
In detail,
I hope that POWER_BROADCAST message with SUSPEND_APMQUERY is going S3 mode.
and POWER_BROADCAST message with SUSPEND_APMQUERY is going S5 mode.
But the Minlogon image with SP2 (or with SP1 ) make a message
POWER_BROADCAST with SUSPEND_APMQUERY always even though S5 mode.

I reported this problem MS last year, but no change.
Is there any altanative plan?

When I revewing google Newsgroup,
another people met another problem.
When they meet SUSPEND_APMQUERY message, they tried to SUSPEND_DENY, but OS
doesn't give a delay to do something.
XPE is embedded.
Power Option should be controlled freely by XPE user.
I think that it's one of the key issue for CE product.

Is there any plan about this issue?
 
Hi EunHui. Your message indicates that POWER_BROADCAST + SUSPEND APMQUERY
gets sent out in both S3 and S5 cases. Are you looking for a different
message in each case? Please clarify.

--
Matt Kellner ([email protected])
STE, Windows Embedded Group

This posting is provided "AS IS" with no warranties, and confers no rights.
===============================
 
Hello~ Matt~

My Answer is Yes.
(Sorry, I change below msg with red color word which maybe confuse you.)
In other words, when entering S5 mode, I don't expect SUSPEND_APMQUERY msg.
Because SUSPEND_APMQUERY msg is the signal that it's going hibernation (S3 mode).
Thanks!
 
EunHui Kim,

Did you try to change system power policies?

For instance, you can set/clear the UI allowed bit for Shutdown (S5) or Hibernate (S3) modes.

The following piece of code will show the idea on how to set the query for going to S5 mode:

SYSTEM_POWER_POLICY policy;
::CallNtPowerInformation(SystemPowerPolicyAc, NULL, 0, &policy, sizeof(policy);
policy.PowerButton.Action = PowerActionShutdown;
policy.PowerButton.Flags = POWER_ACTION_QUERY_ALLOWED | POWER_ACTION_UI_ALLOWED;
policy.PowerButton.EventCode = POWER_USER_NOTIFY_BUTTON;
::CallNtPowerInformation(SystemPowerPolicyAc, &policy, sizeof(policy), &policy, sizeof(policy));

(just make sure PowerProf.dll is in your image)

--
Regards,
KM, BSquare Corp.
Hello~ Matt~

My Answer is Yes.
(Sorry, I change below msg with red color word which maybe confuse you.)
In other words, when entering S5 mode, I don't expect SUSPEND_APMQUERY msg.
Because SUSPEND_APMQUERY msg is the signal that it's going hibernation (S3 mode).
Thanks!
 
Back
Top