From 80479985764e0842e236222b0d048a879699502e Mon Sep 17 00:00:00 2001 From: pandaadir05 Date: Fri, 21 Nov 2025 15:10:49 +0200 Subject: [PATCH] fix: use correct Windows API module Win32::System::Diagnostics::Debug for GetThreadContext GetThreadContext, CONTEXT, CONTEXT_CONTROL, and CONTEXT_DEBUG_REGISTERS are in Win32::System::Diagnostics::Debug, not in Win32::System::Kernel. Updated all imports to use the correct module path. --- ghost-core/src/thread.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ghost-core/src/thread.rs b/ghost-core/src/thread.rs index 27c128b..73b5054 100644 --- a/ghost-core/src/thread.rs +++ b/ghost-core/src/thread.rs @@ -284,7 +284,7 @@ mod platform { pid: u32, memory_regions: &[crate::MemoryRegion], ) -> Result { - use windows::Win32::System::Kernel::GetThreadContext; + use windows::Win32::System::Diagnostics::Debug::GetThreadContext; use windows::Win32::System::Threading::{ OpenProcess, ResumeThread, SuspendThread, PROCESS_QUERY_INFORMATION, PROCESS_VM_READ, THREAD_GET_CONTEXT, THREAD_SUSPEND_RESUME, @@ -321,7 +321,7 @@ mod platform { // Get thread context (registers) #[cfg(target_arch = "x86_64")] { - use windows::Win32::System::Kernel::{CONTEXT, CONTEXT_CONTROL}; + use windows::Win32::System::Diagnostics::Debug::{CONTEXT, CONTEXT_CONTROL}; let mut context = CONTEXT { ContextFlags: CONTEXT_CONTROL, @@ -610,7 +610,7 @@ mod platform { /// Detect hardware breakpoints by examining debug registers (DR0-DR7) pub fn detect_hardware_breakpoints(pid: u32) -> Result { - use windows::Win32::System::Kernel::{GetThreadContext, CONTEXT, CONTEXT_DEBUG_REGISTERS}; + use windows::Win32::System::Diagnostics::Debug::{GetThreadContext, CONTEXT, CONTEXT_DEBUG_REGISTERS}; use windows::Win32::System::Threading::{ ResumeThread, SuspendThread, THREAD_GET_CONTEXT, THREAD_SUSPEND_RESUME, };