none
Is Service running in connected standby? RRS feed

  • Question

  • I have a number of services (session 0) and need to know if they a running while in Connected Standby.

    How can I determine this?


    Michael Tissington

    Tuesday, August 21, 2012 10:38 PM

All replies

  • Hello,

    "Software (including apps and operating system software) must be well-behaved during connected standby. The DAM was created to suppress non-Metro style app execution in a manner similar to the Sleep state (S3 on ACPI devices). It does this by suspending or throttling non-Metro style software processes across the system upon connected standby entry. This enables systems that support connected standby to deliver minimized resource usage and long, consistent battery life while enabling Metro style apps to deliver the connected experiences they promise."

    In other words your services will be throttled down or suppressed similar to S3 states.

    Desktop Activity Moderator

    http://msdn.microsoft.com/en-us/library/windows/desktop/hh848040(v=vs.85).aspx

    I hope this helps,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Wednesday, August 22, 2012 12:59 AM
  • I am well read on DAM and also on Connected Standby and I fully understand that my services will be throttled down.

    My question still remains, how do I determin when my service is in Connected Standby or Throttled down?

    In this condition I would like to be able to abort the task that the service is currently doing or in the case that it needs network access, not even attempt to run the service.

    Thanks,

    Michael


    Michael Tissington

    Wednesday, August 22, 2012 2:30 AM
  • Michael,

    Maybe I don't understand your question but... As per the doc:

    • If your app has a window (HWND) and you want to handle these notifications through your window procedure, call RegisterSuspendResumeNotification to register for these messages (or UnregisterSuspendResumeNotification to unregister). You can use DEVICE_NOTIFY_WINDOW_HANDLE in the Flags parameter, and pass your window’s HWND in as the Recipient parameter. The message received is the WM_POWERBROADCAST message.
    • If your app does not have a window (HWND) or you want a direct callback, call PowerRegisterSuspendResumeNotification to register for these messages (or PowerUnregisterSuspendResumeNotification to unregister). You must use DEVICE_NOTIFY_CALLBACK in the Flags parameter and pass a value of type PDEVICE_NOTIFY_SUBSCRIBE_PARAMETERS in the Recipient parameter.
    • If your app cannot be recompiled, you can opt in to receive these WM_POWERBROADCAST messages via the AppCompat toolkit(using the PromoteDAM shim).

    Desktop Activity Moderator

    http://msdn.microsoft.com/en-us/library/windows/desktop/hh848040(v=vs.85).aspx

    -James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Wednesday, August 22, 2012 11:31 PM
  • That's great however ... to quote microsoft ..

    ----------

    When DAM suspension is engaged or disengaged, DAM triggers delivery of a WM_POWERBROADCAST message to those processes subject to suspension that have opted-in to message delivery (via API call or compatibility shim, described later). After a few seconds delay, DAM suspends the process.

    There are no notifications when DAM throttling is engaged or disengaged. Processes should not need modification; processes continue to function, albeit at a slower rate.

    ------------

    Our desktop apps (session 1+) do indeed get the WM_POWERBROADCAST message, however our services (session 0) which are subject to throttling do NOT get the message. PowerRegisterSuspendResumeNotification also fails in session 0.

    Any ideas please?


    Michael Tissington

    Thursday, August 23, 2012 12:04 AM
  • Any ideas about this please?

    Michael Tissington

    Wednesday, August 29, 2012 9:11 PM
  • Hello Michael,

    Sorry for the late response. I honestly can't say with any certainty as your question is a bit out of my field of expertise. Because of this I have moved your post to the Power Management development forum. Hopefully someone on this forum can help you.

    -James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Wednesday, August 29, 2012 9:51 PM
  • Does any one from Microsoft have any idea about this please?


    Michael Tissington

    Wednesday, September 5, 2012 6:38 PM
  • Hello Michael,

    I'm checking with a different team. Unfortunately there is no guarantee they will get back to me. Unfortunately I found out that this forum is not actively monitored by the Power Management team.

    If you feel that this question is critical to your application please contact Microsoft developer services and open a service request. Your request will be assigned to an appropriate engineer and they will try to help you answer this question.

    Technical Support

    http://msdn.microsoft.com/subscriptions/bb266240.aspx

    Thanks,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Friday, September 14, 2012 8:52 PM