0

After creating a process (addaccount.exe) using my current process (run.exe), how do i program run.exe to input a command or pass information directly to addaccount.exe?

Edit: So, if i have

STARTUPINFO si;
ZeroMemory(&si, sizeof(si));
si.hStdInput = //What do i put here?

1
  • I removed "C/C++" from your title, as you only use the C++ tag. Note that C is not the same as C++, and that there is no language called "C/C++". Commented Jan 22, 2014 at 11:01

2 Answers 2

1

If you're using CreateProcess WIN32 function to create the new process, then you can set the standard input and output file handles of the new process. See the STARTUPINFO structure, especially the three file handles at the end of that structure.

Sign up to request clarification or add additional context in comments.

1 Comment

@Deckdyl Use your favorite search engine, there are plenty of examples and tutorials available, not only on MSDN or here on SO, but all over.
0

You can find a complete example here:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms682499(v=vs.85).aspx

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.