I am trying to access Windows 8 application history (like new task manager do). Does anyone know how to do this? I almost sure that from WinRT application I cannot access this data, but form Win32 (winapi) I should can (because task manager do this).
Asked
Active
Viewed 502 times
2
-
1@HansPassant Isn't that a bit pedantic? He's clearly asking how to do it rather than if someone knows how. Could be asked better, but still completely understandable. – N_A Nov 30 '12 at 19:55
1 Answers
0
Some similar topics have been discussed here and here. Unfortunately, the running process information is deliberately hidden from WinRT apps in that much of the System.Diagnostics functionality has been stripped out, including the Process class. If you want the process information, you'll need to write a Win32 app. System.Diagnostics.Process is a good place to start.
-
I cannot find anything in System.Diagnostic.Process which gives me information about how long current process/app is active for user. I only can get information about how long it is running, but it is not same. – Piotr Stapp Dec 01 '12 at 13:49
-
If it's CPU time you're interested in, there are a couple of different ways: Performance counters (inexact but simple) and WMI calls (more of a performance hit). Take a look at this discussion: http://stackoverflow.com/questions/278071/how-to-get-the-cpu-usage-in-c – SWalters Dec 03 '12 at 15:28