Windows application that can dynamically accept console commands

I just wanted to contribute to the project I'm working on. Basically, I create a service that monitors and processes new files in the directory specified by the configuration file and other parameters through the command line. It should also output text through the command line, that is, when the user enters " -help ", it will display its usage. The goal is also to ensure that the user can change the configuration file on the fly, so the service will constantly monitor the configuration file for changes and adjust accordingly.

The task that I see is trying to consolidate the ability to enter commands through the command line, output the output as if it were a console application, and be able to process these commands while working in the Management Manager service. So far, in my research, the solutions I came across show how to create a Windows application that can also work as a console application, but it either works as one or not the other. Any suggestions or input are welcome.

UPDATE:

Thanks to everyone for your suggestions, I did some reading on various IPC-supported Windows mechanisms. I pushed my options back to File Mapping, Named Pipes and RPC. I assume that the Windows Service application and the console application will be on the same computer and do not need to communicate over the network. First I will look at Named Pipes.

+3
source share
2 answers

, , - IPC ( ), .net Remoting, WCF, tcp/. , IPC , .

+2

, . , . , , .

0

Source: https://habr.com/ru/post/1773906/


All Articles