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 4584406
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T21:21:02+00:00 2026-05-21T21:21:02+00:00

My application is for windows Vista and XP. There are more than on Hard

  • 0

My application is for windows Vista and XP.

There are more than on Hard drive connected to my machine. I need to get Drive Letters of the Hard drive from which my system is booting.

By using GetLogicalDriveStrings Function I can get the drive letters of all Hard drives. But how can I differentiate that this particular drive letter is the partition name of my booting Hard drive?

The structure of disks are:

disk0(Booting with this)- C D G

disk1- E F H

disk2- I J

I need to get the C,D,G only.

  • 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-21T21:21:03+00:00Added an answer on May 21, 2026 at 9:21 pm

    Call GetLogicalDrives to get all the available drive letters.

    Call GetSystemDirectory to get the drive which contains the OS.

    Open the volume using CreateFile(“\.\C:”, …

    Here replace C: with the drive letter returned in GetSystemDirectory.

    Call DeviceIControl of the returned handle with the IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS code to get the hard disk number.

    Now you know the hard disk number of the drive containing the OS.

    Repeat the CreateFile and DeviceIoControl on all the other drive letters and compare the hard disk number with the one you got earlier.

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

Sidebar

Related Questions

I am running Windows Vista and have an error in my Android application which
We are working on a Vista/Windows 7 application that will be running in 64
I found out an application I wrote does not work properly under Windows Vista/7
We have a C# application that works fine on windows XP and windows vista
I'm fixing a bug with Windows Vista 64 bits of a 32bit application, when
My WinForms application has the standard Aero glass appearance on Vista/Windows 7. I want
We need to optimize the text rendering for a C# Windows Forms application displaying
I usually have more then 10 opened application windows. When I write code I
Under Windows Vista (2008 and Seven), an application cannot write in Program Files Folder.
If the application is targeted on Windows Vista or later, could we replace all

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.