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:
wj32
2009-06-06 00:53:45 +00:00
parent fb07e556d8
commit 2c3c8a402f
38 changed files with 304 additions and 186 deletions
@@ -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;