mod consts;
pub use consts::*;
use crate::typedefs::*;
#[link(name = "Kernel32")]
unsafe extern "system" {
pub unsafe fn GetLastError() -> DWORD;
pub unsafe fn GetCurrentProcessId() -> DWORD;
pub unsafe fn GlobalAddAtomW(atom_name: LPCWSTR) -> ATOM;
pub unsafe fn GlobalDeleteAtom(atom: ATOM) -> ATOM;
pub unsafe fn CloseHandle(handle: HANDLE) -> BOOL;
pub unsafe fn CreateFileMappingW(
file: HANDLE,
file_mapping_attributes: *const SecurityAttributes,
page_protection: DWORD,
max_size_high: DWORD,
max_size_low: DWORD,
name: LPCWSTR,
) -> HANDLE;
pub unsafe fn UnmapViewOfFile(
base_address: LPCVOID,
) -> BOOL;
pub unsafe fn MapViewOfFile(
file_mapping_object: HANDLE,
desired_access: DWORD,
file_offset_high: DWORD,
file_offset_low: DWORD,
number_of_bytes_to_map: SIZE_T,
) -> LPVOID;
pub unsafe fn GetModuleHandleW(
module_name: LPCWSTR
) -> HMODULE;
}
#[repr(C)]
#[derive(finestre_init_with_size_derive::InitWithSize)]
pub struct SecurityAttributes {
#[size_field]
pub length: DWORD,
pub security_descriptor: LPVOID,
pub inherit_handle: BOOL,
}