简体   繁体   中英

How to communicate to a client side application with silverlight

I'm currently developing a silverlight application with prism. 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. (Limits to IE only)

Javascript can interact with a java applet to use DDE. (Have to deal with signing the applet appropriately)

Silverlight 4 can access COM objects if running Out of Browser. (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. This would allow you to create one control in native (C++) code that would then work across all major browsers; and you could then talk to that control from Silverlight via its JavaScript bridge. 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM