-
Notifications
You must be signed in to change notification settings - Fork 893
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
How can I use minhook in my project without vcpkg downloading (it's not working for me)? #126
Comments
By dragging the source code into your visual studio project. It's very easy use integrate minhook into your project. Because this is a small (but mighty) library. But notice the difference while building 32/64 dlls. you need to exclude certain files according to your target platform. I'm using this library with GH-injector to make my chrome extension popup window bigger. I even find a way to iterate very fast —— just write some hook logic use Minhook, press F5 in visual studio, and let AutoHotKey to automatically launch the browser and perform injection. The GH-injector is awesome and easy to use. You can use their GUI , and from the GUI u can learn how to write an injection command . I then use AutoHotKey to run that command . I can't find the manual of GH-injector, thus why I asked a question in their issues. but someone closed the entire issue region yesterday. Maybe they need some help? There's another tool Frida . It's different. It use javascript to inspect |
@KnIfER shameless self-promotion: If you like playing with the tools you mentioned, you'll also like Windhawk, which provides a convenient platform for developing and sharing Windows mods. It comes with global injection, hooking APIs, and other facilities such as symbol downloading and enumeration out of the box. Here's a simple example of a mod that hooks a single function: The implementation is basically this: BOOL(*pOriginalDrawFocusRect)(
HDC hDC,
const RECT *lprc
);
BOOL DrawFocusRectHook(
HDC hDC,
const RECT *lprc
) {
return TRUE; // Returning TRUE because returning FALSE would indicate that the function has failed.
}
BOOL Wh_ModInit() {
HMODULE hUser32 = GetModuleHandle(L"user32.dll");
void* origFunc = (void*)GetProcAddress(hUser32, "DrawFocusRect");
Wh_SetFunctionHook(origFunc, (void*)DrawFocusRectHook, (void**)&pOriginalDrawFocusRect);
return TRUE;
} |
What should I add in my project?
The text was updated successfully, but these errors were encountered: