Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1109169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:11:31+00:00 2026-05-17T02:11:31+00:00

QueryDosDevice(LE:, DeviceName, MAX_PATH); (E: is a SD card) DeviceName is \Device\HarddiskVolume3 How do I

  • 0
QueryDosDevice(L"E:", DeviceName, MAX_PATH);

(E: is a SD card)

DeviceName is “\Device\HarddiskVolume3”

How do I “convert” it to something like "\\.\PHYSICALDRIVE1"

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T02:11:32+00:00Added an answer on May 17, 2026 at 2:11 am

    Volumes are made up of one or more partitions, which reside on disks. So, E: doesn’t necessarily map to a single disk in the system (think software RAID).

    The way you map volumes to the PhysicalDrive names in Win32 is to first open the volume and then send IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS. This will give you a structure that has one DISK_EXTENT entry for every partition that the volume spans:

    typedef struct _VOLUME_DISK_EXTENTS {
      DWORD       NumberOfDiskExtents;
      DISK_EXTENT Extents[ANYSIZE_ARRAY];
    } VOLUME_DISK_EXTENTS, *PVOLUME_DISK_EXTENTS;
    

    The extents have a disk number in them:

    typedef struct _DISK_EXTENT {
      DWORD         DiskNumber;
      LARGE_INTEGER StartingOffset;
      LARGE_INTEGER ExtentLength;
    } DISK_EXTENT, *PDISK_EXTENT;
    

    The DiskNumber is what goes into the PhsyicalDriveX link, so you can just sprintf that number with “\\.\PhysicalDrive%d”

    -scott

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Objective: I would like to be able to list the available COM Ports on
Why The Following Code always reports C:\ although It reports different Device Name handle
I wonder if there is a universal way of resolving a path using a
I want to map all partitions from all drives in Windows (the ones who
On opening a directory via zwopenfile(open directory option), it returns a handle for the
This article explains how to Query logical DOS names for their NT naming convention
To sum it up, I need to do this: 12345(hWnd) -> C:\setup.exe Right now,
AS. Nevermind. Had wrong gut feeling about continue on while/repeat loops. Made fool of
In the example of my computer the desired output should be: C: E: F:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.