[EMAIL PROTECTED] wrote:
> Happy New Year!
> 
> Delphi 5
> Windows local area network.
> 
> How do I determine if any other instances of my EXE are running on the
> network?
> 
> Each is started from the same common folder.
> 
> My program already manages a "session table". But sometime my program
> fails and exits abnormally, so the session table entry does not get
> deleted.
> 
> I wish for a routine that would poll or otherwise determine somehow "in
> real time" if there are truly active instances of the same EXE alive on
> the network.
> 
> Not sure which set of windows API calls I should be looking at.
> 
> Many thanks in advance.

Haven't we already answered this question or something like it before?

There is no Windows API to do what you want.  The only way you can come 
close would be to have a central server that all instances of your EXE 
connect into - probably over TCP/IP.  Then you can send whatever data 
you want over the connection as long as the server handles it.  Throw in 
some sort of keep-alive that gets sent every 30 seconds or so to keep 
the underlying socket from disconnecting.  Then when you want 
information in "real-time", you connect into the server with a special 
application that retrieves the client information via a broadcast of 
some sort to which clients respond and the server collects and sends to 
the special client.

That's the only way I know of to get close to getting real-time responses.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to