1. I used the machine before many COM equipment, when making access COM equipment again, COM does not start with minimum order number, but from the beginning of the used before, such as before I use the COM3/4/5/6, then after used, remove the equipment, and other COM equipment from COM7/8/9, when it COM7 before COM number display in use (but not actually used),
2. To solve these problems, I try to registries to empty registry value, and then try again, the results before COM7 COM have been released (no display is using), no. But COM equipment COM still serve COM7/8/9, so I found in the device manager by COM7/8/9 and manually uninstalled COM device, and then select scanner hardware changes, found COM equipment COM, the normal starting COM3/4/5/6,
3. In conclusion, the need to manually click uninstall, so here ask whether there is a WINDOWS command or the API function can be used in place of unloading COM equipment,
4. More than as the problem description, such as have not clear place please the great god, the younger brother grateful!
CodePudding user response:
Can see setupapi related informationCodePudding user response:
Usb serial port or serial port server often appear problem, I also is to get rid of the registry serial number, don't know why you're not back to 1,In the "run" dialog box type "regedit" into the registry; Then enter the HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ COM Name Arbiter at this time we can find the numeric item: ComDB, its value represents the current number of serial port in use end, such as 1 d, its binary: 0001, 1101, the number of representatives from right to left, 5-tetrafluorobenzoic 1 port being used, so we only need to put the ComDB this data item deleted, close the registry (without restarting the computer).
CodePudding user response:
Thank you for your reply, I finally solved the problem using SetupDi function, but need to restart after the update, I also don't know why,But now:
1 uninstall the COM, but does not remove drive
2 registry, HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ COM Name Arbiter of value: ComDB
From scanning hardware changes after the above, the COM, according to the normal starting from 1 in turn back previously occupied values were released, but somehow, the COM number assigned to can't normal use, need to restart, now at the stage to solve the problem,
If you have other ideas, please give me a reply,
CodePudding user response:
[email protected]: snippets/1836419. GitTony program to upload, please reference,
CodePudding user response:
Solution has been to create posts ~https://blog.csdn.net/ailong91/article/details/103302399