First version available now in: https://crates.io/crates/winvd
```rust use winvd::VirtualDesktopService;
fn main() { let service = VirtualDesktopService::createwithcom().unwrap();
// Show all desktops
let desktops = service.get_desktops().unwrap();
println!("Desktops {:?}", desktops);
// Listen on desktop changes
service.on_desktop_change(Box::new(|old, new| {
println!("Desktop changed from {:?} to {:?}", old, new);
}));
// Go to second desktop, index = 1
let second_desktop = desktops.get(1).unwrap();
service.go_to_desktop(second_desktop).unwrap();
// See more examples from the testbin
// https://github.com/Ciantic/VirtualDesktopAccessor/blob/rust/testbin/src/main.rs
} ```
explorer.exe
is killed, I get 0x800706BA
HRESULT's. This could be an indication I should try to re-register the service.This might deprecate CPP implementation, once I get a DLL also done with Rust.