Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

List of all USB Ports on a Computer

Posted on 2003-11-14
12
Medium Priority
?
523 Views
Last Modified: 2010-04-05
Does anyone know how I can get all of the USB Ports installed on a comoputer.
0
Comment
Question by:ramoreia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 3
  • +1
12 Comments
 
LVL 2

Expert Comment

by:Kalroth
ID: 9747086
I'm pretty sure Robert Marquardt's library/component can do this for you or at least help you doing so. :-)

Look at http://www.delphi-jedi.org/ -> Open Source API Library -> Microsoft Human Input Device.
The sourcecode link is ftp://delphi-jedi.org/api/hid.zip

Good luck.
0
 
LVL 11

Accepted Solution

by:
robert_marquardt earned 750 total points
ID: 9747197
The link is http://www.delphi-gems.com/controls.php :-)

Your question is unanswerable though.
The USB port is nonexistent. Like ethernet the bus itself is invisible. Only devices are visible.
The number of available ports can also change because plugging an USB hub adds new ports.
Windows also hides the fact that you can have several USB buses.
A modern PC comes with at least three of them. One USB 2.0 two USB 1.1.
Adding another one through a PCI card is cheap and easy.
0
 
LVL 6

Expert Comment

by:DaFox
ID: 9749270
ramoreia,

See NTDDK/src/wdm/usb/usbview for an example.

Markus
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Expert Comment

by:robert_marquardt
ID: 9749916
Yes, USBVIEW from the Windows DDK can show the tree of the devices, but there are drawbacks.
The assignment of port numbers of a hub and the physical layout of the ports need not match.
The API is not guaranteed by Microsoft (something i learned in the MS driver newsgroup).
0
 

Author Comment

by:ramoreia
ID: 9780202
What´s USBVIEW ???? What I want is something in Delphi. If theres a way.
0
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 9780671
USBVIEW is an example program from the Windows DDK and of course written in C.
There is no program for showing the USB device tree in Delphi.
I know because i would have written it.

Can you please explain for what you need it?
0
 
LVL 6

Expert Comment

by:DaFox
ID: 9781860
>> What´s USBVIEW ???? What I want is something in Delphi.

Hello? Are you a programmer or a typist? Sorry, but I cannot understand you behavior, I just wanted to help...
Anyway, Robert is the usb guy. I hope he has the right answer for you.

Regards,
Markus
0
 

Author Comment

by:ramoreia
ID: 9818863
DaFox,
 First of all, that´s not the way to talk to anyone. Second, you should ask things before judging someone. I don´t have alot of experience in programing ok, and that´s why i´m asking. What i didn´t get in what you said is . What is " NTDDK/src/wdm/usb/usbview " that you mentioned.
0
 
LVL 6

Expert Comment

by:DaFox
ID: 9819795
I didn't mean to offend you, ramoreia. It's okay that you don't have a lot of experience in programming. Everyone starts as a novice. But if you are interested in such complicated topics you cannot expect to get full Delphi source code. You have to get into this topic by reading lots of specs and ask others that already dealt with it. Nevertheless, I apologize for my overreaction.

To your question:
There are 2 main developer kits offered by Mircrosoft, the PSDK (Platform Software Development Kit) and the WinDDK (Device Driver Kit). Both kits are the perfect source for getting information on Windows programming and they also include some samples. If you install them you always have a directory .../src/... inside the kit's install directory. So, by "NTDDK/src/wdm/usb/usbview" I meant the sample from the NTDDK/WinDDK in .../wdm/usb/usbview.

Regards,
Markus
0
 

Author Comment

by:ramoreia
ID: 9823842
Thank you. Where can I download these development kits ? Hey, we are all here not just to help someone but for learning too. Agree.
0
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 9824476
The Win DDK is not for download you get it from Microsoft as CD for a shipping fee.
0
 
LVL 6

Expert Comment

by:DaFox
ID: 9825618
The DDK used to be free, but as Robert said, you have to subscribe to MSDN to get it now. Maybe you can find it on some book cds...
You can download the PSDK here: http://www.microsoft.com/msdownload/platformsdk/sdkupdate/default.htm

Markus
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question