aboutsummaryrefslogtreecommitdiff
path: root/src/object.rs
diff options
context:
space:
mode:
authorpravic <[email protected]>2016-04-12 16:39:37 +0300
committerpravic <[email protected]>2016-04-12 16:39:37 +0300
commit28ff216899e95a6a9756bcbe580f28ed8ce61228 (patch)
treebbf00e3c5f3b440db5ddb3f86b6d3a893349cee0 /src/object.rs
parentgit ignore (diff)
downloadwinapi-kmd-rs-28ff216899e95a6a9756bcbe580f28ed8ce61228.tar.xz
winapi-kmd-rs-28ff216899e95a6a9756bcbe580f28ed8ce61228.zip
Windows Kernel-Mode library
Diffstat (limited to 'src/object.rs')
-rw-r--r--src/object.rs44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/object.rs b/src/object.rs
new file mode 100644
index 0000000..ab34aeb
--- /dev/null
+++ b/src/object.rs
@@ -0,0 +1,44 @@
+//! Kernel Objects.
+
+use ::basedef::*;
+use ::device_object::PDEVICE_OBJECT;
+use ::irp::IRP;
+
+
+#[repr(C)]
+pub struct WAIT_CONTEXT_BLOCK
+{
+ WaitQueueEntry: *mut KDEVICE_QUEUE_ENTRY,
+ DeviceRoutine: extern "system" fn (_obj: PDEVICE_OBJECT, _irp: *mut IRP, *mut u8, *mut u8) -> IO_ALLOCATION_ACTION,
+ DeviceContext: *mut u8,
+ NumberOfMapRegisters: u32,
+ DeviceObject: *mut u8,
+ CurrentIrp: *mut u8,
+ BufferChainingDpc: * mut u8,
+}
+
+#[repr(C)]
+pub enum IO_ALLOCATION_ACTION
+{
+ KeepObject = 0x01,
+ DeallocateObject = 0x02,
+ DeallocateObjectKeepRegisters = 0x03,
+}
+
+#[repr(C)]
+pub struct KDEVICE_QUEUE_ENTRY
+{
+ DeviceListEntry: LIST_ENTRY,
+ SortKey: u32,
+ Inserted: bool,
+}
+
+#[repr(C)]
+pub struct KDEVICE_QUEUE
+{
+ Type: u16,
+ Size: u16,
+ DeviceListHead: LIST_ENTRY,
+ Lock: KSPIN_LOCK,
+ Busy: bool,
+}