(04-04-2020 - 03:18 AM)Rick Wrote:nice leak!Code://Code For Forcing Challenge
typedef int(*XamInputGetState_t)(WORD dwUserIndex, DWORD r4, PXINPUT_STATE pState);
XamInputGetState_t XamInputGetStateOriginal;
BOOL pressButton = false;
BOOL ExecuteChallenge;
INT challengeCount = 0;
DWORD XamInputGetStateHook(DWORD dwUserIndex, DWORD r4, PXINPUT_STATE pState)
{
DWORD dwResult = XamInputGetStateOriginal(dwUserIndex, r4, pState);
if (dwUserIndex != 0 || dwResult != 0)
return dwResult;
if (pressButton){
pState->Gamepad.wButtons |= XINPUT_GAMEPAD_A;
pressButton = FALSE;
}
return dwResult;
}
VOID forever() {
while (true) {
Sleep(1);
if (ExecuteChallenge){
ExecuteChallenge= false;
Sleep(2500);
pressButton = true;
printf("XboxLiveRocks Executed %i Challenges Successfully!\n", challengeCount); //print to xbwatson
challengeCount++;
}
}
}Code://Code for Challenge
HRESULT XekeysExecuteChallenge(...){
//do challenge normally
ExecuteChallenge = TRUE;
}Full Credit to Kraz & The xbO Team for this method.Code://Code for SystemHooks
BOOL IntializeChallengeHooks(){
DoThread(forever);
//everything else
}
Users browsing: 1 Guest(s)