If I write a KMDF filter driver for laptop battery , will all PWA APPs that retrieve battery information be affected

Marcus H 0 Reputation points
2023-02-20T07:27:50.32+00:00

Background:

our PWA APP (JS APP) registers power change event . But for our testers , we have to manually discharge & recharge the battery to test those features , it's wasting our time.

Assumption:

If we could write a KMDF driver for battery , when there is a change (percentage of power) is feedback , our driver returns back fake data to the APP , our test could be much faster . For example , when OS reports 98% percentage of power remaining, our KMDF driver returns 18% to the APP.

Question:

Is my assumption available ?

Universal Windows Platform (UWP)
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,054 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Roy Li - MSFT 34,101 Reputation points Microsoft External Staff
    2023-03-02T06:41:24.9566667+00:00

    Hello,

    Welcome to Microsoft Q&A!

    I've talked with the team about this. The power change event that UWP handles is raised by the system. But we are not sure if driver could change the system battery information and raise such a power change event. We think this might be impossible but It's better to test this directly. So you could just give a try about this.

    Thank you.

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.