From c22b255d6f91d7b2420fe20038cefb2b116821bf Mon Sep 17 00:00:00 2001 From: Harry Fei Date: Sun, 30 Sep 2018 17:53:14 +0800 Subject: init commit --- src/alloc_sys.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/alloc_sys.rs (limited to 'src/alloc_sys.rs') diff --git a/src/alloc_sys.rs b/src/alloc_sys.rs new file mode 100644 index 0000000..5d46f02 --- /dev/null +++ b/src/alloc_sys.rs @@ -0,0 +1,12 @@ +#[repr(C)] +pub enum POOL_TYPE { + PagedPool, +} + +pub type PVOID = *mut u8; + +#[link(name = "ntoskrnl")] +extern "system" { + pub fn ExAllocatePoolWithTag(PoolType: POOL_TYPE, NumberOfBytes: usize, Tag: u32) -> PVOID; + pub fn ExFreePoolWithTag(P: PVOID, Tag: u32); +} -- cgit v1.2.3