Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Anonymous
Anonymous asked in Computers & InternetProgramming & Design · 5 days ago

C WaitForMultipleObjects ?

I’m trying to use CreateProcess to start a variable number of processes with an affinity mask that can be changed and the lm use WaitForMultipleObjects to wait for the processes that were created to finish their calculations and close. An simple example code would be very helpful 

1 Answer

Relevance
  • Anonymous
    4 days ago

    You need to use Google, or go straight to Microsoft's own website, the call is the same for C and C++ but Microsoft's documentation only mentions C++.

    Start a thread that's going to be waiting because you'll set bWaitAll to true.

    This thread then starts the calculation threads, keeping the handles in an array.

    Invoke the function and check the returned value to make sure everything has worked.

    I can't post links or the code because of shadowbanning.

Still have questions? Get your answers by asking now.