fn from_zero_terminated(buf: &[u16]) -> Vec<u16> {
    let end = buf.iter().position(|&x| x == 0).unwrap_or(buf.len());
    buf[..=end].to_vec()
}
Creates a copy of the first zero-terminated wide string in `buf`.
The copy includes the zero terminator.
src/windows/disk.rs