C ++: communication with a promoted child process on Windows

I have the following setup: The DLL I am writing is dynamically loaded at runtime and offers some API functionality for the host application. The host application is not running with administrator rights (and therefore my DLL is not).

Some of the tasks my DLL is supposed to do must be admin rights, although I must save and copy the files to the program files folder.

My current approach is to launch external applications via ShellExecute and the "runas" verb, which launches the UAC prompt. This especially means that multiple subsequent user-initiated actions will always result in an additional UAC prompt, which can be quite annoying.

So the idea would be to start a separate, elevated process once, which then runs in the background and receives the appropriate commands and executes them. This brings me to my question: what methods of communication are possible even between the raw process and its sublime childish process? Access to stdin seems to be denied due to obvious security reasons, but what about named pipes or shared memory? Do the same restrictions apply?

+3
c ++ windows uac inter-process-communicat


source to share


No one has answered this question yet

See similar questions:

1
Start the elevated subprocess from C ++ code and communicate with it via stdin / stdout

or similar:

23498
Why is processing a sorted array faster than processing an unsorted array?
8499
What is the "->" operator in C ++?
4247
The definitive C ++ guide and book list
3076
What are the differences between a pointer variable and a reference variable in C ++?
2453
How do I install pip on Windows?
2195
Is there an equivalent to "which" on the Windows command line?
1975
How do I know which process is listening on a port on Windows?
24
How do you remove privileges from a child process
13
Is it possible for UAC to bring up a process without starting another process
2
How to create an ascending child process with inherited handles from its parent



All Articles
Loading...
X
Show
Funny
Dev
Pics