starting and terminating multiple process in vc++ RRS feed

  • Question

  • Hi, i need to start a number of process on starting a service,is there any way i can do that with create process? and on stopping that service i need to stop all the instances of all the process started during the start of service how can i do that with terminate process.

    Thanks in advance
    Thursday, November 18, 2010 11:28 AM


  • Hi,

    Thanks for your post. Just a quick reflection, Microsoft Windows offers a job kernel object that lets you group processes together and create a "sandbox" that restrict what the processes can do. We could create the process one by one as the service started, and add those processes to a job. We can place restrictions on the job, and when necessary, terminate all processes in that job. The following references could be helpful.

    1. CreateJobObject() / OpenJobObject() -- (create or open a job kernel object)

    2. SetInformationJobObject()  -- (place restrictions on a job's processes)

    3. AssignProcessToJobObject() -- (place a process in a job)

    4. TerminateJobObject() -- (terminate all processes in a job)

    Please mark the right answer at the right time.
    • Edited by SamAgain Friday, November 19, 2010 4:28 AM refine
    • Marked as answer by praveen.m.r Wednesday, December 1, 2010 10:07 AM
    Friday, November 19, 2010 4:26 AM