Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does it still work in 2024 ? #1

Open
cippyboy opened this issue Feb 12, 2024 · 0 comments
Open

Does it still work in 2024 ? #1

cippyboy opened this issue Feb 12, 2024 · 0 comments

Comments

@cippyboy
Copy link

cippyboy commented Feb 12, 2024

I tried what was in the unit test (because I can't run that one in VS2022):

void Hook( fn_hooks::Registers regs )
{
	OutputDebugStringA( "Hook" );
}

void HookedFunction( )
{
	OutputDebugStringA( "GlobalFunction" );
}

int main()
{
	// To hook
	const size_t byte_count = 0x1A; // How many bytes to copy to end of the hook from start of the function
	const uint64_t fn_ptr = fn_hooks::ReadJump( reinterpret_cast<uint64_t>( HookedFunction ) );
	fn_hooks::InlineHook( fn_ptr, Hook, byte_count );

	HookedFunction( );
}

and it crashes after it exits Hook()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant