Replies: 3 comments 24 replies
-
I don't know any of those games' internals, but I googled Fallout 3 and it looks like it is a DirectX 9 game. You should choose the hook that works with the rendering API that each game is using. For example, Dark Souls III uses DirectX 11 and Elden Ring uses DirectX 12, so in the respective tools I use |
Beta Was this translation helpful? Give feedback.
-
32bit is working just fine, you're likely not injecting correctly. You can use something like cheat engine to see if your dll is actually loaded inside the target process. Also to make things easier on yourself, allocate a console from inside the target process so that you can use println! or othe macro's to get some logging, and redirect panics so that you can actually see if something inside your code is crashing. util::console::init_console(); //calls AllocConsole() from windows-rs
util::log::init_log(); //Initializes a console logger with log4rs (can just use println! instead after AllocConsole())
//Redirect panics, log them to console and to file with log4rs, once again use println! as alternative - you won't see
//crashes if you don't log to file because the console will close.
panic::set_hook(Box::new(|i| {
error!("panic");
error!("{}", i);
})); There are definitely bugs left in the dx9 backend. The most glaring one being that the mouse position you see on screen does not match up with where imgui thinks the mouse is. |
Beta Was this translation helpful? Give feedback.
-
@Godnoken I have opened a branch for improving the general behavior of I also added some tests to inject an example dummy DLL into Notepad. To run these tests:
Could you please try the injector in that branch against the games you are working with? I think I didn't specify this earlier because I'm a dummy, and this could very well be a solution -- you have to specify the title to the window rather than the name of the process, though this could (and probably should?) change in the future. Example with let mut child = Command::new("notepad.exe").spawn().expect("Couldn't start notepad");
std::thread::sleep(Duration::from_millis(500)); // wait for the process to start
hudhook::inject::inject("Untitled - Notepad", examples_path().join("dummy_hook.dll")).unwrap(); I'm planning to introduce a breaking change in the API for Thank you! |
Beta Was this translation helpful? Give feedback.
-
Hello hello!
As referenced in #32, I can not successfully inject the dll file into any game that I've tried so far.
I start the game and use the generated .exe - a cmd window pops up for a split second and disappears again.
I've tried launching the game like in the README.md, but to no avail - and some games refuse to start that way due to Steam, Epic Games etc.
I have no antivirus installed and I turned off the windows defender & firewall.
OS is Windows 10.
Games tried are Overgrowth, Kenshi, Bloons TD 6, SHENZHEN IO, Fallout 3.
Any idea what I may be doing wrong?
lib.rs
Exactly as the OpenGL3 hook example
main.rs
Cargo.toml
Beta Was this translation helpful? Give feedback.
All reactions