INNER CODE UNIT · Rust

set_app_aumid

Blur009/Blur-AutoClicker · src-tauri/src/lib.rs:152

fn set_app_aumid() {
    use windows_sys::Win32::UI::Shell::SetCurrentProcessExplicitAppUserModelID;

    // A stable, explicit AppUserModelID so Windows Explorer does not group or
    // cache this app under the bundled EXE icon, which otherwise shadows
    // runtime icon updates in release builds.
    let wide: Vec<u16> = "BlurAutoClicker.App"
        .encode_utf16()
        .chain(std::iter::once(0))
        .collect();
    unsafe {
        let hr = SetCurrentProcessExplicitAppUserModelID(wide.as_ptr());
        if hr < 0 {
            log::warn!("[icon] SetCurrentProcessExplicitAppUserModelID failed: HRESULT {hr:#x}");
        }
    }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…