开发者

How to communicate to a client side application with silverlight

开发者 https://www.devze.com 2023-01-20 07:17 出处:网络
I\'m currently developing a silverlight application with prism. From this application I need to be able to send a command or keystro开发者_StackOverflowkes to a client-side application. What is the be

I'm currently developing a silverlight application with prism. From this application I need to be able to send a command or keystro开发者_StackOverflowkes 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.


It's an overkill but if the client application is under your control you could just host a small http container and post to localhost:port from Silverlight :)


Try using a WCF Duplex service

Pushing Data to Silverlight from WCF Duplex Service

0

精彩评论

暂无评论...
验证码 换一张
取 消