Hi
In order to receive such notifications you need to register windows handler
(HWND) with WTSRegisterSessionNotification (see MSDN for more info)
Unfortunately there is no managed solution for this and you neet to use
PInvoke.
Services don't provide UI, but you can create a hidden form that will
receive the notfication. I believe this won't be a security issue as long as
you don't show it.
HTH
Stoitcho Goutsev (100) [C# MVP]
"Raimund Taschler" <ta*@adv.magwien.gv.at> wrote in message
news:11**************@proxy.dienste.wien.at...
Hi all,
I'm implementing a windows service (running with local system account)
which has to do some tasks when users logon/logoff. How can the service
register to those logon/logoff-events? I'm using .NET 1.1 and C# and the
service will be installed on machines with os >= W2K.
If you have any solution or hint tracking down this problem please let me
know!
Regards
Raimund