Home All Groups Group Topic Archive Search About

Shared Methods In A Class

Author
11 Apr 2006 8:37 PM
adebiasio@sympatico.ca
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.

Author
11 Apr 2006 9:07 PM
Jim Wooley
Show quote Hide quote
> 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
Author
11 Apr 2006 9:32 PM
AMDRIT
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.



<adebia***@sympatico.ca> wrote in message
Show quoteHide quote
news:1144787835.650406.167760@v46g2000cwv.googlegroups.com...
>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.
>
Author
12 Apr 2006 10:06 PM
adebiasio@sympatico.ca
Thanks for the input.  I like my brain just the way it is.  I think I
will pass on my ideas.