| 1 |
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] |
| 2 |
::windows_targets::link!("ntdll.dll" "system" fn RtlDrainNonVolatileFlush(nvtoken : *const ::core::ffi::c_void) -> u32); |
| 3 |
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] |
| 4 |
::windows_targets::link!("ntdll.dll" "system" fn RtlFillNonVolatileMemory(nvtoken : *const ::core::ffi::c_void, nvdestination : *mut ::core::ffi::c_void, size : usize, value : u8, flags : u32) -> u32); |
| 5 |
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] |
| 6 |
::windows_targets::link!("ntdll.dll" "system" fn RtlFlushNonVolatileMemory(nvtoken : *const ::core::ffi::c_void, nvbuffer : *const ::core::ffi::c_void, size : usize, flags : u32) -> u32); |
| 7 |
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] |
| 8 |
::windows_targets::link!("ntdll.dll" "system" fn RtlFlushNonVolatileMemoryRanges(nvtoken : *const ::core::ffi::c_void, nvranges : *const NV_MEMORY_RANGE, numranges : usize, flags : u32) -> u32); |
| 9 |
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] |
| 10 |
::windows_targets::link!("ntdll.dll" "system" fn RtlFreeNonVolatileToken(nvtoken : *const ::core::ffi::c_void) -> u32); |
| 11 |
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] |
| 12 |
::windows_targets::link!("ntdll.dll" "system" fn RtlGetNonVolatileToken(nvbuffer : *const ::core::ffi::c_void, size : usize, nvtoken : *mut *mut ::core::ffi::c_void) -> u32); |
| 13 |
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] |
| 14 |
::windows_targets::link!("ntdll.dll" "system" fn RtlWriteNonVolatileMemory(nvtoken : *const ::core::ffi::c_void, nvdestination : *mut ::core::ffi::c_void, source : *const ::core::ffi::c_void, size : usize, flags : u32) -> u32); |
| 15 |
#[repr(C)] |
| 16 |
pub struct NV_MEMORY_RANGE { |
| 17 |
pub BaseAddress: *mut ::core::ffi::c_void, |
| 18 |
pub Length: usize, |
| 19 |
} |
| 20 |
impl ::core::marker::Copy for NV_MEMORY_RANGE {} |
| 21 |
impl ::core::clone::Clone for NV_MEMORY_RANGE { |
| 22 |
fn clone(&self) -> Self { |
| 23 |
*self |
| 24 |
} |
| 25 |
} |