|
From: Leif M. <le...@ta...> - 2006-01-05 00:30:47
|
Catalin,
The problem is that Windows does not provide an easy way to do
this. When a user
logs out, the OS will send a "user logged out" signal to all running
processes. The
Wrapper traps that and reports it. This is done because most
applications want to shut
down when the user logs out. There is no such signal when a user logs in.
Starting with version 3.1.1, you can call WrapperManager.getUser or
WrapperManager.getInteractiveUser to find out who is logged in at any given
time. This is operation does require a bit of processing as it is done
by scanning
the registry. You would have a daemon process that would call it ever
10 seconds
or so, then stop once a logged in user was found. The loop could then
be restarted
if the logged out signal is detected.
The feature was actually added in version 3.1.0, but there was a
memory leak in
the call.
Due to a couple other bugs however, I would suggest using 3.1.2.
That version
is very stable.
Cheers,
Leif
Catalin Kormos wrote:
> Hi there,
>
> I have no ideea if this is possible, but maybe you gusy have, if it
> would be possible to detect the user login the same as logout is
> detected? i need this the same way as others need it, because i show
> an icon on the system's tray bar that is hidden after a logout/login
> action. Is there any other workarround for this except implementing a
> thread that checks the current user regulary?
>
> Thanks,
> Catalin
|