简体   繁体   English

Web应用程序,需要确定是否将USB设备连接到客户端计算机

[英]web application, need to determine if a USB device is connected to the client computer

I have a intranet web application that uses a signature pad to save the signatures of users. 我有一个使用签名板保存用户签名的Intranet Web应用程序。 I would like to display the signature control only when the sign pad is connected to the computer. 我只想在数字键盘连接到计算机时显示签名控件。

I have tried query against Win32_SystemDriver and Win32_USBController using ManagementObjectCollection but this will bring the server information. 我已经尝试使用ManagementObjectCollectionWin32_SystemDriverWin32_USBController进行查询,但这将带来服务器信息。

I declare the control dynamically based on values in a parameter table. 我根据参数表中的值动态声明控件。 So the control is added to the form only if the parameter is needed. 因此,仅当需要参数时,控件才添加到表单。 Now, if the parameter (signature) is required but the user does not have the signature pad, then I don't want the control to be added in the form. 现在,如果需要参数(签名),但是用户没有签名板,那么我不希望将控件添加到表单中。

There are ways to query against the device using the control, but I will have the control displayed in my form... I don't what to display it if not connected. 有多种使用控件查询设备的方法,但是我会在表单中显示控件...如果没有连接,我将不显示该控件。

Perhaps with Flash you could try to get a hold of the USB connection... I don't really think you'll succeed, but it's worth a try. 也许使用Flash可以尝试保持USB连接...我真的不认为您会成功,但是值得一试。

Otherwise, probably not doable. 否则,可能不可行。

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

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