Windows service redirect stdout




















Privacy policy. The example in this topic demonstrates how to create a child process using the CreateProcess function from a console process. It also demonstrates a technique for using anonymous pipes to redirect the child process's standard input and output handles. The read end of one pipe serves as standard input for the child process, and the write end of the other pipe is the standard output for the child process. The parent process uses the opposite ends of these two pipes to write to the child process's input and read from the child process's output.

However, these handles must not be inherited. Therefore, before creating the child process, the parent process uses the SetHandleInformation function to ensure that the write handle for the child process's standard input and the read handle for the child process's standard output cannot be inherited.

Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Is this page helpful? Please rate your experience Yes No. The time now is AM. Copyright TechnologyAdvice. CodeGuru Home. Visual Basic. VB Forums. You may have to register or Login before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

This is because a service doesn't act like a executable but as a service. Lookup the restrictions on Service vs.



0コメント

  • 1000 / 1000