Skip to content

Latest commit

 

History

History
231 lines (143 loc) · 7.54 KB

nf-dbgeng-idebugclient-attachprocess.md

File metadata and controls

231 lines (143 loc) · 7.54 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NF:dbgeng.IDebugClient.AttachProcess
IDebugClient::AttachProcess (dbgeng.h)
The AttachProcess method connects the debugger engine to a user-modeprocess. This method belongs to the IDebugClient interface.
debugger\attachprocess.htm
debugger
05/03/2018
IDebugClient::AttachProcess
AttachProcess, AttachProcess method [Windows Debugging], AttachProcess method [Windows Debugging],IDebugClient interface, AttachProcess method [Windows Debugging],IDebugClient2 interface, AttachProcess method [Windows Debugging],IDebugClient3 interface, AttachProcess method [Windows Debugging],IDebugClient4 interface, AttachProcess method [Windows Debugging],IDebugClient5 interface, IDebugClient interface [Windows Debugging],AttachProcess method, IDebugClient.AttachProcess, IDebugClient2 interface [Windows Debugging],AttachProcess method, IDebugClient2::AttachProcess, IDebugClient3 interface [Windows Debugging],AttachProcess method, IDebugClient3::AttachProcess, IDebugClient4 interface [Windows Debugging],AttachProcess method, IDebugClient4::AttachProcess, IDebugClient5 interface [Windows Debugging],AttachProcess method, IDebugClient5::AttachProcess, IDebugClient::AttachProcess, IDebugClient_032236c1-3072-4226-919b-3f6f95635a20.xml, dbgeng/IDebugClient2::AttachProcess, dbgeng/IDebugClient3::AttachProcess, dbgeng/IDebugClient4::AttachProcess, dbgeng/IDebugClient5::AttachProcess, dbgeng/IDebugClient::AttachProcess, debugger.attachprocess
dbgeng.h
Dbgeng.h
Desktop
Windows
IDebugClient::AttachProcess
dbgeng/IDebugClient::AttachProcess
APIRef
kbSyntax
COM
dbgeng.h
IDebugClient::AttachProcess

IDebugClient::AttachProcess

-description

The AttachProcess method connects the debugger engine to a user-modeprocess.

-parameters

-param Server [in]

Specifies the process server to use to attach to the process. If Server is zero, the engine will connect to a local process without using a process server.

-param ProcessId [in]

Specifies the process ID of the target process the debugger will attach to.

-param AttachFlags [in]

Specifies the flags that control how the debugger attaches to the target process. For details on these flags, see Remarks.

-returns

This method may also return error values. See Return Values for more details.

Return code Description
S_OK
The method was successful.

-remarks

This method is available only for live user-mode debugging.

Note   The engine doesn't completely attach to the process until the WaitForEvent method has been called. Only after the process has generated an event -- for example, the create-process event -- does it become available in the debugger session.
 
For more information about creating and attaching to live user-mode targets, see Live User-Mode Targets.

The DEBUG_ATTACH_XXX bit-flags control how the debugger engine attaches to a user-mode process. For the DEBUG_ATTACH_XXX options used when attaching to a kernel target, see AttachKernel.

The following table describes the possible flag values.

Constant Description
DEBUG_ATTACH_NONINVASIVE Attach to the target noninvasively. For more information about noninvasive debugging, see Noninvasive Debugging (User Mode).

If this flag is set, then the flags DEBUG_ATTACH_EXISTING, DEBUG_ATTACH_INVASIVE_NO_INITIAL_BREAK, and DEBUG_ATTACH_INVASIVE_RESUME_PROCESS must not be set.

DEBUG_ATTACH_EXISTING Re-attach to an application to which a debugger has already attached (and possibly abandoned). For more information about re-attaching to targets, see Re-attaching to the Target Application.

If this flag is set, then the other DEBUG_ATTACH_XXX flags must not be set.

DEBUG_ATTACH_NONINVASIVE_NO_SUSPEND Do not suspend the target's threads when attaching noninvasively.

If this flag is set, then the flag DEBUG_ATTACH_NONINVASIVE must also be set.

DEBUG_ATTACH_INVASIVE_NO_INITIAL_BREAK (Windows XP and later) Do not request an initial break-in when attaching to the target.

If this flag is set, then the flags DEBUG_ATTACH_NONINVASIVE and DEBUG_ATTACH_EXISTING must not be set.

DEBUG_ATTACH_INVASIVE_RESUME_PROCESS If this flag is set, then the flags DEBUG_ATTACH_NONINVASIVE and DEBUG_ATTACH_EXISTING must not be set.

-see-also

.attach (Attach to Process)

AbandonCurrentProcess

AttachKernel

ConnectProcessServer

CreateProcess2

CreateProcessAndAttach2

DetachCurrentProcess

GetRunningProcessDescription

GetRunningProcessSystemIds

IDebugClient

IDebugClient2

IDebugClient3

IDebugClient4

IDebugClient5

TerminateCurrentProcess

debugger engine