mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
added ability to detach processes from debuggers
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@1376 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
@@ -64,10 +64,24 @@ namespace ProcessHacker.Native.Objects
|
||||
return new DebugObjectHandle(handle, true);
|
||||
}
|
||||
|
||||
private DebugObjectHandle(IntPtr handle, bool owned)
|
||||
public DebugObjectHandle FromHandle(IntPtr handle)
|
||||
{
|
||||
return new DebugObjectHandle(handle, false);
|
||||
}
|
||||
|
||||
internal DebugObjectHandle(IntPtr handle, bool owned)
|
||||
: base(handle, owned)
|
||||
{ }
|
||||
|
||||
public DebugObjectHandle(ProcessHandle processHandle)
|
||||
{
|
||||
this.Handle = processHandle.GetDebugObjectHandle();
|
||||
|
||||
// Check if we got a handle. If we didn't the process is not being debugged.
|
||||
if (this.Handle == IntPtr.Zero)
|
||||
throw new WindowsException(NtStatus.DebuggerInactive);
|
||||
}
|
||||
|
||||
public void Continue(ClientId cid, NtStatus continueStatus)
|
||||
{
|
||||
NtStatus status;
|
||||
|
||||
Reference in New Issue
Block a user