Inspired by danhab99's macropad project (ev-cmd)
The AI code that was originally generated, using Jetbrains + Codex, was pretty poor. It used an ancient windows crate, and didn't actually compile. It also did some very sketchy stuff like:
let variant = VARIANT::default();
let str = variant.Anonymous.Anonymous.bstrVal;
which seems a bit silly, even if it does work.
It was good to save me diving through the Windows API docs, but really needs a human to check that the code is reasonable.
The windows crate could do with a bit of love, would be nice if MS could spend some effort on improving it. Doco is basically absent, and there could be some nice wrappers around some of the lower level stuff. E.g: The VariantGuard wrapper that I added would be a nice addition to the actual library. There seems to be a mish-mash of higher level and lower level code.
Linux code was not tested, as for some reason the webcams I have spare don't support exposure on Linux.