I want to create a keyboard and mouse hook that will be launched as a Windows service. I want to monitor the activities of various users who use the system throughout the day. that is, which users are active at what time.
Is it possible to determine which user will receive events? (The service will work as a separate user, so getCurrentUser is not suitable)
No, Environment.UserName does not work - the hook procedure is not called in the context of the input receiver.
, , - _LL, , , .NET, - . , , Windows , / . , - _LL.
@TcKs - Um, ?
:
WTSGetActiveConsoleSessionId . :
WTSGetActiveConsoleSessionId , . - , . , , .
WTSQueryUserToken, , .
, :
, .
, , .
I do not know about these hooks - do they receive events from Remote Desktop keyboards? If they get only the local keyboard, then I think you need to find the owner of WinSta0.
Source: https://habr.com/ru/post/1697365/More articles:ΠΠ°ΡΡΡΡΡΠΈΠ·Π°ΡΠΈΡ ASP.NET MVC - asp.net-mvcIs it good to switch from C # to python? - pythonTransfer bandwidth - clearcaseWhat does block exiting mean in Ruby? - ruby ββ| fooobar.comCreating Dynamic Excel with Java - javaConvert audio to code and vice versa - audioSkin perspective l & f - javaWhich design template is best for iterative development? - oopShortcut for switching between markup and code - visual-studio-2008ΠΡΠΈΠΌΠ΅ΡΡ MSMQ Π² Π‘++? - c++All Articles