Actually it seems that I have got this all wrong - the call to EnumWindows actually does not return until all of the callbacks have been called Which is great and all... but I feel like a douche now and cant figure out how I got it into my head that it was async and called the callbacks after the API had already returned!