The while loop in the AutoClick function does not initialize.
Here is my function to create thread.
Code:
void cBase::ThreadCreate(bool MenuVal,HANDLE hName,LPTHREAD_START_ROUTINE tName,bool& tBool,bool& hBool)
Using the Function Above:
Code:
HANDLE hNames[2];
bool hFlags[2]= {true, true};
bool tFlags[2];
int n = 0;
int h = 0;
int t = 0;
Base.ThreadCreate( hack1, hNames[n++], (LPTHREAD_START_ROUTINE)AutoClick, tFlags[h++], hFlags[t++] );
Auto Click Function
Code:
void AutoClick()
{
MessageBoxA(0, "test1", "title", MB_ICONEXCLAMATION | MB_OK); //this works
while( tFlags[1] )
{
MessageBoxA(0, "test2", "title", MB_ICONEXCLAMATION | MB_OK); //this does not activiate
Sleep(1000);
}
}