int main(int argc, char **argv, char **envp)
GxApp.Init(argc, argv, envp);
TempData = System::AppDirectory("") + "TestChild.exe";
printf("Error extracting information.\n");
// Run the TestChild process with forced elevation,
// waiting for it to complete,
// attached to this console,
// and pipe stderr to internal buffers.
if (!TempProcess.StartProcess(TempProcessData.Command, TempProcessData.Argv, TempProcessData.Envp, TempProcessData.Directory, BString(), Process::Foreground, Process::Standard, Process::Piped, Process::NoDetachProcess, Process::ForceElevate))
printf("Error running process.\n");
// Data should have come across the named pipe for stderr.
printf("Data from TestChild.exe: \"%s\"", *TempProcess.ReadStderr());
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Been writing software for a really long time - something like 18 years. Started on the TI/99-4A, moved to the Tandy 1000, and somehow managed to skip all the lousy hardware/software jumps (286, 386, first Pentiums, Win95, etc.)
I now run a small software business called CubicleSoft with a few products you might be interested in. VerifyMyPC and MyUpdate Toolkit are the most popular. I'm also the author of a book called "Safe C++ Design Principles".