Click here to Skip to main content
15,912,977 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Forbit MRU Updation Pin
Malli_S8-Mar-06 0:02
Malli_S8-Mar-06 0:02 
GeneralRe: Forbit MRU Updation Pin
Farhat Aisha8-Mar-06 0:25
Farhat Aisha8-Mar-06 0:25 
GeneralRe: Forbit MRU Updation Pin
Malli_S8-Mar-06 0:37
Malli_S8-Mar-06 0:37 
QuestionShell Executing From VC++ Pin
Malli_S7-Mar-06 23:40
Malli_S7-Mar-06 23:40 
AnswerRe: Shell Executing From VC++ Pin
Nibu babu thomas7-Mar-06 23:58
Nibu babu thomas7-Mar-06 23:58 
GeneralRe: Shell Executing From VC++ Pin
Malli_S8-Mar-06 0:25
Malli_S8-Mar-06 0:25 
AnswerRe: Shell Executing From VC++ Pin
David Crow8-Mar-06 2:26
David Crow8-Mar-06 2:26 
QuestionProcess hirarchy Pin
Aqueel7-Mar-06 23:40
Aqueel7-Mar-06 23:40 
Hello
Does Windows support process hirarchy. That is we can create a process from parent process using CreateProcess(...). Can we create another process from the newly created child process? I have read somewhere that Windows does not support process hirarchy.

Here is a reference code from MSDN.

#include <windows.h><br />
#include <stdio.h><br />
<br />
void main( VOID )<br />
{<br />
    TCHAR szCmdline[]=TEXT("MyChildProcess");<br />
    STARTUPINFO si;<br />
    PROCESS_INFORMATION pi;<br />
<br />
    ZeroMemory( &si, sizeof(si) );<br />
    si.cb = sizeof(si);<br />
    ZeroMemory( &pi, sizeof(pi) );<br />
<br />
    // Start the child process. <br />
    if( !CreateProcess( NULL,   // No module name (use command line)<br />
        szCmdline,      // Command line<br />
        NULL,           // Process handle not inheritable<br />
        NULL,           // Thread handle not inheritable<br />
        FALSE,          // Set handle inheritance to FALSE<br />
        0,              // No creation flags<br />
        NULL,           // Use parent's environment block<br />
        NULL,           // Use parent's starting directory <br />
        &si,            // Pointer to STARTUPINFO structure<br />
        &pi )           // Pointer to PROCESS_INFORMATION structure<br />
    ) <br />
    {<br />
        printf( "CreateProcess failed (%d).\n", GetLastError() );<br />
        return;<br />
    }<br />
<br />
    // Wait until child process exits.<br />
    WaitForSingleObject( pi.hProcess, INFINITE );<br />
<br />
    // Close process and thread handles. <br />
    CloseHandle( pi.hProcess );<br />
    CloseHandle( pi.hThread );<br />
}


In above code, a child process has been created. I want to ask can we create nested child process using newly created process in above example.
Thank you.


We Believe in Excellence
AnswerRe: Process hirarchy Pin
Nibu babu thomas8-Mar-06 0:36
Nibu babu thomas8-Mar-06 0:36 
AnswerRe: Process hirarchy Pin
Aqueel8-Mar-06 1:06
Aqueel8-Mar-06 1:06 
GeneralRe: Process hirarchy Pin
Nibu babu thomas8-Mar-06 1:15
Nibu babu thomas8-Mar-06 1:15 
AnswerRe: Process hirarchy Pin
Aqueel8-Mar-06 1:21
Aqueel8-Mar-06 1:21 
GeneralRe: Process hirarchy Pin
Nibu babu thomas8-Mar-06 1:28
Nibu babu thomas8-Mar-06 1:28 
AnswerRe: Process hirarchy Pin
Aqueel8-Mar-06 1:34
Aqueel8-Mar-06 1:34 
GeneralRe: Process hirarchy Pin
Nibu babu thomas8-Mar-06 1:37
Nibu babu thomas8-Mar-06 1:37 
Question[OT] Pin
toxcct8-Mar-06 1:53
toxcct8-Mar-06 1:53 
AnswerRe: [OT] Pin
David Crow8-Mar-06 2:29
David Crow8-Mar-06 2:29 
GeneralRe: [OT] Pin
Eytukan8-Mar-06 2:50
Eytukan8-Mar-06 2:50 
AnswerRe: Process hirarchy Pin
Aqueel8-Mar-06 1:47
Aqueel8-Mar-06 1:47 
GeneralRe: Process hirarchy Pin
jhwurmbach8-Mar-06 2:48
jhwurmbach8-Mar-06 2:48 
AnswerRe: Process hirarchy Pin
David Crow8-Mar-06 2:32
David Crow8-Mar-06 2:32 
GeneralRe: Process hirarchy Pin
Aqueel8-Mar-06 2:45
Aqueel8-Mar-06 2:45 
GeneralRe: Process hirarchy Pin
jhwurmbach8-Mar-06 2:52
jhwurmbach8-Mar-06 2:52 
GeneralRe: Process hirarchy Pin
David Crow8-Mar-06 2:53
David Crow8-Mar-06 2:53 
QuestionUsing HTTP_QUERY_CONTENT_MD5 Pin
bosfan7-Mar-06 23:19
bosfan7-Mar-06 23:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.