-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
Including polyhook makes my code crash on launch #154
Comments
Possible non issue, if I create the DLL project within the polyhook solution everything works? |
it's possible your other dll has imports that aren't being resolved at load time. Inspect the library dependencies, or use a different injector that gives better output, or debug at dll load time. |
I was almost positive it was getting packed as the output is 1:1 from the "standalone" project using linker I am going to have to reopen this issue as it is present even if I build this DLL within PolyHook Solution Steps to replicate: git clone --recursive https://github.com/stevemk14ebr/PolyHook_2_0.git Method A: paste code from initial issue open Elect to add your PLH hook (x86/64 whatever it may be) in my use case it was an x64Detour* detour = new x64Detour(fnAdd, fnCallback, userTrampVar) Build project (check build log to ensure libs are linked) Method B: Right click -> Add new -> C++ DLL paste code from initial issue open Elect to add your PLH hook (x86/64 whatever it may be) in my use case it was an x64Detour* detour = new x64Detour(fnAdd, fnCallback, userTrampVar) Build project (check build log to ensure libs are linked) Stupid question but how to debug C++ dll at runtime when they dont produce an exe ... this is my first forray into C++ stuff so forgive me ... in C# I just attach process set breakpoint and wait for break then do my debugging from there by stepping through stuff / editing the memory in debugger etc . I can choose to launch an exe in my C# projects in the debugger tab but I dont really see anything like that for what I wanna do in the C++ projects (time for google) i am not sure how to execute this work flow in my current scenario as this is being applied to an exe i have no control over since I didnt produce the exe I am trying to inject the dll into |
https://stevemk14ebr.github.io/PolyHook_2_0/ Wish this was easier to find putzing around the internet.. the other documentation seems centric to polyhook1.0 errr I guess none of the documentation really matches current source as even the example code wont compile without some edits... which dont translate into the x64 file.. hmm this sm0lbrain guy will try to figure out how to make it work I suppose |
Also having issues with this, tried both vcpkg and manually building PolyHook and static linking the libraries |
I need someone to debug what's happening before I can triage this |
Lol |
Unsure how to debug this since I cant even hit the APIENTRY for my .dll
when I use PolyHook2 and its associated static libs
Zycore.lib
Zydis.lib
asmjit.lib
asmtk.lib
PolyHook_2.lib
the test no longer loads ... at all
Steps to reproduce:
place this code in the "main.dll"
Compile -> inject ... watch the console open and display your text.
Simply link PolyHook (via linker or by adding it as a dependency) -> compile
inject DLL from step 4.... Console no longer Allocs...
It crashes so fast I cant even get the debugger to break on it
The text was updated successfully, but these errors were encountered: