I need to be able to suspend and resume the main thread in a Windows C++ app. I have used
handle = GetCurrentThread();
SuspendThread(handle);
and then where is should be resumed
ResumeThread(handle);
while suspending it works, resuming it does not. I have other threads that are suspended and resumed with no problems, is there something that is different with the main thread.
I have done a lot of threading working in C# and Java but this is the first time I have done any in C++ and I'm finding it to be quite a bit different.