none
How can I get a processes that plays a video, sound or downloads something? RRS feed

  • Question

  • How can I get a processes that plays a video, sound or downloads something?

    As example, program "powercfg" can get "powercfg /requests" list of active processes.

    Thursday, August 22, 2019 1:51 AM

All replies

  • Hi semiromid, 

    Thank you for posting here.

    >> program "powercfg" can get "powercfg /requests" list of active processes

    You use ‘powercfg/requests’ command-line to enumerates application and driver Power Requests in the example.

    >> How can I get a processes that plays a video, sound or downloads something?

    If you want to find a specific command-line to get process that play a video, sound or download something, unfortunately there are no such command-lines.

    Besides, I have found a reference.

    How do you list all processes on the command line in Windows?

    Hope it can help you.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Thursday, August 22, 2019 7:30 AM
    Moderator
  • Hi Xingyu Zhao, 

    Thank you for answer.


    How can I get all this data using API?



    Best Regards,

    semiromid
    Thursday, August 22, 2019 7:44 AM
  • Hi semiromid, 

    Thanks for your feedback.

    >> How can I get all this data using API?

    Do you mean that you want to use an API to get a process? Please provide more details about what type of data you want to get.

    We can get all processes , but we cannot get the process classified.

    Beside, you can use ‘Process.GetProcessesByName(name)’ to get a specific process In C#.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, August 23, 2019 8:16 AM
    Moderator
  • Hi semiromid, 

    Thanks for your feedback.

    >> How can I get all this data using API?

    Do you mean that you want to use an API to get a process? Please provide more details about what type of data you want to get.

    We can get all processes , but we cannot get the process classified.

    Beside, you can use ‘Process.GetProcessesByName(name)’ to get a specific process In C#.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Hi Xingyu Zhao, 

    Thank you for answer.

    I need to detected the state of a computer when it is in an inactive state (inactivity, inaction, standby).

    Idle states are not sleep states

    Inactive state (Idle):
    When the user does not move the mouse;
    When does not press a key on the keyboard;
    When the video does not play, the game does not start, etc.

     Detecting the Idle State

    Can i do use it?:

    https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/ne-wdm-power_information_level

    GetPowerRequestList Indicates that the power request list should be queued.

    Best Regards,

    semiromid


    • Edited by semiromid Friday, August 30, 2019 5:49 AM
    Friday, August 30, 2019 5:48 AM
  • Hi semiromid,

    I note that the reference you provided is related to C++, so I have a question to confirm with you.

    Do you want to use 'GetPowerRequestList' in C++ or in C#?

    We are waiting for your update.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, September 3, 2019 5:43 AM
    Moderator
  • Hi Xingyu Zhao, 

    Priority is use c #, if this is possibly, but can use c++.


    Best Regards,

    semiromid

    Tuesday, September 3, 2019 8:51 AM
  • Hi semiromid,

    Thanks for your feedback.

    I hope the following reference can help you.

    PowerManagementNativeMethods.cs

    Besides, you can also ask your question in C++ forums for help.

    Thank you for your understanding and support.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, September 3, 2019 9:34 AM
    Moderator