Shared Methods In A Class

  • Thread starter Thread starter adebiasio
  • Start date Start date
A

adebiasio

I have an application that has various libraries. One of them I use
shared methods in a class A to have all libriares access these methods.
This seems to work with no problems.

However, I am trying to develop some type of object model to allow
third party applications to modify/control certain features of my
application. To do this the third application needs to access the
shared methods of class A. But it is not working. The methods return
blank values indicating that it is a separate instance of class A.

How can another application access this same class A.

I would also like to take it another step further. Two users on the
same machine can access my application at the same time. There would
then be two difference instances of class A. Which would be OK. But
when then third party application tries to access the shared methods of
class A which one would it get. Ideally, a box would popup showing the
two different users, select the right one and access that particular
class A.

Any thoughts would greatly be appreciated.
 
I have an application that has various libraries. One of them I use
shared methods in a class A to have all libriares access these
methods.
This seems to work with no problems.
However, I am trying to develop some type of object model to allow
third party applications to modify/control certain features of my
application. To do this the third application needs to access the
shared methods of class A. But it is not working. The methods return
blank values indicating that it is a separate instance of class A.

How can another application access this same class A.

I would also like to take it another step further. Two users on the
same machine can access my application at the same time. There would
then be two difference instances of class A. Which would be OK. But
when then third party application tries to access the shared methods
of class A which one would it get. Ideally, a box would popup showing
the two different users, select the right one and access that
particular class A.

Any thoughts would greatly be appreciated.

It sounds like you need to look into opening a remoting channel in your application
to allow other applications to talk to it. You can host the channel in your
application, in a centralized windows service that the third party app speaks
to as well as your application, or in a web service (which might be better
for the third party if they are external).

Jim Wooley
http://devauthority.com/blogs/jwooley
 
In the COM days, we would use an ActiveX.exe to share information across
users. Noadays, while the idea is the same, you have more options.
(Remoting, Web Services, COM+).

Choose the complexity and trade-offs you prefer and begin to hurt your
brain.
 
Thanks for the input. I like my brain just the way it is. I think I
will pass on my ideas.
 
Back
Top