Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Available ports

Status
Not open for further replies.

DeltaTech

Programmer
Apr 16, 2003
92
MY
Hi
Is there a way to check what ports are available on a system and if a particular port is selected by the user, check to see if there is a device connected to it/if the port is valid/working?
I am working on a POS system that has a customer display pole and cash drawer attached. The user needs to attach these devices and set it during initial implementation stages.
Any help would be appreciated.
Thanks in advance.
[bigcheeks]
 
Also, you can check the "Motherboard, Controller, and Port Classes" section from this link:

Note that using WMI will not work on Win9X (from what I know, aniway, each class has a "System reqs" section on the bottom of the page.
To see how to use these clases in VB6, an example you may find on a thread of mine: thread222-967554.
Just change the class name from InstanceOf("...") with the one you want and use their speciffic properties (even if they don't appear in the VB6 drop-down list of methods/properties).

Hope I've been helpful,
Bogdan Muresan.
 
Hello BogdanMBM
Yes that was very helpful. It's just what I needed to get started.
Thanks very much
[bigcheeks]
 
You're wellcome!
Note that you may want to check the returned values from WMI for "NULL returns". Sometime it happends (don't know why...), but I've got sometimes "Invalid use of null" in VB when working with this classes. Soo, ... error handle your calls to WMI!
 
Hi, I just want the computer to send a bit of electricity to a cable connected to another, to check out if current passes (verify if you plugged something)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top