Vista中服务运行与NT5的差别(原创,转载请注明出处)
来源:互联网 发布:淘宝充值店客户的来源 编辑:程序博客网 时间:2024/05/21 06:37
本文是Vista相关新技术的第一篇文章。
转载请注明出处。
最近由于工作原因,需要将系统移植到Vista上面。看了一些文档,发现Windows Vista对内核做了一些调整。
- 对于Windows NT 5.x 系统来说:当第一个用户登录上去之后,系统启动了Session 0作为第一个用户的运行的Session。而一些系统程序和一些服务都运行于Session 0.这样。这样假如开发人员开发Service的时候选择与桌面交互,那么服务就能很好的和桌面程序进行交互。
- 对于Vista系统来说,微软做了一些调整,为了加强服务的安全性,Vista将所有Service和一些系统进程放入了Sesion 0,而对于用户进程则从Session 1开始。这样就能很好的避免一些恶意服务对于用户使用的时候的一些干扰,提供更好的用户体验(这是我猜的 ^-^).
- GuidelinesTo work properly in Windows Vista, a service should follow these guidelines:· 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.
- Vista中服务运行与NT5的差别(原创,转载请注明出处)
- Vista中应用程序需要Administrator权限,自动提示用户需要管理员权限的方法 (原创,转载请注明出处)
- Core Aduio API--Vista中音量控制的新特点(原创,转载请注明出处)
- Discuz的安装 (原创帖,转载请注明出处)
- 尊重原创,转载请注明出处
- 转载请注明出处
- 关于原始输入--XP新技术(原创,转载请注明出处)
- [原创]WCF入门级使用教程(转载请注明出处)
- S3C2450自动升级[原创作品,转载请注明出处]
- S3C2450自动升级[原创作品,转载请注明出处]
- LAMP环境搭建 (原创帖,转载请注明出处)
- 查看/关闭SElinux (原创帖,转载请注明出处)
- Apache2.4权限配置(原创帖-转载请注明出处)
- 文章为原创,转载请注明出处,欢迎评论。
- c++builder实现文件拖拽与U盘复制---YYB原创(转载请注明出处)
- 【原创】基于SpringMVC的注解式权限控制--转载请注明出处
- 【原创】在java下实现的平衡二叉树--转载请注明出处
- 引用请注明出处和转载请注明出处?我的看法
- DataList嵌套DataList
- C# 中的类型转换
- Linux 下大型容量文件的切割与合并
- Tomcat5配置Mysql JDBC数据库连接池
- AJAX有没有未来?
- Vista中服务运行与NT5的差别(原创,转载请注明出处)
- 使用struts同步令牌机制避免表单的重复提交
- 羊肉泡馍
- Web.config文件使用
- Core Aduio API--Vista中音量控制的新特点(原创,转载请注明出处)
- 重装Windows后LILO被覆盖的解决办法
- HTC基础篇
- 提高ASP.Net应用程序性能的十大方法
- Vista中应用程序需要Administrator权限,自动提示用户需要管理员权限的方法 (原创,转载请注明出处)