简体   繁体   English

如何使用Silverlight与客户端应用程序进行通信

[英]How to communicate to a client side application with silverlight

I'm currently developing a silverlight application with prism. 我目前正在开发带有棱镜的Silverlight应用程序。 From this application I need to be able to send a command or keystrokes to a client-side application. 从这个应用程序中,我需要能够向客户端应用程序发送命令或击键。 What is the best way to accomplish this? 做到这一点的最佳方法是什么?

Things I'm considering: 我正在考虑的事情:

Javascript can use an ActiveX object to use DDE. Javascript可以使用ActiveX对象来使用DDE。 (Limits to IE only) (仅限于IE)

Javascript can interact with a java applet to use DDE. Javascript可以与Java Applet交互以使用DDE。 (Have to deal with signing the applet appropriately) (必须适当处理小程序的签名)

Silverlight 4 can access COM objects if running Out of Browser. 如果在浏览器中用完,Silverlight 4可以访问COM对象。 (I would like to avoid running out of browser) (我想避免浏览器用完)

Are there any other options that I am overlooking? 我还有其他选择吗?

In addition to the other suggestions, if you use something like Firebreath to develop the sort of ActiveX control you mention above, you get an effectively identical NPAPI interface for your control for free. 除了其他建议,如果您使用Firebreath之类的工具来开发上述ActiveX控件,则可以免费获得控件的有效相同NPAPI接口。 This would allow you to create one control in native (C++) code that would then work across all major browsers; 这样一来,您就可以使用本机(C ++)代码创建一个控件,然后该控件即可在所有主流浏览器上运行; and you could then talk to that control from Silverlight via its JavaScript bridge. 然后您可以通过Silverlight通过其JavaScript桥与该控件进行对话。 Of course, any application that depends on sending keystrokes to another application is going to be pretty brittle, so you'll have to design your interface pretty well to ensure that things don't go suddenly haywire on you when the other application you're controlling hiccups. 当然,依赖于向另一个应用程序发送击键的任何应用程序都将非常脆弱,因此您必须很好地设计界面,以确保在您使用另一个应用程序时不会突然陷入困境控制打ic。

这太过分了,但是如果客户端应用程序在您的控制之下,则您可以托管一个小的http容器并从Silverlight将其发布到localhost:port :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何访问Silverlight客户端和服务器端? - How to access Silverlight client and server side? 在Node.js中如何与客户端JavaScript通信? - In Node.js how do I communicate with client side JavaScript? 如何使用javascript通过客户端串口进行通信? - how to communicate through serial port on client side using javascript? 与客户端打印机通信并打印A4纸 - Communicate with client side printer and print A4 sheet "如何在客户端启动桌面应用程序" - how to start up a desktop application in client side 寻找一个将WEB应用程序与Silverlight和VB6集成的客户端集成解决方案 - Looking for a Client-Side integration solution integrating WEB application with Silverlight and VB6 这个客户端应用程序安全吗? - Is this client side application secure? 如何使用 javascript 发送带有客户端应用程序洞察的“应用程序版本”? - How to send 'Application Version' with client side application insights using javascript? 客户端与Rest-API进行通信的JS框架 - JS framework for client-side to communicate with rest-api 在 Google Apps 脚本中从服务器到客户端进行通信 - Communicate from server to client side in Google Apps script
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM