Hi Asher,
To ensure my reply is a best practice recommendation, I have discussed with
some kernel expert internally.
They confirmed that we must create a window to get notification from
system. But since server application will run in Session 0 in Vista, I
suspect if Session 0 isolation feature in Vista will affect this solution.
Their comments below resolves my suspicion:
1. System broadcast messages like this will go to all topmost windows in
all terminal sessions, so Session 0 isolation feature in Vista will not
affect this solution.
2. You need to create a separate thread to pump messages for this window.
You can not rely on the service thread.
3. If you are using .Net in server application, you should PInvoke to the
Win32 APIs (RegisterClass, CreateWindow, Get/DispatchMessage) to create the
message loop and window instead of using .Net Winform message loops(this
may cause some problem).
4. Web applications are harder because they shouldn¡¯t maintain state.
Like background threads and windows. On the other hand, they shouldn¡¯t
maintain state, like knowledge about the previous system time.
Hope this helps.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.