Usually, WaitForMultipleObjects takes an argument which tells it that for how many events this method need to wait.
DWORD WaitForMultipleObjects(
DWORD Count,
const HANDLE *lpHandles,
BOOL bWaitAll,
DWORD dwMilliseconds
);
my requirement is to wait for not a fixed number of events. So, it is possible to wait for a variable number of events in the above function or what is the other way through that I can achieve this in windows.
You could use a container such as std::vector: