Solved

List of all USB Ports on a Computer

Posted on 2003-11-14
12
516 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 250 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses
Course of the Month8 days, 1 hour left to enroll

617 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