CreateProcess() - send to process

This is a discussion on CreateProcess() - send to process within the C++ Programming forums, part of the General Programming Boards category; Hi, I'm using CreateProcess() to start a new process that is going to record the sound from the sound card, ...

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    14

    CreateProcess() - send to process

    Hi,

    I'm using CreateProcess() to start a new process that is going to record the sound from the sound card, using the following code:

    Code:
    if(CreateProcess("WaveRecorder.exe",				// Application name
    					 procArgs,                // Application arguments
                         0,
                         0,
                         FALSE,
                         CREATE_DEFAULT_ERROR_MODE,
                         0,
                         0,                              // Working directory
                         &siStartupInfo,
                         &piProcessInfo) == FALSE)
    My WaveRecorder is going to need an "Enter" to stop recording. How can I send an "\n" to this process? Because if I try using

    Code:
    		WaitForSingleObject(piProcessInfo.hProcess, 0);
    
    		::CloseHandle(piProcessInfo.hThread);
    		::CloseHandle(piProcessInfo.hProcess);
    I get a running error...

    Best regards,

    Alex.

    ps: Is there a way to send a "\n" through a pipe? If the answer is yes, how can that be done?

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    2,144
    Why did you create a whole new thread to ask the same question a second time? you even got responses on the other one.

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    14
    You're right. I could have used the other one, sorry mate.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. create a child process that creates a child process
    By cus in forum Linux Programming
    Replies: 9
    Last Post: 01-13-2009, 01:14 PM
  2. Socket or send() problem?
    By Achy in forum C Programming
    Replies: 5
    Last Post: 06-09-2006, 01:09 PM
  3. Process sending file descriptors to another process
    By Yasir_Malik in forum C Programming
    Replies: 4
    Last Post: 04-07-2005, 07:36 PM
  4. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 08:32 AM
  5. Almost finished with Round Robin algorithm
    By Shinobi-wan in forum C++ Programming
    Replies: 2
    Last Post: 12-19-2004, 02:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21