ByePg icon indicating copy to clipboard operation
ByePg copied to clipboard

SEH dont work functions called in hooks?

Open BaiFeng666 opened this issue 1 year ago • 0 comments

example

void MyFunction()
{
	__try {
		int a = *(int*)0x123;
	}
	__except (1) {
		DbgPrintEx(0, 0, "exception code: 123\n");
	}
}

NTSTATUS hk_NtTerminateProcess(HANDLE ProcessHandle, NTSTATUS ExitStatus)
{
    //...
    MyFunction();
    //...
}

How can I make it work?

BaiFeng666 avatar Oct 30 '24 17:10 BaiFeng666