Been trying to make a basic cheat, but every time I add one this one line of code, I can't do any OpenProcess/elevation requiring functions!
I encourage you to try this code yourself, all my friends get the same issue. Please tell me im being dumb and just have a typo
Code:
bool good_coder() {
DWORD ELEPHANT = sizeof(TOKEN_ELEVATION); HANDLE CHEEZE = NULL;
TOKEN_ELEVATION PIZZA;
if (OpenProcessToken(GetConsoleWindow(), PROCESS_ALL_ACCESS, &CHEEZE)) {
if (GetTokenInformation(CHEEZE, TokenElevation, &PIZZA, sizeof(TOKEN_ELEVATION), &ELEPHANT)) {
return PIZZA.TokenIsElevated;
}
}
}
int main() {
if (!good_coder()) {
cout << "NOT ADMIN! :(";
}
else { cout << "YES! :D"; }
HWND walrus = NULL;
LPCSTR GAMENAMEHERE = "U CANT STEAL MY PASTE";
while (walrus == NULL) {
walrus = FindWindowA(NULL, GAMENAMEHERE);
Sleep(100);
}
LPDWORD AMIDUMB = NULL;
GetWindowThreadProcessId(walrus, AMIDUMB); // try &AMIDUMB and change it do DWORD, same result
// PRETEND REST OF CHEAT IS HERE
- - - Updated - - -
also sorry for stupid names, ive tried to make this project like 10 times. i need something to keep me entertained