veeenu / hudhook

A videogame overlay framework written in Rust, supporting DirectX and OpenGL
MIT License
209 stars 30 forks source link

Inject not a function #133

Closed KendrickFerguson closed 1 year ago

KendrickFerguson commented 1 year ago

this is my main.rs

use std::process::Command; use hudhook::inject;

fn main() { let mut child = Command::new("my_dx11_application.exe") .spawn() .expect("Failed to run child process"); std::thread::sleep(std::time::Duration::from_millis(250));

inject::inject("my_dx11_application.exe", "target/release/libmycrate.dll").ok();

child.wait().expect("Child process error"); tauri::Builder::default() .run(tauri::generate_context!()) .expect("error while running tauri application");

}

This error appear when i run

error[E0425]: cannot find function inject in module inject --> src\main.rs:12:11 | 12 | inject::inject("my_dx11_application.exe", "target/release/libmycrate.dll").ok(); | ^^^^^^ not found in inject

For more information about this error, try rustc --explain E0425. error: could not compile app (bin "app") due to previous error

veeenu commented 1 year ago

The inject function was removed almost a year ago in favor of a new API.

Where did you find documentation suggesting to use it instead of the new one? If there is any piece of documentation that still refers to it, we should remove it.

KendrickFerguson commented 1 year ago

In your readme in this code/document. please fix this so i can move forward.

veeenu commented 1 year ago

Nothing's blocking you from moving forward. I will fix the README but the stable API is already documented elsewhere and you can refer to that.

veeenu commented 1 year ago

Closed by #134