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

x
?
Solved

D:\  ->  \\.\PHYSICALDRIVE0 or 1 ?

Posted on 1999-07-22
6
Medium Priority
?
2,824 Views
Last Modified: 2013-12-03
I need to know how I can get the physical drive number (winNT) that belongs to a specified logical volume drive.

E.g.

Does "D:\" belong to "\\.\PHYSICALDRIVE0" or to "\\.\PHYSICALDRIVE1"?

There must be an API somewhere.

Thanx for your help!!
0
Comment
Question by:drdt3
[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
6 Comments
 
LVL 3

Expert Comment

by:PinTail
ID: 1403497
look in the registry
0
 
LVL 1

Expert Comment

by:pavel030297
ID: 1403498
Try DeviceIoControl functions IOCTL_DISK_GET_DRIVE_GEOMETRY,
IOCTL_DISK_GET_DRIVE_LAYOUT,IOCTL_DISK_GET_PARTITION_INFO.

0
 
LVL 23

Expert Comment

by:naveenkohli
ID: 1403499
Look at this URL.... http://www.codeguru.com/atl/atlcontain.shtml

The implementation of DeviceIoControl to get the physical drive number is in SystemHDisk project of the source code..
The file name is HDiskInformation.cpp.
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
LVL 86

Accepted Solution

by:
jkr earned 440 total points
ID: 1403500
Take a look at 'http://www.sysinternals.com/diskkey.htm' - this should give you the relevant information along with some source code...
0
 

Author Comment

by:drdt3
ID: 1403501
Hi jkr!
Thank you. But what is with NT5 (NT2000)? Sysinternals tells there is nothing the same.


0
 
LVL 86

Expert Comment

by:jkr
ID: 1403502
Hmm, sysinternals tells that the registry key is kept for backward compatibility, only the fault tolerance information is stored on the medium directly. From my experience with MS OSs, these 'backward compatibility' issues are kept quite a while (IMHO until Win2005 ;-)
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

721 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