I am developing a program that is loaded at windows startup. At the beggining of my program, i create a thread, that has to wait for a library to be loaded. That library is loaded by windows, and I dont know when exactly is loaded.
So, in the thread, i wait for 30000 milliseconds.
After that, I assume that the library has been loaded by windows, and the thread starts its execution.

I would like to know, how can I pause (from the main program) the thread and how can I resume the execution from the main program too.

I want to know this just in the case, I am able to know when the library I need to be loaded IS loaded by windows.

Thanks in advance,
sarambur