1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16

/// A structure representing a single Windows module export
#[derive(Clone, Default)]
pub struct WinExport {
    pub name: String,
    pub address: u64,
}

impl WinExport {
    pub fn new(exp: sys::WinExport) -> WinExport {
        WinExport {
            name: unsafe { std::ffi::CStr::from_ptr(exp.name).to_str().unwrap().to_string() },
            address: exp.address,
        }
    }
}