Using reflection to view a different process?

P

Peter Rilling

Hi,

How can I use reflection to discover/invoke objects in another process.

I would like to create an app that will allow me to view the properties and
invoke methods on other programs using reflection. How can I do this?
 
J

Jeroen Mostert

Peter said:
How can I use reflection to discover/invoke objects in another process.
You can't.
I would like to create an app that will allow me to view the properties and
invoke methods on other programs using reflection. How can I do this?
If you're trying to do what I think you're trying to do: don't try to do
that. Processes are isolated from each other (or, at least, they are
supposed to be). They can only communicate with each other explicitly, that
is, the other process must offer channels over which you can communicate.
This is called remoting, and it allows processes to pass objects back and
forth. It does not allow one process to discover another's insides
indepedently, though -- the processes need to cooperate.

Beyond this general advice, you'll have to be more specific about what
problem you're trying to solve here.
 
P

Peter Rilling

Thanks.

I am trying to write an acceptance testing framework in such a way that
there are no dependencies with the app but could evaluate controls and
properties. This way you could test any app and, for the most part, remote
control them (without sending low-level messages to the windows).

I had thought of remoting and that was going to be my backup plan. That way
I can have the developers place a little stub in the app which opens a port
allowing full control of the app.

I was just hoping to make my framework as independent as possible.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top