Is it possible to access another address space to access a specific instance of the object?

I'm not sure this question makes sense, but so far it has been pretty hard to find the information.

My goal is to β€œattach” a process to another that is already running. I am not trying to debug any of them, I just want to access the objects / context from the latter. I read about the ICorDebug interface, implemented an example with it (using DebugActiveProcess() ), but could not simulate what I want to achieve.

My goal is to start a process with a singleton instance in it and use that instance as context in the second process (I have assemblies and type of information for both).

This is my first question, please =)

+4
source share
1 answer

No, you cannot access the address space of other processes. That would be a huge security breach. (In old windows and DOS you could).

Shared memory is one way of exchanging data between processes: How to implement shared memory in .NET?

+1
source

Source: https://habr.com/ru/post/1447609/


All Articles