-1

I'm doing a little C# WPF application. To avoid the damned annoying UAC prompt at startup (that I cannot evade because I really need admin right) I thought to move the "needy" methods of my app (that do file moving/creating and registry editing) inside a windows service.

I that way I can register once the app with admin rights, and start my client app (in WPF) without admin rights, demanding all important things to the service.

Unfortunately, separating my (already done) app in 2 parts (a client and a service) make me ask one important question that I can't really answer myself: how I can communicate easily with the service?

Before I was simply sending some custom objects and lists ( through a backgroundWorker) to another methods, that who did all the work in background.

Now I really don't understand how I can communicate easily in the same way with a service.

I can not find any useful reference, can someone suggest me something not too difficult?

Alex DG
  • 97
  • 1
  • 6
  • Possible duplicate of [What is the simplest method of inter-process communication between 2 C# processes?](https://stackoverflow.com/questions/528652/what-is-the-simplest-method-of-inter-process-communication-between-2-c-sharp-pro) – Ňuf Sep 29 '17 at 10:20

1 Answers1

0

The trouble is that communication between 2 processes is humungous topic.

You could roll your own method, but it is worth spending time figuring out WCF:

https://learn.microsoft.com/en-us/dotnet/framework/wcf/whats-wcf

Msoft make it sound really difficult and comlicated, but it is not really that difficult to do what you want.

mikelegg
  • 1,197
  • 6
  • 10
  • Thanks fro the answer! I cannot find any tutorial about WPF - Services communication using WCF, so I'm kinda in trouble trying to find my way through this mess. It's the most recent solution, however, so I think I should try it! – Alex DG Sep 29 '17 at 13:05