Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing other processes in Win8 Metro-style app

I am trying to build a Windows 8 "metro-style" app that will operate as a "app killer". For those of you who have used Win8 (Tech Preview) you'll notice that once you open a metro-style app you cannot close it (without going into Task Manager and ending the process).

My challenge is that I cannot access 'System.Diagnostics.Process' from my metro-style app, nor do I know if there is an comparable alternative within the WinRT. I also thought of building a separate app that hosts a service for my metro app to interface with, but I'd like to do this with a single app.

Fundamentally, I am looking for a pattern for building Metro-style apps that leverage .NET 4.0 components, specifically to be able to enumerate and kill other processes running on the PC.

CLARIFICATION: I am less concerned with this specific application than I am with access that type of .NET functionality within a Metro-style app

Thanks

like image 851
Glenn Ferrie Avatar asked Oct 16 '11 20:10

Glenn Ferrie


2 Answers

To your specific question, this functionality is not available. Apps are not allowed to interact or interfere with other apps.

To answer your more general question, the APIs available to Metro style applications is limited compared to what is available to desktop applications. C# has a subset of the .Net library available, much like Silverlight does. The same is true for C++ where a subset of the desktop Win32/COM APIs are available.

like image 64
Steve Rowe Avatar answered Oct 13 '22 10:10

Steve Rowe


From what I understand (watching Build2011 videos) a Metro App won't be able to do that...

Interaction between processes is severally limited to specific Contracts (the charms on the right: Search, Send-to).

Think Phone, not Desktop.

You might be able to build a non-Metro Win8 app though.

like image 41
Henk Holterman Avatar answered Oct 13 '22 10:10

Henk Holterman