Sunny
7/8/2004 4:09:00 PM
I can not understand completely there. The .exe can not have a function.
A class can. You can make the class which contains ReadMsgFromQueue
remotable, and expose it to the clients. Or in your <RemotableClassA>
you can create a method ReadMsgFromQueue which in turn invokes the
original one.
Sunny
In article <#EpP4wPZEHA.3304@TK2MSFTNGP09.phx.gbl>,
dotnet@clumsybiker.com says...
> 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
>