mirror of
https://git.intege.rs/xlib/x.git
synced 2025-12-05 20:35:01 +00:00
15 lines
464 B
Rust
15 lines
464 B
Rust
use x::IntoUsize;
|
|
|
|
x::lazy_import! { "kernel32.dll"
|
|
pub fn LoadLibraryA(module_name: *const i8) -> &'static x::win32::ImageBase;
|
|
pub fn GetModuleHandleA(module_name: *const i8) -> &'static x::win32::ImageBase;
|
|
pub fn GetLastError() -> usize;
|
|
}
|
|
|
|
|
|
#[test]
|
|
#[cfg(feature = "win32")]
|
|
pub fn test_exports() {
|
|
let a = LoadLibraryA(x::cstr!("user32.dll"));
|
|
println!("{} -> {}",a.into_usize(), unsafe { a.nt_header().optional_header.size_of_image });
|
|
} |