virtual-file-transfer 0.1.0

Transfer in-memory, generated, or archived data as files via Windows drag-and-drop and clipboard without staging temporary files
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::{Error, PlatformError, PlatformErrorKind};
use windows::core::HRESULT;

pub(crate) fn from_windows_error(kind: PlatformErrorKind, error: windows::core::Error) -> Error {
    Error::Platform(PlatformError::new(kind, error.to_string()))
}

pub(crate) fn from_hresult(kind: PlatformErrorKind, hr: HRESULT) -> Error {
    from_windows_error(kind, windows::core::Error::from_hresult(hr))
}