0

I have a vector of handles from processes I ran using create process. I am wondering how to pass in that into WaitForMultipleObjects(v.size, "code goes here",true, infinite);

I populate the handle vector with the PROCESS_INFORMATION's handle field each time I loop through and create a process.

tshepang
  • 12,111
  • 21
  • 91
  • 136
Lainezor
  • 500
  • 9
  • 16

2 Answers2

1

If your compiler supports C++11, you could use v.data() to get an array of the content in the vector.

Mats Petersson
  • 126,704
  • 14
  • 140
  • 227
1

WaitForMultipleObjects(v.size(), &v[0], true, INFINITE);

ScottMcP-MVP
  • 10,337
  • 2
  • 15
  • 15