libmwemu 0.25.3

x86 32/64bits and system internals emulator, for securely emulating malware and other stuff.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use lazy_static::lazy_static;
use std::sync::Mutex;

lazy_static! {
    pub static ref COUNT_READ: Mutex<u32> = Mutex::new(0);
    pub static ref COUNT_WRITE: Mutex<u32> = Mutex::new(0);
    pub static ref LAST_ERROR: Mutex<u32> = Mutex::new(0);
}

pub fn set_last_error(err_code: u32) {
    let mut guard = LAST_ERROR.lock().unwrap();
    *guard = err_code;
}