[转]How Can I Find Out What Is Using a Busy or Reserved Serial Port?

本文介绍了一种确定哪个进程正在使用特定串行(COM)端口的方法。通过使用Process Explorer工具和设备管理器,可以找到占用指定串口的服务名,并进一步定位到具体的使用该串口的进程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

转自:http://digital.ni.com/public.nsf/allkb/29B079481C5ECE76862578810082394E

 

How Can I Find Out What Is Using a Busy or Reserved Serial Port?

 



Primary Software: 
Primary Software Version: 5.0.3
Primary Software Fixed Version: N/A
Secondary Software: Driver Software>>NI-Serial
Hardware: Serial


Problem: 
I have a program that is returning VI_ERROR_RSRC_BUSY or other resource is busy error when trying to access a Serial (COM) port through VISA. How do I figure out what process is using the COM port?

Solution: 
To find the process which is using the Serial (COM) Port, follow the steps below:

    1. Download the Process Explorer tool, which is linked in the related links section of this article.
    2. Navigate to Control Panel » Device Manager. In Device Manager navigate to Ports (COM & LPT) and right click and select Properties on the target serial port.

    1. Select the Details tab and click the Property field and change the value to Service. Write down the value that is listed here. In the example below (a NI USB-232), the service value isNiSerU. Note the value of this field for searching in Process Explorer.

    1. Open Process Explorer and you will see a screen similar to the image below.

    1. Select Find » Find Handle or DLL... in the menu. A new window will pop up and in the field Handle or DLL substring type in the value that was obtained from Device Manager, in this case NiSerU
    2. Click Search and the results will populate to show which process is using a the particular handle. For example in the search below, the USB-232 shows as \Device\NiSerU1 being used by NIMax.exe. From here you can tell which process is using the serial port resource.




转载于:https://www.cnblogs.com/msdynax/p/3889604.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值