HookLib icon indicating copy to clipboard operation
HookLib copied to clipboard

Problem with hooking windows api

Open abhithedev200 opened this issue 1 year ago • 3 comments

So when I tried to hook an windows API function example

	void* orginalSetCursor = nullptr;
	hook(SetCursor, hkSetCursor, &orginalSetCursor);

this throws an access violation at 0x0000000000000000 lol

hooking other functions works just fine, just the Windows API does not work

abhithedev200 avatar Feb 17 '24 17:02 abhithedev200

More info: this issue one happened on the new version of hooklib old version without orignal function param worked fine

abhithedev200 avatar Feb 17 '24 20:02 abhithedev200

Which WinAPI function do you hook?

HoShiMin avatar Feb 18 '24 00:02 HoShiMin

Which WinAPI function do you hook?

https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setcursor

abhithedev200 avatar Feb 18 '24 09:02 abhithedev200