- Code: Select all
LPVOID initAddy[1];
DWORD initVal[1];
void On_HK_1(DWORD dw1, DWORD dw2)
{
int searchTotal = GetScanTotal();
LPVOID addy;
DWORD Value;
for( int i = 0; i < searchTotal ; i++)
{
if(GetScanValue(i, &addy, &Value))
{
initAddy[i] = addy;
initVal[i] = Value;
//PrintF("Address:%d / Value:%d", initAddy[i], initVal[i]);
}
}
Display(searchTotal);
}
VOID Display(DWORD dwParam)
{
for (int i = 0; i < dwParam; i++)
{
PrintF("Address:%d / Value:%d", initAddy[i], initVal[i]);
}
}
The variables initAddy and initVal are global and store the initial search's values and addresses after I perform the scripted search. In the for loop under void On_HK_1 (where the function GetScanValue is) the PrintF function returns the correct values for both initAddy and initVal arrays. Now when it gets to the Display void, the values are not correct for initVal, initAddy still displays the correct values (or addresses). The reason I need it in a seperate void is because it will be a new thread to monitor which of those values changes after the search and then record the addresses of the changed values. I don't understand why the initVal values change from one void to the next. Thanks in advance.