MCPcopy Create free account
hub / github.com/amnweb/thide / is_thide_running

Function is_thide_running

src/cli.rs:69–81  ·  view source on GitHub ↗

Check if THide is currently running

()

Source from the content-addressed store, hash-verified

67
68/// Check if THide is currently running
69fn is_thide_running() -> bool {
70 unsafe {
71 let class_name: Vec<u16> = format!("{}\0", IPC_WINDOW_CLASS).encode_utf16().collect();
72
73 matches!(
74 FindWindowW(
75 windows::core::PCWSTR(class_name.as_ptr()),
76 windows::core::PCWSTR::null(),
77 ),
78 Ok(hwnd) if !hwnd.0.is_null()
79 )
80 }
81}
82
83/// Start THide in GUI mode
84fn start_gui() -> Result<(), Box<dyn std::error::Error>> {

Callers 1

start_guiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected