是否有任何解决方案可以在Windows 7或2008 R2中与桌面交互来创建服务? [英] is there any solution to create service with interact with desktop in windows 7 or 2008 R2?

查看:166
本文介绍了是否有任何解决方案可以在Windows 7或2008 R2中与桌面交互来创建服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个Windows服务,在一段时间内显示通知图标

当我在windows xp或windows server 2003中启动时它可以工作

但是当我在Windows 7中启动它时,它可以工作,但是没有显示通知图标

如何解决它?

有什么解决方案在Windows 7或2008 R2中与桌面交互创建服务?

hi
I have windows service that show notify icon in period of time
it works when I start it in windows xp or windows server 2003
but when I start it in windows 7 ,,, it works but doesn't show the notify icon
how can I solve it?
is there any solution to create service with interact with desktop in windows 7 or 2008 R2?

推荐答案

请查看此链接:http://msdn.microsoft.com/en-us/library/windows/desktop/ms683502(v=vs.85 ).aspx [ ^ ]用于从Windows 7或Windows Server 2008中的Windows服务与桌面交互的所有选项。
Please review this link: http://msdn.microsoft.com/en-us/library/windows/desktop/ms683502(v=vs.85).aspx[^] for all options you have for interacting with the desktop from a windows service in windows 7 or windows server 2008.


而不是询问如何启用服务与桌面的交互,询问正确的问题:如何编写在用户上下文中运行的应用程序(以及:当用户登录时如何启动它)以及与Windows服务交互的应用程序。

之间的通信应用程序和服务看起来像一个常见的客户端 - 服务器通信,即你可以使用例如WCF,.Net Remoting。熟悉这些东西,并创建一个合适的解决方案,而不是试图让石器时代的建筑在现代环境中工作。
Instead of asking how to enable the interaction of the service with the desktop, ask the proper question: how to write an application which runs in the context of the user (and also: how to start it when the user logs on) and which interacts with a Windows service.
The communication between the application and the service looks like a "common" client-server-communication, i.e. you can use e.g. WCF, .Net Remoting. Get familiarized with that stuff, and create a proper solution, instead of trying to get a stone-age architecture working in a modern environment.


这篇关于是否有任何解决方案可以在Windows 7或2008 R2中与桌面交互来创建服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆