Search code examples
c#.netwcfuwpcom

UWP with Desktop Extension or WCF?


I want to develop a Windows UWP software, which has the following functions:
a. get CPU information.
b. get GPU information.(UWP NOT support)
c. get FAN speed information.(UWP NOT support).

Because "b" and "c" are not supported by UWP, so I need to use WMI API(COM API) or win32 API.
The problem is both WMI and win32 API can't be called in UWP program.

I found two ways to solve the problem. One is to use Desktop Extension(windows.fullTrustProcess), the other is WCF(Windows Communication Foundation).

My questions are:
1. According to my situation, which method should I use?
2. Why?


Solution

  • For your requirement, the better one is Desktop Extension, because it is lite and easy to integrate into UWP package with Windows Application Package Project. You could use uwp AppService to communicates with each other. Getting Gpu and Fans info from Desktop Extension and send it to UWP with AppService. And you could refer stefan's blog here.