Sunny
6/10/2004 5:03:00 PM
Hi,
you do not need static variables and methods.
As your oobject is singleton, there is only one instance to which all
clients are connected. So, any field of that class is one and the same
for all clients.
Just remove the static declaration, it should work.
Sunny
In article <uyhhSwtTEHA.2416@TK2MSFTNGP12.phx.gbl>,
ianLOSEatTHEaltispartnersCAPS.com says...
> Hello,
>
> I''m trying to build a monitoring system into a Win32 service I''ve
> written by having the service offer a remotable class "monitor" to the
> outside world. This class has a static string status, which is set to
> whatever the status of the service is as that time (there is only ever
> one service object instantiated to the best of my knowledge) and a
> public static function getStatus() which returns the string. So upon a
> remote instantiation of monitor as a singleton object I expect its
> getStatus() method to call server.getStatus() and return me the status
> string of the service. However what actually happens is it always
> returns an empty string, despite the server.exe producing output asuring
> me that the variable has been set.
>
> Does anyone experience of achieving what I am attempting? Remoting
> a dynamic variable from an object that is already executing and is doing
> work.
>
> Ian.
>
>