Hi there.

This is a bit complicated, so stick with me.

I have following scenario: I have a service that needs to detect whether a user is locally logged on (Win2k). Normally, it is no problem to hook up a Dll to the Notify section of Winlogon and to call ControlService() on Startup/Logon/StartShell/Logoff and ShutDown. However, this works only if the service is already running before a user loggs on locally. Which I cannot assume. Thus the dilemma: given that the service gets started at some point (can be started remotely, for example), is there any reliable way to detect whether a user is logged on locally, and if so, what's the username?

Comments/thoughts/flames ( ) are welcome.

Cheers,