I've been reading up on google and such, but I haven't found anything related to what I'm looking for. MSDN even said that SuspendThread and ResumeThread has been deprecated, so if there's a better alternative, please inform me.
I'm using the following snippet to create a thread in main.cpp:
Code:
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)&AutoAttack, hWnd, 0, 0);
AutoAttack is declared in bot.cpp. What I'm trying to do is make it so that an autobuff thread will suspend the thread if it's active, send the buff key, then allow the attack thread to resume. A simple example or push in the right direction would be greatly appreciated.