English 中文(简体)
可以通过浏览器访问有产权的 USB 设备... 可能吗? 银灯可能吗? ( Java 暂时排除在外)
原标题:Proprietary USB device access via browser... possible? Silverlight maybe? (Java is excluded for now)

可能有很多类似的问题, 但是因为我知道只有很少的解决方案, 我不敢肯定这些解决方案会对我们有用, 我在找别的东西,或许是新技术...

我们拥有的是一个不那么花哨的USB设备(当然,它需要一个驱动程序要加载), 它有几张 C++ dll 来帮助从中获取一定的输出。 在顶端,我们制作了一个 C# 桌面应用程序, 以更吸引人的方式使用该设备( 里面有多个互连器 ) 。

目前为止情况还不错,但为了获得更大的灵活性,将申请提升到网络上...还有什么选择?

已知的解决办法是:

  • 1) ActiveX - kinda old technology and not cross-browser;
  • 2) .Net applet - not so common (is this even a solution?)
  • 3) Java applet - well known, but JVM needed (since we went for C++ C# maybe is out of scope);
  • 4) Web service on the usb device itself - our device is very light, we cannot have it there.

是否有其他方法? 银灯4, 5 (也许“ 浏览器外 ” ) 是可行的解决办法吗? 这些新技术现在怎么办? “ 坚固” Html 5

EDIT1: 特别是我对银灯感兴趣。是否有办法使用 < strong> Silverlight ?

我找到了这个问题: < a href="https://stackoverflow.com/ questions/2252683/can-silverlight-access-a-net-library- that-accesses-a-usb-port > Silverlight能否访问进入USB端口的.Net图书馆? 。我从中能理解什么?“Silverlight难道不是适合我的情景的解决方案吗?”

3:非常重要!

These devices need to be used on customer side! People browsing must use them locally on their PCs!

提前感谢。

最佳回答

将申请提升到网上[.]。

简单解决方案 : 让网络服务器( httpserver) 在连接USB 设备的 PC 上运行, 并使用 CGI 等网络服务器界面之一与您的 USB 设备交谈 。 这样您只需要编码一个 USB 到 CGI 包装程序, 可以是 C++ 或 C# 。

问题回答

另一种方法是写入浏览器插件 。

您要面对的问题是,浏览器中的内容通常在沙箱中运行, 使网络应用程序无法访问计算机。 这样做有很好的理由, 主要是安全。 在计算机上运行一些代码的方法之一是设置一个浏览器插件, 该插件可以访问计算机硬件资源, 但可以与浏览器内容互动。 不幸的是, 您可能最终会为不同的浏览器撰写一个不同的插件 。

确实存在一些框架, 使写入浏览器插件更加容易操作。 简单的搜索应该会发现其中的一些候选人 。

您可以使用 Silverlight 5, 它可以允许您访问您的文件系统和 USB 存储设备。 如果您想要获得其他 USB 设备( 打印机、 扫描仪等) 的控制, 您应该给一个设备类型 。 我知道, Silverlight 5 使用一个文件系统和网络摄像头运作正常... )





相关问题
Silverlight Rich text box control

Our team decided that we need our own custom Rich text box control for Silverlight app we are developing. We looked at existing controls mentioned at A good rich text control for Silverlight but ...

Silverlight ImageBrush not rendering (with Bing Map Control)

I m trying to add an image to a Pushpin instance from the Silverlight Bing Map Control, but I can t seem to get it to render (the pushpin renders fine). This is probably a general WPF question rather ...

Silverlight OpenFileDialog DoEvents equivalent

I m processing large files after they are selected by the user. My code looks like the following: if (FileDialog.ShowDialog() == true) { // process really big file } This freezes up the UI so ...

list of controls with templates in silverlight

Does anyone know where to find a list of controls that you can set the template on in Silverlight? I ve wasted several hours now trying to create control templates only to find that the control doesn ...

Silverlight, Updating the UI during processing

I have a simple silverlight multifile upload application, and i want to provide the user with some feedback, right now its only in a test phase and i dont have the webservice. Somehow i cant get the ...

Silverlight 3 - FindName returns null

This looks a bug to me.. Using Silverlight 3 and i have a user control defined in XAML and trying to access the object during runtime returns a null. <Grid> <common:CommonGridEditPanel x:...

silverlight 3 collection binding

Someone please help me understand why this binding does not work... I have a class called SelectionManager with a property called dates which is populated by a WCF service. The property is an ...

热门标签