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

x
?
Solved

Enumerating devices

Posted on 2004-03-22
4
Medium Priority
?
207 Views
Last Modified: 2013-12-03
I understand that I can open and manipulate a device by passing a name such as "\\.\TAPE0" to CreateFile.  However, I can find NO documentation that tells me where to find out that a device is named TAPE0.  I know that I can use GetNTMSInformation to find the names of tape devices, but

1.  I am trying to avoid using RSM because it is so horribly flaky and unreliable.
2.  That does nothing for disk drives unless they are removable.

Any suggestions?
0
Comment
Question by:dirtdart
[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
  • 2
4 Comments
 
LVL 86

Assisted Solution

by:jkr
jkr earned 750 total points
ID: 10649508
Check out http://support.microsoft.com/default.aspx?scid=kb;en-us;259695 ("HOWTO: Enumerate Hardware Devices by Using SetupDi Calls")
0
 
LVL 5

Author Comment

by:dirtdart
ID: 10698600
That does enumerate all the hardware on a machine, but unless I'm missing something, I have no way to find the device name from the information retrieved.  As stated above, I need to know that the device is named "TAPE0", "TAPE1", etc.
0
 
LVL 9

Accepted Solution

by:
Cayce earned 750 total points
ID: 10761484
Check out the API call SetupDiGetDeviceInterfaceDetail (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devio/base/setupdigetdeviceinterfacedetail.asp).

The DeviceInterfaceDetailData (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devio/base/sp_device_interface_detail_data_str.asp) parameter includes the DevicePath that is what you are looking for.
0
 
LVL 5

Author Comment

by:dirtdart
ID: 10832281
That looks like it would probably do what I need.  However, the answer came just in time for the project to get cancelled.  Hopefully I'll have some time to pick it back up one day.  Thanks for your help.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

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