Good Morning!
I had to do something like that for an application
that someone else created and that I was now
maintaining.
It was a client/server app. The db engine was
Firebird and the db was on the server. The app was
also on the server. When the user started it at their
computer, the app loaded into memory on the user's
computer.
When certain reports were being generated, the
other users saw major delays. So, I created a DCOM app
to run on the server to tell me who was connected.
That way, I could explain to the owner why the app was
so slowwwwwwwwwww sometimes.
I do not have the source code for the app and it
has been several years since I worked on it, so I do
not remember all the steps I took. But: create a
'monitor' app as a DCOM object. Add the _tlb to the
main app's uses clause and when the main app starts,
have it send a 'hello' to the monitor app. Being a COM
object, it will start automagically. When the last
main app says 'goodbye', it will shutdown
automagically (Windows controls this.)
I hope this gives you enough to get started.
HTH...Dan'l
_________________________________
Every day with Jesus is a Great day,
but some days are GREATER than others.
_________________________________
--- Doug Hale <[EMAIL PROTECTED]> wrote:
> I can think of two simple ways to do this:
>
> 1) use the Tools API and look at the running
> processes
> - count the ones that have the same .exe
> (the problem with this is no notification - the
> first
> one doesn't know about the last one)
>
>
> 2) try to listen on some TCP port -
> If you can't - (some one else is already
> listening)
> then connect to it
> (this way, the first one becomes the server
> and the others become the clients)
> This works until the first one shuts down.
>
>
>
>
>
>
-----------------------------------------------------
> Home page: http://groups.yahoo.com/group/delphi-en/
> To unsubscribe:
> [EMAIL PROTECTED]
> Yahoo! Groups Links
>
>
>
>
>
____________________________________
Every day is a Great day, but
some days are GREATER than others!
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs