fxkit 0.1.2

Useful utilities for writting Rust CLI tools
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::ffi::c_char;

use crate::{
    core::tools::process_running::windows::is_process_running, utils::convert::cstr::cstr_to_str,
};

/// Returns true if the process is running, else false
/// It takes the name of the process as an argument
/// # Safety
/// cmd shouldn't be null.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn fxkit_is_process_running(cmd: *const c_char) -> bool {
    let cmd = unsafe { cstr_to_str(cmd) };

    is_process_running(&cmd)
}