The KeStackAttachProcess routine attaches the current thread to the address space of the target process.
void KeStackAttachProcess( PRKPROCESS PROCESS, PRKAPC_STATE ApcState );
An opaque pointer to a KAPC_STATE structure. The caller must allocate storage for this structure either from nonpaged pool or from the caller's own thread stack.
KeStackAttachProcess attaches the current thread to the address space of the process pointed to by the Process parameter. If the current thread was already attached to another process, the ApcState parameter receives the current APC state before KeStackAttachProcess attaches to the new process.
Every call to KeStackAttachProcess must be matched by a subsequent call to KeUnstackDetachProcess.
For more information about using system threads and managing synchronization within a nonarbitrary thread context, see Windows Kernel-Mode Process and Thread Manager.
|Minimum supported client||This routine is available on Microsoft Windows 2000 and later.|
|Header||ntifs.h (include Ntifs.h, Fltkernel.h)|
Send feedback about: