Click here to Skip to main content

C / C++ / MFC

   

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page  Show 
  Refresh
AnswerRe: How to check CComVariant.boolval is valid and extract bool value from it Pinmemberbjorn_ht4:44 22 Feb '12  
AnswerRe: How to check CComVariant.boolval is valid and extract bool value from it PinmemberJochen Arndt4:48 22 Feb '12  
Questionstandard c_str() problem in C++ PinmemberAnitesh Kumar17:45 21 Feb '12  
AnswerRe: standard c_str() problem in C++ [modified] PinPopularmemberEmilio Garavaglia20:10 21 Feb '12  
GeneralRe: standard c_str() problem in C++ PinmvpCPallini0:18 22 Feb '12  
GeneralRe: standard c_str() problem in C++ PinmemberVuNic0:52 22 Feb '12  
QuestionBest way to check if a thread is still active c++ win32 Pinmemberjkirkerx11:35 21 Feb '12  
I'm running a cosmetic loop, and I think I should check to see if the CreateProcess is still running. I've seen other post for the same thing, but could not remember the nomenclature for it.
 
Just looking for recommendations
 

I played around with checking the exit code, but I know it's not the proper way to do it
GetExitCodeProcess(pi.hProcess, (unsigned long *)&exit_status);
if (exit_status != 259)
    break;
 
My CreateProcess
 
if (CreateProcess(sz_SQLServer_Install_FileName, szParameters, NULL, NULL, FALSE, CREATE_DEFAULT_ERROR_MODE | NORMAL_PRIORITY_CLASS, 0, sz_SQLServer_Install_FolderPath, &si, &pi) ) {
        while(WAIT_TIMEOUT == WaitForSingleObject(pi.hProcess, 10)) {
            MSG oMSG;
            while(::PeekMessage(&oMSG, NULL, 0,0, PM_NOREMOVE)) {
                if(::GetMessage(&oMSG, NULL, 0,0) ) {
                    ::TranslateMessage(&oMSG);
                    ::DispatchMessage(&oMSG);
                }
                else {
                    break;
                }

QuestionRe: Best way to check if a thread is still active c++ win32 Pinmember Randor 14:27 21 Feb '12  
AnswerRe: Best way to check if a thread is still active c++ win32 Pinmemberjkirkerx15:18 21 Feb '12  
GeneralRe: Best way to check if a thread is still active c++ win32 Pinmember Randor 16:55 21 Feb '12  
GeneralRe: Best way to check if a thread is still active c++ win32 Pinmemberjkirkerx17:05 21 Feb '12  
AnswerRe: Best way to check if a thread is still active c++ win32 PinmemberChuck O'Toole14:29 21 Feb '12  
GeneralRe: Best way to check if a thread is still active c++ win32 Pinmemberjkirkerx15:28 21 Feb '12  
AnswerRe: Best way to check if a thread is still active c++ win32 PinmemberChuck O'Toole16:12 21 Feb '12  
AnswerComplete code for CreateProcess and loop Pinmemberjkirkerx15:26 21 Feb '12  
AnswerRe: Complete code for CreateProcess and loop PinmemberChuck O'Toole16:22 21 Feb '12  
AnswerRe: Complete code for CreateProcess and loop PinmemberChuck O'Toole16:34 21 Feb '12  
GeneralRe: Complete code for CreateProcess and loop Pinmemberjkirkerx16:50 21 Feb '12  
GeneralRe: Complete code for CreateProcess and loop Pinmember Randor 17:08 21 Feb '12  
GeneralRe: Complete code for CreateProcess and loop Pinmemberjkirkerx18:18 21 Feb '12  
GeneralRe: Complete code for CreateProcess and loop Pinmemberjkirkerx6:58 22 Feb '12  
QuestionDynamic linking vs dynamic loading Pinmemberelelont24:47 21 Feb '12  
QuestionRe: Dynamic linking vs dynamic loading PinmemberDavidCrow5:41 21 Feb '12  
AnswerRe: Dynamic linking vs dynamic loading PinPopularmemberChris Losinger5:47 21 Feb '12  
QuestionHow to increase concurrent rate of a server application Pingroupyu-jian3:30 21 Feb '12  

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

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


Advertise | Privacy | Mobile
Beta | 2.5.120517.1 | Last Updated 22 May 2012
Copyright © CodeProject, 1999-2012
All Rights Reserved. Terms of Use
Layout: fixed | fluid