Skip to content

Instantly share code, notes, and snippets.

View fir3z's full-sized avatar
🙃

Firez fir3z

🙃
View GitHub Profile
@lennyRBLX
lennyRBLX / fixing_validatehwnd_call.cpp
Created July 8, 2020 14:36
Gives code examples for all the necessary steps in order to call ValidateHwnd or any other Validate method in win32kbase.
// for examples sake, lets say all of these are pre defined: ValidateHwnd, wnd_handle
void* ethread::get_win32() {
return PsGetThreadWin32Thread(ethr);
}
void ethread::set_win32(void* new_, void* buffer) {
void* current = get_win32();
PsSetThreadWin32Thread(ethr, NULL, current); // reset win32
PsSetThreadWin32Thread(ethr, new_, NULL); // modify win32