Search code examples
c#win-universal-appwindows-10system.diagnostics

Need to retrieve System disk & memory usage data within Universal Windows 10 Platform App


I am working on an app that has a "feedback" capability, and in that capability I would like to capture the system's disk and memory usage for the user to voluntarily submit along with their feedback. An example of what I am looking to display is:

Memory Usage: 682.56/2048 MB (33.33% free)
Disk Usage: 4.90/11.75 GB (41% free)

I have read through the MSDN's documentation on System.Diagnostics, and cannot find any information relevant to UWP 10. Does anyone have any suggestions?


Solution

  • your only option AFAIK, is to use native calls/Pinvoke

    see here for examples and calls http://www.pinvoke.net/

    and here Hello World for Pinvoke and Native Calls

    the only problem is that your are not allowed to use these if your going to submit your app to the store (need to side load it)