随笔 - 45  文章 - 129  trackbacks - 0
<2007年1月>
31123456
78910111213
14151617181920
21222324252627
28293031123
45678910

专注于C++ P2P STL GP OpenSource等
Google

常用链接

留言簿(10)

随笔分类

随笔档案

相册

朋友

搜索

  •  

最新评论

阅读排行榜

评论排行榜

本文是Vista相关新技术的第一篇文章。

转载请注明出处。  



最近由于工作原因,需要将系统移植到Vista上面。看了一些文档,发现Windows Vista对内核做了一些调整。

  1. 对于Windows NT 5.x 系统来说:当第一个用户登录上去之后,系统启动了Session 0作为第一个用户的运行的Session。而一些系统程序和一些服务都运行于Session 0.这样。这样假如开发人员开发Service的时候选择与桌面交互,那么服务就能很好的和桌面程序进行交互。
  2. 对于Vista系统来说,微软做了一些调整,为了加强服务的安全性,Vista将所有Service和一些系统进程放入了Sesion 0,而对于用户进程则从Session 1开始。这样就能很好的避免一些恶意服务对于用户使用的时候的一些干扰,提供更好的用户体验(这是我猜的 ^-^).
  3. ·          Use a client/server mechanism such as remote procedure call (RPC) or named pipes rather than window messages to communicate with applications.

    ·          Implement any necessary user interface for the service as follows:

    ·          Use the WTSSendMessage function to create a simple message box on the user’s desktop. This allows the service to give the user a notification and request a simple response.

    ·          For more complex UI, use the CreateProcessAsUser function to create a process in the user’s session. The process can then display a user interface in the user’s session. The service should use a client/server mechanism such as RPC or named pipes to obtain any response from the user.

    ·        Query display properties in the user’s session, not in Session 0, because the resolution and color depth that are reported in Session 0 are unlikely to reflect the actual display properties.

    ·          Explicitly choose either the Local\ or Global\ namespace for any named objects, such as events or mapped memory, that the service makes available. If an object must be accessible to user applications, it must be created in the Global\ namespace to be accessible to other sessions. The following Microsoft Win32® functions all accept named objects: OpenEvent, OpenMutex, OpenSemaphore, OpenWaitableTimer, OpenJobObject, and OpenFileMapping. Care should be taken when using these functions to ensure that the named object is accessible within the current session.

    ·          Test the driver in Windows Vista to ensure that it runs properly. If that is not possible, test the driver in Windows XP with FUS enabled and multiple users logged on. If the driver works correctly for second and subsequent logged-on users, it is not likely to be affected by the Session 0 changes in Windows Vista. The only issues that this test does not detect are those related to the absence of the video driver in Session 0 in Windows Vista.

如果你需要下载文档请到文件下载。

posted on 2006-11-03 11:39 CPP&&设计模式小屋 阅读(1124) 评论(0)  编辑 收藏 引用 所属分类: Windows Programming

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理