Skip to content

Commit 1b68aad

Browse files
committed
merge
2 parents 8b9e172 + 2b61e54 commit 1b68aad

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
[package]
1818
name = "mem-rs"
19-
version = "0.1.9"
19+
version = "0.2.0"
2020
edition = "2021"
2121
readme = "README.md"
2222
homepage = "https://github.com/FrankvdStam/mem-rs"
@@ -39,4 +39,4 @@ features = [
3939
"Win32_System_LibraryLoader",
4040
"Win32_Security",
4141
"Win32_UI_Input_XboxController",
42-
]
42+
]

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ pub mod prelude
2525
{
2626
pub use crate::read_write::*;
2727
pub use crate::process::*;
28+
pub use crate::process_module::*;
2829
pub use crate::pointer::*;
2930
}

src/process/mod.rs

+10
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,14 @@ impl Process
111111
/// println!("{}", process.get_path());
112112
/// ```
113113
pub fn get_path(&self) -> String {return self.process_data.borrow().path.clone();}
114+
115+
/// Returns handle of a process
116+
pub fn get_handle(&self) -> HANDLE {
117+
return self.process_data.borrow().handle.clone();
118+
}
119+
120+
/// Returns id of a process
121+
pub fn get_id(&self) -> u32 {
122+
return self.process_data.borrow().id.clone();
123+
}
114124
}

src/process/process_modules.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use crate::process_module::ProcessModule;
2424

2525
impl Process
2626
{
27-
pub(crate) fn get_process_modules(process_handle: HANDLE) -> Vec<ProcessModule>
27+
pub fn get_process_modules(process_handle: HANDLE) -> Vec<ProcessModule>
2828
{
2929
unsafe
3030
{

src/process_module.rs

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use windows::Win32::Foundation::{HANDLE};
1919
use windows::Win32::System::Diagnostics::Debug::ReadProcessMemory;
2020

2121
#[allow(dead_code)]
22+
#[derive(Clone)]
2223
pub struct ProcessModule
2324
{
2425
pub id: usize,

0 commit comments

Comments
 (0)