Hi,
i have a running .NET application, lets's call it App1.exe
that i cannot modify, in that application i have a custom class, (CustomClass1) , can i access and manipulate an object of that class on App1? i want to be able to access the object, and read or change values stored inside it
My custom application already makes use of CustomClass1, i just want the running object
Hope that's clear enough
Any help appreciated

Recommended Answers

All 9 Replies

If the class object is exposed (public) then you can use it. If it inherits from any non-exposed objects (not public) then you will not be able to use it.

If the class object is exposed (public) then you can use it. If it inherits from any non-exposed objects (not public) then you will not be able to use it.

Not sure if that answered your question because I don't know what you are trying to do, but it sounds like you might be trying to work with an assembly that is not referenced in your app. This article might help (dll or exe doesn't matter):Loading Assemblies at Runtime

If you are trying to references running assemblies outside of your application, you may wish to refer to this reading about application domains: AppDomain

Hi, Thx for your reply
I'll have a look to your links and report back tomorrow
however just some more explanation, The running application that i'm trying to access is an externally installed app.
In short, i'm in QA, and i'm writing an automation framework, but i want to make it easier to access the custom built components by having my framework directly read and manipulate these objects (eg. Grids)

Is this a separate process on your local machine, or a process on the remote machine? I'm not even sure if you're talking about two processes or a running process with multiple app domains or classes....

Hi, Thx for your reply
I'll have a look to your links and report back tomorrow
however just some more explanation, The running application that i'm trying to access is an externally installed app.
In short, i'm in QA, and i'm writing an automation framework, but i want to make it easier to access the custom built components by having my framework directly read and manipulate these objects (eg. Grids)

You might take a look at this link for some hints: Automated Test System Project

Is this a separate process on your local machine, or a process on the remote machine? I'm not even sure if you're talking about two processes or a running process with multiple app domains or classes....

The process is a seperate process on my local machine, the app i'm writing will have to be totally independent from the original application

And you're wanting to call managed code in the process' loaded libraries from another application? I don't think you can do this without using the VS Debugger or manually implementing IPC. If you can do it then its news to me :P

Actually it seems doable as a software we use, Test Partner, already supports this, however i'm trying to drive the application more towards C# and .NET in general, while Test partner uses VBA, also implementing this in Test partner will result in having me referencing most of the .NET framework as COM objects..

EDIT, also Totally Independent was not the right explenation, i'm actually going to be referencing this app, to make use of its custom classes, but i'm not sure this can help my issue

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.