amwi,
The problem here is that there can be more than one interactive logged
in user on a machine (because of terminal services, calls to LoginUser, etc,
etc).
I don't think that there is an API call for this. Rather, you would
have to have a program that gets executed on login which will send a message
to your service to indicate that a user logged in (you might want to make
this application run in the background, so that when the app shuts down, it
can send a message to your service indicating that the user logged out).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"amwi" <am**@yahoo.com> wrote in message
news:61*********************@newsc.telia.net...
I have tried to find a solution on this problem "everywhere" without any
luck.
I am writing a service to track the time that the current logged on
interactive user is using the computer.
Perhaps one of you experts out there can point me in the right direction?
Thank you for any help!