winvd 0.0.49

Provides functions for accessing Windows 11 virtual desktop API, requires at least 24H2 26100.2605.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[cfg(debug_assertions)]
extern "system" {
    fn OutputDebugStringW(lpOutputString: windows::core::PCWSTR);
}

#[cfg(debug_assertions)]
pub(crate) fn log_output(s: &str) {
    unsafe {
        println!("{}", s);
        let notepad = format!("{}\0", s).encode_utf16().collect::<Vec<_>>();
        let pw = windows::core::PCWSTR::from_raw(notepad.as_ptr());
        OutputDebugStringW(pw);
    }
}

#[cfg(not(debug_assertions))]
#[inline]
pub(crate) fn log_output(_s: &str) {}