Comments (9)
You can already receive session change notifications in services (via
ServiceBase.OnSessionChange), which is where notifications are usually most
useful, so I don't think this is a high priority.
Original comment by danports
on 8 May 2011 at 12:39
- Added labels: Priority-Low
- Removed labels: Priority-Medium
from cassia.
Issue 47 has been merged into this issue.
Original comment by danports
on 12 Feb 2012 at 12:00
from cassia.
WTSRegisterSessionNotificationEx (which allows monitoring of remote RD servers)
requires Vista/2008. On older platforms, it may be possible to work around this
using an undocumented function in winsta.dll, but I wouldn't count on that
being easy to implement.
Original comment by danports
on 15 Feb 2012 at 3:53
from cassia.
WTSWaitSystemEvent is another option, but the function is riddled with bugs --
sometimes notifications are dispatched twice, sometimes the WTS_EVENT_FLUSH
value doesn't work. But it's a possibility for supporting remote XP/2003
session notifications.
See:
- http://msdn.microsoft.com/en-us/library/windows/desktop/aa383856(v=vs.85).aspx
- http://www.remkoweijnen.nl/blog/2008/01/25/using-wtswaitsystemevent/
Original comment by danports
on 15 Feb 2012 at 4:06
from cassia.
Original comment by danports
on 15 Feb 2012 at 4:28
- Added labels: Milestone-2.1
from cassia.
Use the same technique the Microsoft.Win32.SystemEvents class uses to create a
hidden window to receive the relevant messages. WTSWaitSystemEvent doesn't
provide as much information as WTSRegisterSessionNotificationEx. We could
support WTSRegisterSessionNotification for local notifications on XP/2003, but
it's probably not worth supporting notifications for remote systems on those
platforms (unless we can dig up the relevant internal API easily -- XP/2003 are
in the extended support phase already). There's
WinStationRegisterNotificationEvent in winsta.dll, but it's not clear how that
works without doing some spelunking.
Original comment by danports
on 26 Feb 2012 at 2:45
- Added labels: Estimate-8
from cassia.
hey there,
if you use a Windows Service you can easily receive session changes:
just override the OnSessionChange method and set CanHandleSessionChangeEvent to
true.
This method is fairly spare documented although it works.
Original comment by [email protected]
on 13 Sep 2012 at 2:03
from cassia.
Thanks for the comment. I actually use the OnSessionChange method in one of my
projects and noted it in the first comment -- this improvement would be for
non-service applications that want to receive session change notifications
(e.g. a RD Services Manager type app).
Original comment by danports
on 14 Sep 2012 at 2:42
from cassia.
Issue 77 has been merged into this issue.
Original comment by danports
on 23 Jan 2015 at 11:55
from cassia.
Related Issues (20)
- TerminalServicesSession.RemoteEndPoint fails on Windows 8/Server 2012+ HOT 3
- session.applicationname throws "parameter incorrect" when no application listed HOT 1
- feature request or just info HOT 3
- cannot use the Stop-TSSesion -force on disconnected session HOT 1
- No more data is available HOT 6
- The system cannot find the file specified HOT 1
- Method to set RD server drain mode
- Add a property to ITerminalServicesSession to fetch the session's virtual IP address HOT 1
- Login To RemoteServer HOT 1
- Issues running on and connecting to W8 / Server 2012 systems: HOT 1
- Cassia is not strong named HOT 1
- rpc server unavailable error HOT 1
- Documentation does not display HOT 1
- Add Support to Get the external remote client IP HOT 1
- Set a command for reconnect HOT 3
- Not able to send message to remote terminal session. HOT 2
- Need 64 Bit Version HOT 1
- Documentation is empty HOT 1
- Access Denied error only when trying to log off a user HOT 4
- Update the Nuget package to 2.1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cassia.