File tree 5 files changed +15
-3
lines changed
5 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 16
16
17
17
[package ]
18
18
name = " mem-rs"
19
- version = " 0.1.9 "
19
+ version = " 0.2.0 "
20
20
edition = " 2021"
21
21
readme = " README.md"
22
22
homepage = " https://github.com/FrankvdStam/mem-rs"
@@ -39,4 +39,4 @@ features = [
39
39
" Win32_System_LibraryLoader" ,
40
40
" Win32_Security" ,
41
41
" Win32_UI_Input_XboxController" ,
42
- ]
42
+ ]
Original file line number Diff line number Diff line change @@ -25,5 +25,6 @@ pub mod prelude
25
25
{
26
26
pub use crate :: read_write:: * ;
27
27
pub use crate :: process:: * ;
28
+ pub use crate :: process_module:: * ;
28
29
pub use crate :: pointer:: * ;
29
30
}
Original file line number Diff line number Diff line change @@ -111,4 +111,14 @@ impl Process
111
111
/// println!("{}", process.get_path());
112
112
/// ```
113
113
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
+ }
114
124
}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ use crate::process_module::ProcessModule;
24
24
25
25
impl Process
26
26
{
27
- pub ( crate ) fn get_process_modules ( process_handle : HANDLE ) -> Vec < ProcessModule >
27
+ pub fn get_process_modules ( process_handle : HANDLE ) -> Vec < ProcessModule >
28
28
{
29
29
unsafe
30
30
{
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ use windows::Win32::Foundation::{HANDLE};
19
19
use windows:: Win32 :: System :: Diagnostics :: Debug :: ReadProcessMemory ;
20
20
21
21
#[ allow( dead_code) ]
22
+ #[ derive( Clone ) ]
22
23
pub struct ProcessModule
23
24
{
24
25
pub id : usize ,
You can’t perform that action at this time.
0 commit comments