Re: EnumPorts - Find the system's COM and/or LPT ports
One more update.
Improves crash-avoidance due to subclassing if you compile EnumPorts.cls to raise exceptions.
Adds the ability to do subclassing in IDE runs.
See the compile-time options:
Code:
#Const SUBCLASS_IN_IDE = True 'True risks crashing the IDE when debugging.
#Const FAIL_ON_ERRORS = False 'True causes errors to raise exceptions.
'Exceptions raised here should turn off
'subclassing. No further device monitoring
'will be done until you assign a non-0 value
'to the PortTypes property.
'
'If you handle such exceptions you can just
'use: .PortTypes = .PortTypes to resume the
'monitoring process.
Last edited by dilettante; Feb 15th, 2018 at 08:52 PM.
Reason: typo
Re: EnumPorts - Find the system's COM and/or LPT ports
Just so you know that your efforts are appreciated I downloaded EnumPorts.zip regardless of the fact that I've never had an issue with Windows CommPort assignments.
Thanks,
Chris
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing??
Re: EnumPorts - Find the system's COM and/or LPT ports
Well this has nothing to do with "Windows CommPort assignments." it is for finding the list of available ports with descriptive names and keeping it up to date if a USB adapter is plugged or unplugged in later.
The main use is probably for menus and pick lists, where the description could make it easier for a user to choose the correct port.
You might possibly use it for finding a port of a USB adapter if it "moves" (assuming it has a unique driver that gives it a unique description). This isn't completely reliable of course because you might have two or more with the same description at any given time.
Re: EnumPorts - Find the system's COM and/or LPT ports
It would seem that I should have unzipped it before posting that comment.
Thanks,
Chris
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing??