views:

434

answers:

1

the code:

bool success=CreateProcess(m_Process,
             NULL,
             NULL,
             NULL,
             FALSE,
             NORMAL_PRIORITY_CLASS||CREATE_SUSPENDED,
             NULL,
             NULL,
             &suInfo,
             &procInfo);


if(!success){
    MessageBoxA(0,"Could not create process...","ERROR",MB_OK);
    return 1;
    }


    //we created it



//all good so go!
ResumeThread(procInfo.hThread);

why this dont work

+3  A: 

Remove one of the "|". This ends up as a one since it's a logical expression in your case. The constant for this is DEBUG_PROCESS, so you're debugging the child process.

jn_