Click here to Skip to main content
16,005,120 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: InternetConnect problem Pin
Ted Ferenc8-Jun-04 21:36
Ted Ferenc8-Jun-04 21:36 
GeneralRe: InternetConnect problem Pin
Anonymous8-Jun-04 23:40
Anonymous8-Jun-04 23:40 
GeneralRe: InternetConnect problem Pin
Ted Ferenc9-Jun-04 0:04
Ted Ferenc9-Jun-04 0:04 
GeneralRe: InternetConnect problem Pin
Anonymous9-Jun-04 0:29
Anonymous9-Jun-04 0:29 
GeneralRe: InternetConnect problem Pin
Ted Ferenc9-Jun-04 1:25
Ted Ferenc9-Jun-04 1:25 
GeneralRe: InternetConnect problem Pin
Ravi Bhavnani8-Jun-04 21:39
professionalRavi Bhavnani8-Jun-04 21:39 
GeneralWaiting for ShellExecute before going on Pin
Paolo Ponzano8-Jun-04 19:37
Paolo Ponzano8-Jun-04 19:37 
GeneralRe: Waiting for ShellExecute before going on Pin
Diddy9-Jun-04 2:05
Diddy9-Jun-04 2:05 
I take it you mean each step is running on its own thread?

Semaphores dont help you gaurentee order. All the do is protect say thread A accessing the same thing as thread B. Which order thread A and thread B run in is down to the scheduler. So it might happen A grabs the semaphore, B tries to and waits, A releases semaphore, B contnues to run. Or it might happen B grabs the semaphore, A tries to and waits, B releases semaphore, A contnues to run - its up to the scheduler (and of course your theads priority).

If you want things to happen one after the other, run them on the same thread:

void Foo(
{
Step1();
Step2();
Step3();
}

etc.

If you really want each step to happen on it's own thread, then you need to use events. Look up CreateEvent/SetEvent/ResetEvent

If I have the wrong end of the stick, and what you are asking is you want ShellExecuteEx not to return until the spawned process has finished, you do it like this.

SHELLEXECUTEINFO si;
si.fMask = SEE_MASK_NOCLOSEPROCESS;
si.etc etc

ShellExecuteEx(&si);
WaitForSingleObject(si.hProcess, INFINATE);
Generalmarker audio in sdk Pin
bagherrokni8-Jun-04 19:20
bagherrokni8-Jun-04 19:20 
GeneralRe: marker audio in sdk Pin
Paolo Ponzano8-Jun-04 19:30
Paolo Ponzano8-Jun-04 19:30 
GeneralRe: marker audio in sdk Pin
Vadim Tabakman9-Jun-04 11:46
Vadim Tabakman9-Jun-04 11:46 
GeneralFancy Property Sheet Pin
flip8-Jun-04 19:08
flip8-Jun-04 19:08 
GeneralRedirecting standard input from dos-console to HWND Pin
Paolo Ponzano8-Jun-04 18:45
Paolo Ponzano8-Jun-04 18:45 
GeneralRe: Redirecting standard input from dos-console to HWND Pin
Anthony_Yio8-Jun-04 20:12
Anthony_Yio8-Jun-04 20:12 
GeneralRe: Redirecting standard input from dos-console to HWND Pin
David Crow9-Jun-04 3:33
David Crow9-Jun-04 3:33 
GeneralHelp! Line Thinning using Visual C++ Pin
fuzzypeach8-Jun-04 17:42
fuzzypeach8-Jun-04 17:42 
GeneralWhat's problem with IHTMLDocument2::write Pin
Hailiang Yu8-Jun-04 17:12
Hailiang Yu8-Jun-04 17:12 
GeneralNeed a little help Pin
mayanxn038-Jun-04 17:05
mayanxn038-Jun-04 17:05 
GeneralRe: Need a little help Pin
Vadim Tabakman8-Jun-04 17:07
Vadim Tabakman8-Jun-04 17:07 
GeneralRe: Need a little help Pin
John R. Shaw8-Jun-04 17:49
John R. Shaw8-Jun-04 17:49 
GeneralRe: Need a little help Pin
Ryan Binns8-Jun-04 18:19
Ryan Binns8-Jun-04 18:19 
GeneralRe: Need a little help Pin
Vadim Tabakman8-Jun-04 18:29
Vadim Tabakman8-Jun-04 18:29 
GeneralRe: Need a little help Pin
John R. Shaw8-Jun-04 18:51
John R. Shaw8-Jun-04 18:51 
GeneralRe: Need a little help Pin
Vadim Tabakman8-Jun-04 18:28
Vadim Tabakman8-Jun-04 18:28 
GeneralCapturing/Saving a bitmap Pin
aparajita8-Jun-04 15:04
aparajita8-Jun-04 15:04 

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.