1

How to run a console application from a standard Delphi form application, but to run it hidden? Also i want to write commands in that console application from my form application. How can i do those things?

And a personal request for the people who have the newest version of indy10. I have trouble to compile the console application and if is possible some of you to compile it for me and give me link to download. Please, that will be nice if you do me that favor. :)

4
  • how do you plan to communicate with console app? Passing arguments or stdin? Commented Jul 21, 2011 at 11:44
  • @David It is very possible using a pipe ;) Commented Jul 21, 2011 at 11:48
  • @David Sorry,missunderstood your question Commented Jul 21, 2011 at 12:06
  • This question is kind of a duplicate of multiple other questions. I think you should ask one question at a time. I'm downvoting not because I dislike you, or any of your individual questions, but because I think this is too many questions all in one. You mention indy10, console application stdin capture, launching subprocesses, and other stuff. "Do me a favor" is not what Stackoverflow is here for. To answer questions (for you, and for posterity) is the purpose of the site. Conversational and multi-question posts like this belong on a Delphi forum of some kind. Commented Jul 22, 2011 at 13:24

1 Answer 1

4

To run a console app and hide the console window, call CreateProcess passing CREATE_NO_WINDOW in the creation flags parameter.

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

4 Comments

How do you prefer to or need to communicate with console app? Passing arguments or stdin?
like normal user writing, but programmatically.
When I have done this before, I used hStdInput in STARTUPINFO. You create a file with CreateFile and then write to it with WriteFile. Remember to set the file pointer back to the beginning of the file. Or you can use a pipe.
I don't know anything much about pipes.

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.