Idov
Idov

Reputation: 5124

Attaching to another process in C++


Is there a way to attach my process to another process?
(for example, instead of opening the other process in with CREATE_PROCESS with some other flag?)
just like a debugger can do...
thanks :)

Upvotes: 1

Views: 668

Answers (2)

Nikolai Fetissov
Nikolai Fetissov

Reputation: 84159

This is platform specific. On Unix it's usually ptrace(2).

Upvotes: 2

Erik
Erik

Reputation: 91270

You're looking for DebugActiveProcess.

Upvotes: 3

Related Questions