Thread: help needed with spawn function

  1. #1
    Registered User tsarena's Avatar
    Join Date
    May 2002
    Posts
    8

    Unhappy help needed with spawn function

    hi,

    i'm a bit confuse,which one from the spawn family function should i use to spawn an exe file that inherit handles from its parent prog? can u give me an example on how to use it?

    for your information,i already read your faq and still confused.

    Thanx in advance

  2. #2
    Registered User Azuth's Avatar
    Join Date
    Feb 2002
    Posts
    236
    It was my understanding that spawn simply did not close any files that were open in the parent, but I haven't read anywhere that it can pass the handles of files, just command line arguments that your child process can run. I guess in this way you could pass file names from your parent, but not inherit handles.

  3. #3
    Registered User tsarena's Avatar
    Join Date
    May 2002
    Posts
    8
    so, is there any other functions i can use to run exe file that inherit handles from its parent prog.

    currently i'm using CreateProcess() to do it but the program won't stop running until user press ENTER button for a couple of times. the program that i've been working on is use to run another EXE file with the list of inputs being supply by the 'input.dat' file and then output from the EXE file will be redirected to 'output.dat' file. hope this can help you out to understand what i'm trying to do.

    so i think maybe i should try other functions to make my program works.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  2. Calling a Thread with a Function Pointer.
    By ScrollMaster in forum Windows Programming
    Replies: 6
    Last Post: 06-10-2006, 08:56 AM
  3. Bisection Method function value at root incorrect
    By mr_glass in forum C Programming
    Replies: 3
    Last Post: 11-10-2005, 09:10 AM
  4. C++ compilation issues
    By Rupan in forum C++ Programming
    Replies: 1
    Last Post: 08-22-2005, 05:45 AM
  5. Replies: 5
    Last Post: 02-08-2003, 07:42 PM