I need to be able to pause and resume the main thread in a Windows C ++ application. I used
handle = GetCurrentThread();
SuspendThread(handle);
and then where should be renewed
ResumeThread(handle);
while the suspension works, the resumption of this does not occur. I have other threads that are paused and resumed without problems, is there something that is different from the main thread.
I worked a lot with threads, working in C # and Java, but this is the first time I have done something in C ++, and I think this is completely different.
source
share