Re: Issue 2 in cassia: Add support for session change notifications

14 views
Skip to first unread message

cas...@googlecode.com

unread,
May 7, 2011, 8:54:34 PM5/7/11
to cassi...@googlegroups.com
Updates:
Owner: ---
Labels: -Priority-Medium Priority-Low

Comment #1 on issue 2 by danpo...@gmail.com: Add support for session change
notifications
http://code.google.com/p/cassia/issues/detail?id=2

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.

cas...@googlecode.com

unread,
Feb 11, 2012, 7:00:46 PM2/11/12
to cassi...@googlegroups.com

Comment #2 on issue 2 by danports: Add support for session change
notifications
http://code.google.com/p/cassia/issues/detail?id=2

Issue 47 has been merged into this issue.

cas...@googlecode.com

unread,
Feb 14, 2012, 10:57:48 PM2/14/12
to cassi...@googlegroups.com

Comment #3 on issue 2 by danports: Add support for session change
notifications
http://code.google.com/p/cassia/issues/detail?id=2

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.

cas...@googlecode.com

unread,
Feb 14, 2012, 11:13:59 PM2/14/12
to cassi...@googlegroups.com

Comment #4 on issue 2 by danports: Add support for session change
notifications
http://code.google.com/p/cassia/issues/detail?id=2

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/

cas...@googlecode.com

unread,
Feb 14, 2012, 11:34:08 PM2/14/12
to cassi...@googlegroups.com
Updates:
Labels: Milestone-2.1

Comment #5 on issue 2 by danports: Add support for session change
notifications
http://code.google.com/p/cassia/issues/detail?id=2

(No comment was entered for this change.)

cas...@googlecode.com

unread,
Feb 25, 2012, 9:45:16 PM2/25/12
to cassi...@googlegroups.com
Updates:
Labels: Estimate-8

Comment #6 on issue 2 by danports: Add support for session change
notifications
http://code.google.com/p/cassia/issues/detail?id=2

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.

cas...@googlecode.com

unread,
Sep 13, 2012, 10:03:41 AM9/13/12
to cassi...@googlegroups.com

Comment #7 on issue 2 by christop...@gmail.com: Add support for session
change notifications
http://code.google.com/p/cassia/issues/detail?id=2

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.

cas...@googlecode.com

unread,
Sep 13, 2012, 10:43:03 PM9/13/12
to cassi...@googlegroups.com

Comment #8 on issue 2 by danports: Add support for session change
notifications
http://code.google.com/p/cassia/issues/detail?id=2

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).

cas...@googlecode.com

unread,
Jan 23, 2015, 6:55:11 PM1/23/15
to cassi...@googlegroups.com

Comment #9 on issue 2 by danports: Add support for session change
notifications
https://code.google.com/p/cassia/issues/detail?id=2

Issue 77 has been merged into this issue.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages