Question

CreateProcess suspended but it can't be resumed.

Here is my 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 doesn't work?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top