1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use widestring::U16CString; use std::os::raw::{c_void}; use crate::internal; pub struct EncryptedStringW(pub *const i16); impl Drop for EncryptedStringW { fn drop(&mut self) { unsafe { internal::VMProtectFreeString(self.0 as *const c_void) }; } } impl Into<U16CString> for EncryptedStringW { fn into(self) -> U16CString { unsafe { U16CString::from_ptr_str(self.0 as *const u16) } } }