Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Attaches to the program.
Syntax
Parameters
pCallback
[in] An IDebugEventCallback2 object to be used for debug event notification.
Return Value
If successful, returns S_OK
; otherwise, returns an error code. The following table shows some possible error codes.
Value | Description |
---|---|
E_ATTACH_DEBUGGER_ALREADY_ATTACHED |
The specified program is already attached to the debugger. |
E_ATTACH_DEBUGGEE_PROCESS_SECURITY_VIOLATION |
A security violation occurred during the attach procedure. |
E_ATTACH_CANNOT_ATTACH_TO_DESKTOP |
A desktop program cannot be attached to the debugger. |
Remarks
A debug engine (DE) never calls this method to attach to a program. If the DE runs in the program's address space, the OnAttach method is called. If the DE runs in the session debug manager's (SDM) address space, the Attach method is called.