RE: How to access published singleton object from the host itself?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: ClumsyBiker (dotnet_at_clumsybiker.com)
Date: 07/08/04


Date: Thu, 08 Jul 2004 07:59:49 -0700

OK, I think I'm getting this:

but if the long-running exe (or service) is the app that creates and manages the sockets, listeners and queues, and the client apps are all connecting to Remotable Classes, then my client apps can call methods contained in the Remotable Classes, but they still can't call public methods and functions contained within the host .exe itself?

e.g. my .exe has a function like ReadMsgFromQueue(byval QNum as integer). If the client connects to <RemotableClassA>, it can see the methods of <RemotableClassA>, but it can't see the function ReadMsgFromQueue?

Either I still haven't got a handle on remoting, or what I want isn't possible - for the public methods and functions of the host .exe to be available to be called, just like traditional ActiveX EXEs under VB6.0

Or perhaps there is a further way in which server-created instances of the Remotable Class can converse with public functions contained within the host .exe?

>Hi,
> you can run your host as a windows service. thus it will be as long
> running as the machine is on. In the OnStar method of the service just
> create the remoting object and expose it for remoting as show in the
> response to the OP. You can start all your threads and socket listeners
> there as well.
>
> Sunny
>
>
> In article <etk$gfDZEHA.3716@TK2MSFTNGP11.phx.gbl>,
> dotnet@clumsybiker.com says...
> > William,
> >
> > I was interested to read your original request for information - publishing a singleton from a long-running host .exe is exactly what I wish to achieve:
> >
> > The host.exe is going to be responsible for receiving and queueing messages coming in over TCP/IP sockets, using multi-threading, and then a remote client is going to connect (via remoting) to the .exe to request messages from the queues.
> >
> > I'm having a hard time finding tutorials on how to do the bit you described - having the long-running .exe being the app which is connected to via remoting.
> >
> > Can you recommend a source for info on this subject?
> >
> > Best Regards,
> > Glen (ClumsyBiker)
> >
> > >Hi Sunny and Ken,
> > >
> > > Many thanks for your detailed suggestion, it works!
> > >
> > > William
> > >
> >
> > ___
> > Newsgroups brought to you courtesy of www.dotnetjohn.com
> >
>

___
Newsgroups brought to you courtesy of www.dotnetjohn.com



Relevant Pages