As a non-admin user, I want to detect the event when another user logs in. I cannot use System Event Notification Service (SensLogon2) since it requires the user to be part of the Administrators group. Is there another API or are there certain permission/privileges that I can grant to the current user?
We need to detect another user logging on to the terminal via RDP so that we can change the application state the current user is in.
You can do next steps to get info about session changes:
Here is working example with pInvoke. I have Form1 (WinForm) in my project. It is:
Here is NativeWrapper.cs:
And the last file is Native.cs